SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Jakarta EE & MicroProfile
2
About Us
Josh Juneau
Application Developer
Database Administrator
Author, Blogger, Podcaster
Apache NetBeans Committer/Java
Champions/Jakarta EE Guardians
Chicago Java Users Group Executive Board
Edwin Derks
Software Architect
Author, Blogger, Speaker
Contributor for Jakarta EE
Committer for MicroProfile
Member of Jakarta EE Guardians
@edwinderks
4
Agenda
- Demonstrate some cool features with Jakarta EE and MicroProfile that you
don't use everyday
- We will monitor the Q&A in order to answer your questions and feedback
during the session
5
Jakarta EE 9
6
Get Started Today
Download GlassFish 6, Payara Runtime and others?
Incorporate the dependencies into your project...the examples in this presentation
use Jakarta EE 8.
Jakarta EE 9 will NOT be backward compatible with Jakarta EE 8.
Specification Documents
Examples for this demo:
https://github.com/juneau001/JakartaEE-MicroProfile-Demos
7
Jakarta EE 9 Overview
Namespace Change
● javax.* to jakarta.*
Specification Documents
Java SE 11 may not be available out of gate, but will be with Jakarta EE 9.1
8
Jakarta CDI
Latest Additions:
- Modularization, support for Java SE
- Observers Ordering
- Asynchronous Events
- Configurators for major SPI elements
- Configure or Veto Observer Methods
- Apply Interceptor on Producers
9
Jakarta CDI - Async
How does one mark a CDI event as asynchronous?
Solution:
Fire the event calling upon the fireAsync() method, passing the event class.
10
Jakarta CDI - Async
Example of logging on event execution:
Utilize @ObservesAsync to reserve an asynchronous event.
11
Jakarta JSON Binding
Standard binding layer for converting Java objects to/from JSON.
- Serialize/de-serialize objects to/from JSON
- Mapping of Primitive Types
- Serialize Collections and Maps
12
Jakarta JSON Binding
Read a JSON document and convert it into a Java object
Utilize default JSON binding mapping to quickly map a POJO.
13
Jakarta JSON Binding
Create JSON from a Java Object
14
Jakarta JSON Processing
- Jakarta EE provides an API to parse, transform, and query JSON data using
the object model or streaming model
- JsonObjectBuilder is used to build a JSON object
- Call upon the Json.createObjectBuilder() method to create a
JsonObjectBuilder.
- Call upon the Json.createArrayBuilder() method to create a JsonArray
15
Jakarta JSON Processing
JSON Pointer and JSON Patch
JSON Pointer allows one to point to a particular element within a JSON Structure
Utilize JSON Patch to replace a specified value within a JSON document with
another value.
- Editing/Transformation Operations Added to the JSON Object Model
JSON defines only two data structures: Objects, Arrays
JSON define seven value types: String, number, object, array, true, false, null
16
Jakarta Server Faces
LocalDateTime Conversion
Ability to convert Date-Time API values to/from expression language
JSF as Microservices Front End
The examples utilize JSF views and @ViewScoped controller classes to interact
with remote web services, which in-turn, performs transactions against an
RDBMS..
17
Jakarta RESTful Web Services
JAX-RS Client
The examples utilize JSF views and @ViewScoped controller classes to interact
with remote web services to update the database.
18
Jakarta RESTful Web Services
Server Sent Events
- One way communication channel
- Text protocol, “text/event-stream” media type
- Multiple Messages
- Retry interval
SSEEventSink used to send stream of messages
SSEEvent is base event class, OutboundSseEvent packages an event
19
Jakarta Security
Standard Security Provided
- Ability to apply across multiple identity stores: Database, LDAP, Embedded
- Annotations for ease of development
- Remembers caller (cookie, identity store)
- Group to Role Mapping
- Standard expression language accessors
- Simplified HttpAuthenticationMechanism interface with three default
implementations: basic, form, LDAP
20
Jakarta Bean Validation
Validate field content using simple annotations
- Support for more flexible cascaded validation of constraint types
- Support for java.util.Optional
- Support for @Past and @Future
- New annotations: @Email, @NotEmpty, @NotBlank, @Positive,
@PositiveOrZero, @Negative, @NegativeOrZero, @PastOrPresent,
@FutureOrPresent
21
Jakarta Persistence
Updated in latest releases:
- Streams
- Repeatable Annotations
- Date-Time API
- CDI Injection in AttributeConverters
22
Jakarta WebSockets
Full-Duplex Communication Between Peers
- Create a WebSocket endpoint by annotating a POJO with @ServerEndpoint
- Create a message receiver method and annotate with @OnMessage
- Supports:
- @OnOpen
- @OnError
23
MicroProfile
24
MicroProfile - Health
Health probes for Kubernetes
- Liveness vs Readiness probes
- liveness probe; restart container when not healthy
- readiness probe; when container is ready to receive traffic
Example:
- Programmatic readiness probe
25
MicroProfile - Config
Property injection
- This specification is not part of the Jakarta EE (yet)
- Spring Framework/Boot does also contain this feature
- Can inject properties provided by the app or the environment, like Kubernetes
Example: Inject in Jakarta EE JAX-RS endpoint
- This is an example of where Jakarta EE and MicroProfile complement each other
MicroProfile - RestClient
HTTP client specification
- JAX-RS and MP RestClient both have programmatic client
- MP RestClient can annotate interfaces
Example:
- Use CDI and MP Config to inject the MP RestClient with an
environment-specific URL
MicroProfile - FaultTolerance
Increase the success rate of your requests by adding resilience to requests
Good practice to add:
- @Retry how many times will the request be repeated on error
- @Timeout how long will the client wait for a response
- @Fallback what will the behaviour be when no retries are left
MicroProfile - FaultTolerance
Increase the success rate of your requests by adding resilience to requests
More advanced tuning of resilience:
- @CircuitBreaker fail incoming requests when calls to a downstream service
are subsequently failing over a defined threshold
- @Bulkhead Limit concurrent requests to a downstream service
29
Infrastructure
Docker Image
Ship your dependencies as part of the infrastructure
- Download and ship project's dependency to the Docker Image
31
@EclipseCon | #EclipseCon
-1 0 +1

Mais conteúdo relacionado

Mais procurados

DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?Kevin Sutter
 
Implementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfileImplementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfileKevin Sutter
 
Spring andspringboot training
Spring andspringboot trainingSpring andspringboot training
Spring andspringboot trainingMallikarjuna G D
 
JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015Edward Burns
 
Top 8 benefits of react js
Top 8 benefits of react jsTop 8 benefits of react js
Top 8 benefits of react jsRani Sinha
 
Community vs. Commercial Open Source
Community vs. Commercial Open SourceCommunity vs. Commercial Open Source
Community vs. Commercial Open SourceJustin Reock
 
Spring Framework 5.2: Core Container Revisited
Spring Framework 5.2: Core Container RevisitedSpring Framework 5.2: Core Container Revisited
Spring Framework 5.2: Core Container RevisitedVMware Tanzu
 
Liferay Configuration and Customization
Liferay Configuration and CustomizationLiferay Configuration and Customization
Liferay Configuration and CustomizationThành Nguyễn
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Edward Burns
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewEugene Bogaart
 
EJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and StrategyEJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and StrategyDavid Delabassee
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6Jeffrey West
 
API Design Principles Essential 
API Design Principles Essential API Design Principles Essential 
API Design Principles Essential Oracle Korea
 

Mais procurados (20)

DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?DevNexus 2019:  MicroProfile and Jakarta EE - What's Next?
DevNexus 2019: MicroProfile and Jakarta EE - What's Next?
 
Implementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfileImplementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfile
 
Spring andspringboot training
Spring andspringboot trainingSpring andspringboot training
Spring andspringboot training
 
JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015
 
Top 8 benefits of react js
Top 8 benefits of react jsTop 8 benefits of react js
Top 8 benefits of react js
 
JDK versions and OpenJDK
JDK versions and OpenJDKJDK versions and OpenJDK
JDK versions and OpenJDK
 
Community vs. Commercial Open Source
Community vs. Commercial Open SourceCommunity vs. Commercial Open Source
Community vs. Commercial Open Source
 
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDKComparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
 
Liferay 7
Liferay 7Liferay 7
Liferay 7
 
Spring Framework 5.2: Core Container Revisited
Spring Framework 5.2: Core Container RevisitedSpring Framework 5.2: Core Container Revisited
Spring Framework 5.2: Core Container Revisited
 
Liferay Configuration and Customization
Liferay Configuration and CustomizationLiferay Configuration and Customization
Liferay Configuration and Customization
 
Serverless Spring
Serverless SpringServerless Spring
Serverless Spring
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
 
Liferay on docker
Liferay on dockerLiferay on docker
Liferay on docker
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Brouchure
BrouchureBrouchure
Brouchure
 
EJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and StrategyEJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and Strategy
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6
 
API Design Principles Essential 
API Design Principles Essential API Design Principles Essential 
API Design Principles Essential 
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 

Semelhante a Jakarta EE and MicroProfile - EclipseCon 2020

Migrating to Jakarta EE 10
Migrating to Jakarta EE 10Migrating to Jakarta EE 10
Migrating to Jakarta EE 10Josh Juneau
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)Kevin Sutter
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892Tuna Tore
 
Jakarta Concurrency: Present and Future
Jakarta Concurrency: Present and FutureJakarta Concurrency: Present and Future
Jakarta Concurrency: Present and FuturePayara
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7Arun Gupta
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And BeyondVMware Tanzu
 
Haj 4328-java ee 7 overview
Haj 4328-java ee 7 overviewHaj 4328-java ee 7 overview
Haj 4328-java ee 7 overviewKevin Sutter
 
Utilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with MicroservicesUtilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with MicroservicesJosh Juneau
 
Plone FSR
Plone FSRPlone FSR
Plone FSRfulv
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023VMware Tanzu
 
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Matt Raible
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 RecipesJosh Juneau
 

Semelhante a Jakarta EE and MicroProfile - EclipseCon 2020 (20)

Migrating to Jakarta EE 10
Migrating to Jakarta EE 10Migrating to Jakarta EE 10
Migrating to Jakarta EE 10
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
Reactjs
ReactjsReactjs
Reactjs
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
Jakarta Concurrency: Present and Future
Jakarta Concurrency: Present and FutureJakarta Concurrency: Present and Future
Jakarta Concurrency: Present and Future
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Haj 4328-java ee 7 overview
Haj 4328-java ee 7 overviewHaj 4328-java ee 7 overview
Haj 4328-java ee 7 overview
 
Intro react js
Intro react jsIntro react js
Intro react js
 
Utilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with MicroservicesUtilizing JSF Front Ends with Microservices
Utilizing JSF Front Ends with Microservices
 
CV_PrasantKumar
CV_PrasantKumarCV_PrasantKumar
CV_PrasantKumar
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
 
reactJS
reactJSreactJS
reactJS
 
Data access
Data accessData access
Data access
 
Rahul kaduskar
Rahul kaduskarRahul kaduskar
Rahul kaduskar
 

Mais de Josh Juneau

Jakarta EE Recipes
Jakarta EE RecipesJakarta EE Recipes
Jakarta EE RecipesJosh Juneau
 
Lightweight Java EE with MicroProfile
Lightweight Java EE with MicroProfileLightweight Java EE with MicroProfile
Lightweight Java EE with MicroProfileJosh Juneau
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJosh Juneau
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the HorizonJosh Juneau
 
Java EE 7 Recipes
Java EE 7 RecipesJava EE 7 Recipes
Java EE 7 RecipesJosh Juneau
 
Java EE 7 Recipes for Concurrency - JavaOne 2014
Java EE 7 Recipes for Concurrency - JavaOne 2014Java EE 7 Recipes for Concurrency - JavaOne 2014
Java EE 7 Recipes for Concurrency - JavaOne 2014Josh Juneau
 

Mais de Josh Juneau (6)

Jakarta EE Recipes
Jakarta EE RecipesJakarta EE Recipes
Jakarta EE Recipes
 
Lightweight Java EE with MicroProfile
Lightweight Java EE with MicroProfileLightweight Java EE with MicroProfile
Lightweight Java EE with MicroProfile
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
Java EE 7 Recipes
Java EE 7 RecipesJava EE 7 Recipes
Java EE 7 Recipes
 
Java EE 7 Recipes for Concurrency - JavaOne 2014
Java EE 7 Recipes for Concurrency - JavaOne 2014Java EE 7 Recipes for Concurrency - JavaOne 2014
Java EE 7 Recipes for Concurrency - JavaOne 2014
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Jakarta EE and MicroProfile - EclipseCon 2020

  • 1. Jakarta EE & MicroProfile
  • 2. 2 About Us Josh Juneau Application Developer Database Administrator Author, Blogger, Podcaster Apache NetBeans Committer/Java Champions/Jakarta EE Guardians Chicago Java Users Group Executive Board Edwin Derks Software Architect Author, Blogger, Speaker Contributor for Jakarta EE Committer for MicroProfile Member of Jakarta EE Guardians @edwinderks
  • 3.
  • 4. 4 Agenda - Demonstrate some cool features with Jakarta EE and MicroProfile that you don't use everyday - We will monitor the Q&A in order to answer your questions and feedback during the session
  • 6. 6 Get Started Today Download GlassFish 6, Payara Runtime and others? Incorporate the dependencies into your project...the examples in this presentation use Jakarta EE 8. Jakarta EE 9 will NOT be backward compatible with Jakarta EE 8. Specification Documents Examples for this demo: https://github.com/juneau001/JakartaEE-MicroProfile-Demos
  • 7. 7 Jakarta EE 9 Overview Namespace Change ● javax.* to jakarta.* Specification Documents Java SE 11 may not be available out of gate, but will be with Jakarta EE 9.1
  • 8. 8 Jakarta CDI Latest Additions: - Modularization, support for Java SE - Observers Ordering - Asynchronous Events - Configurators for major SPI elements - Configure or Veto Observer Methods - Apply Interceptor on Producers
  • 9. 9 Jakarta CDI - Async How does one mark a CDI event as asynchronous? Solution: Fire the event calling upon the fireAsync() method, passing the event class.
  • 10. 10 Jakarta CDI - Async Example of logging on event execution: Utilize @ObservesAsync to reserve an asynchronous event.
  • 11. 11 Jakarta JSON Binding Standard binding layer for converting Java objects to/from JSON. - Serialize/de-serialize objects to/from JSON - Mapping of Primitive Types - Serialize Collections and Maps
  • 12. 12 Jakarta JSON Binding Read a JSON document and convert it into a Java object Utilize default JSON binding mapping to quickly map a POJO.
  • 13. 13 Jakarta JSON Binding Create JSON from a Java Object
  • 14. 14 Jakarta JSON Processing - Jakarta EE provides an API to parse, transform, and query JSON data using the object model or streaming model - JsonObjectBuilder is used to build a JSON object - Call upon the Json.createObjectBuilder() method to create a JsonObjectBuilder. - Call upon the Json.createArrayBuilder() method to create a JsonArray
  • 15. 15 Jakarta JSON Processing JSON Pointer and JSON Patch JSON Pointer allows one to point to a particular element within a JSON Structure Utilize JSON Patch to replace a specified value within a JSON document with another value. - Editing/Transformation Operations Added to the JSON Object Model JSON defines only two data structures: Objects, Arrays JSON define seven value types: String, number, object, array, true, false, null
  • 16. 16 Jakarta Server Faces LocalDateTime Conversion Ability to convert Date-Time API values to/from expression language JSF as Microservices Front End The examples utilize JSF views and @ViewScoped controller classes to interact with remote web services, which in-turn, performs transactions against an RDBMS..
  • 17. 17 Jakarta RESTful Web Services JAX-RS Client The examples utilize JSF views and @ViewScoped controller classes to interact with remote web services to update the database.
  • 18. 18 Jakarta RESTful Web Services Server Sent Events - One way communication channel - Text protocol, “text/event-stream” media type - Multiple Messages - Retry interval SSEEventSink used to send stream of messages SSEEvent is base event class, OutboundSseEvent packages an event
  • 19. 19 Jakarta Security Standard Security Provided - Ability to apply across multiple identity stores: Database, LDAP, Embedded - Annotations for ease of development - Remembers caller (cookie, identity store) - Group to Role Mapping - Standard expression language accessors - Simplified HttpAuthenticationMechanism interface with three default implementations: basic, form, LDAP
  • 20. 20 Jakarta Bean Validation Validate field content using simple annotations - Support for more flexible cascaded validation of constraint types - Support for java.util.Optional - Support for @Past and @Future - New annotations: @Email, @NotEmpty, @NotBlank, @Positive, @PositiveOrZero, @Negative, @NegativeOrZero, @PastOrPresent, @FutureOrPresent
  • 21. 21 Jakarta Persistence Updated in latest releases: - Streams - Repeatable Annotations - Date-Time API - CDI Injection in AttributeConverters
  • 22. 22 Jakarta WebSockets Full-Duplex Communication Between Peers - Create a WebSocket endpoint by annotating a POJO with @ServerEndpoint - Create a message receiver method and annotate with @OnMessage - Supports: - @OnOpen - @OnError
  • 24. 24 MicroProfile - Health Health probes for Kubernetes - Liveness vs Readiness probes - liveness probe; restart container when not healthy - readiness probe; when container is ready to receive traffic Example: - Programmatic readiness probe
  • 25. 25 MicroProfile - Config Property injection - This specification is not part of the Jakarta EE (yet) - Spring Framework/Boot does also contain this feature - Can inject properties provided by the app or the environment, like Kubernetes Example: Inject in Jakarta EE JAX-RS endpoint - This is an example of where Jakarta EE and MicroProfile complement each other
  • 26. MicroProfile - RestClient HTTP client specification - JAX-RS and MP RestClient both have programmatic client - MP RestClient can annotate interfaces Example: - Use CDI and MP Config to inject the MP RestClient with an environment-specific URL
  • 27. MicroProfile - FaultTolerance Increase the success rate of your requests by adding resilience to requests Good practice to add: - @Retry how many times will the request be repeated on error - @Timeout how long will the client wait for a response - @Fallback what will the behaviour be when no retries are left
  • 28. MicroProfile - FaultTolerance Increase the success rate of your requests by adding resilience to requests More advanced tuning of resilience: - @CircuitBreaker fail incoming requests when calls to a downstream service are subsequently failing over a defined threshold - @Bulkhead Limit concurrent requests to a downstream service
  • 30. Docker Image Ship your dependencies as part of the infrastructure - Download and ship project's dependency to the Docker Image
  • 31. 31