1 of 31

Jakarta EE 10 and Beyond

[Your Name]

[Your Credentials]

[Your Contact]

[Your Social Media]

2 of 31

Jakarta EE

  • Java EE transitioned from JCP to Eclipse Foundation as Jakarta EE
  • Open governance, open source, open compatibility testing
  • Well-defined specification process, clear IP flow, vendor-neutral open collaboration, level playing field
  • Key stakeholders maintained if not expanded including Oracle, IBM, Red Hat, Payara and VMware
  • Community participation and contribution key

3 of 31

The Importance of Jakarta EE

  • Jakarta EE is an important part of the Java ecosystem
  • 25-35% of Java applications run on Jakarta EE application servers
    • WildFly, Payara, GlassFish, JBoss EAP, WebSphere/Liberty, WebLogic
  • 70-80% of Java applications depend on at least one or more Jakarta EE APIs
    • Tomcat, Hibernate, ActiveMQ, Jetty, CXF, Jersey, RESTEasy, Quarkus, MicroProfile, Spring

4 of 31

Jakarta EE Evolution

JPE

J2EE 1.2

Servlet, JSP, EJB, JMS

J2EE 1.3

CMP, JCA

J2EE 1.4

JAX-WS

Java EE 5

EJB 3, JPA, JSF, JAXB, JAX-WS

Java EE 7

WebSocket, JSON, Concurrency, Batch, pruning

Java EE 8

HTTP/2, SSE, Security, pruning

Java EE 6

Profiles, CDI, JAX-RS, Bean Validation

Jakarta EE 8

Open-source governance

Jakarta EE 9.x

Namespace

transition

Jakarta EE 10

New features, updates

5 of 31

A Lively Ecosystem

6 of 31

Jakarta EE 9/9.1

  • Jakarta EE 9 moves all relevant specifications from javax to jakarta namespace
  • Remove older technologies
  • Jakarta EE 9.1 adapts to Java SE 11 as opposed to Java SE 8
  • Primarily aimed for ecosystem to adapt to Jakarta

7 of 31

Ambassadors’ Jakarta EE 11 Contribution Guide

8 of 31

Jakarta EE 10 in Context

  • CDI Alignment
    • @Asynchronous, @Schedule, @Lock, @MaxConcurrency in Concurrency, @MessageListener in Messaging, @RolesAllowed, @RunAs in Security
    • Better CDI support in Batch, REST, Concurrency
  • Java SE Alignment
    • CompletionStage in Concurrency
    • Bootstrap APIs for REST, Messaging
  • Closing standardization gaps
    • OpenID Connect, JWT alignment, batch job definition Java API, @ManagedExecutorDefinition, more SQL support, multipart/form-data
    • Core/Microservices Profile
  • Deprecation/removal
    • EJB Entity Beans, embeddable EJB container, deprecated Servlet/Faces/CDI features
  • Innovation
    • NoSQL, MVC, Configuration, Repositories, gRPC

Made it! On the way Gap

9 of 31

Jakarta EE 10 Themes

  • CDI Alignment
    • @Asynchronous in Concurrency
    • Better CDI support in Batch
  • Java SE Alignment
    • CompletionStage, ForkJoinPool, parallel streams in Concurrency
    • Bootstrap APIs for REST
  • Closing standardization gaps
    • OpenID Connect, @ManagedExecutorDefinition, UUID as entity keys, more SQL support, multipart/form-data, @ClientWindowScoped, @View
    • Core Profile
  • Deprecation/removal
    • EJB Entity Beans, embeddable EJB container, deprecated Servlet/Faces/CDI features

10 of 31

Jakarta EE 10 at a Glance

Authorization 2.1

Activation 2.1

Batch 2.1

Connectors 2.1

Mail 2.1

Messaging 3.1

Enterprise Beans 4.0

RESTful Web Services 3.1

JSON Processing 2.1

JSON Binding 3.0

Annotations 2.1

CDI Lite 4.0

Interceptors 2.1

Dependency Injection 2.0

Servlet 6.0

Server Pages 3.1

Expression Language 5.0

Debugging Support 2.0

Standard Tag Libraries 3.0

Faces 4.0

WebSocket 2.1

Enterprise Beans Lite 4.0

Persistence 3.1

Transactions 2.0

Managed Beans 2.0

CDI 4.0

Authentication 3.0

Concurrency 3.0

Security 3.0

Bean Validation 3.0

Updated

Not Updated

New

Platform

Web Profile

Core Profile

11 of 31

Jakarta Concurrency

  • Adding @ManagedExecutorDefinition, @ManagedScheduledExecutorDefinition, etc
  • CDI based, modernized equivalent for EJB @Asynchronous
  • Support for managed CompletionStage, ForkJoinPool, and parallel streams
  • CRON-like triggers

12 of 31

@ManagedExecutorDefinition

@ContextServiceDefinition(

name = "java:app/concurrent/AppContextOnly",

propagated = APPLICATION,

cleared = { TRANSACTION, SECURITY },

unchanged = ALL_REMAINING)

@ManagedExecutorDefinition(

name = "java:app/concurrent/MyExecutorService",

context = "java:app/concurrent/AppContextOnly",

maxAsync = 5)

...

@Resource(name = "java:app/concurrent/MyExecutorService")

private ManagedExecutorService executor;

13 of 31

@Asynchronous

@Asynchronous(executor = "java:app/concurrent/MyExecutorService")

public CompletableFuture<Confirmation> processPayment(Order order) {

try {

...

Confirmation status = ...;

return Asynchronous.Result.complete(status);

} catch (...) {

throw new CompletionException(x);

...

}

paymentService

.processPayment(order)

.thenAccept(

confirmation -> System.out.println(confirmation));

14 of 31

Jakarta REST

  • Standalone bootstrap API
  • Support for multipart/form-data
  • @Context deprecated in preparation for better alignment with CDI
  • Better support for HTTP cookies
  • Better default exception mapping

15 of 31

Bootstrap API

SeBootstrap.Instance instance = SeBootstrap.start(new Application() {

@Override

public Set<Class<?>> getClasses() {

return Collections.singleton(GreetingResource.class);

}

}).toCompletableFuture().get();

try (Client client = ClientBuilder.newClient()) {

final Response response = client.target(instance.configuration()

.baseUriBuilder().path("greet/World"))

.request().get();

System.out.println(response.readEntity(String.class));

}

instance.stop().toCompletableFuture().get();

16 of 31

multipart/form-data

@Path("/apply")

@POST

@Consumes(MediaType.MULTIPART_FORM_DATA)

public Response applyForJob(

@FormParam("name") String name,

@FormParam("recentPhoto") EntityPart photo,

@FormParam("resume") EntityPart resume) {

processApplication(name,

photo.getMediaType(), photo.getContent(),

resume.getMediaType(), resume.getContent());

return Response.ok("Application received").build();

}

17 of 31

Jakarta Security

  • OpenID Connect support
  • Serializable principal
  • Generics, default methods, exception cause added to Jakarta Authentication
  • Generic type added to Jakarta Authorization

18 of 31

@OpenIdAuthenticationDefinition

@OpenIdAuthenticationDefinition(

providerURI = "https://accounts.google.com",

clientId = "${config.clientId}",

clientSecret = "${config.clientSecret}",

redirectURI = "${baseURL}/callback",

redirectToOriginalResource = true

)

19 of 31

Jakarta Persistence

  • Support for UUID for keys
  • CEILING, EXP, FLOOR, LN, POWER, ROUND, SIGN added to JPQL
  • LOCAL DATE, LOCAL DATETIME, and LOCAL TIME added to JPQL
  • EXTRACT added to JPQL
  • EntityManagerFactory/EntityManager extends AutoCloseable

20 of 31

UUID Key

@Entity

public class Item {

@Id @GeneratedValue(strategy=GenerationType.UUID)

private java.util.UUID id;

private String description;

...

}

21 of 31

Jakarta Faces

  • @ClientWindowScoped
  • Pure Java Programmatic @View
  • Automatic extensionless mapping

<context-param>

<param-name>jakarta.faces.AUTOMATIC_EXTENSIONLESS_MAPPING</param-name>

<param-value>true</param-value>

</context-param>

  • type attribute in <h:inputText>

<h:inputText type="email"/>

  • multiple and accept attributes in <h:inputFile>

<h:inputFile value="#{bean.files}" multiple="true" accept="image/jpeg,image/png,image/gif"/>

  • layout="list" for <h:selectManyCheckbox> and <h:selectOneRadio>
  • onerror attribute in <f:websocket>

<f:websocket channel="push" onerror="errorListener" onclose="closeListener"/>

  • <f:selectItemGroups> and <f:selectItemGroup>
  • Removal of JSP support, managed beans

22 of 31

Pure Java Faces View

@View("/hello.xhtml") @ApplicationScoped

public class Hello extends Facelet {

...

HtmlForm form = components.create(HtmlForm.COMPONENT_TYPE);

body.getChildren().add(form);

HtmlOutputText message = components.create(HtmlOutputText.COMPONENT_TYPE);

form.getChildren().add(message);

HtmlCommandButton actionButton = components.create(HtmlCommandButton.COMPONENT_TYPE);

actionButton.addActionListener(e -> message.setValue("Hello, World"));

actionButton.setValue("Do action");

form.getChildren().add(actionButton);

...

}

23 of 31

Core Profile

Possible

Updated

Not Updated

New

RESTful Web Services 3.1

JSON Processing 2.1

JSON Binding 3.0

Annotations 2.1

CDI Lite 4.0

Interceptors 2.1

Dependency Injection 2.0

24 of 31

CDI

  • CDI Lite targets Jakarta EE Core Profile and native compiled runtimes/build-time injection
  • CDI Lite excludes some features
    • Session/conversation scope, bean discovery mode = all, portable extensions, decorators, passivation
  • New build-compatible extensions API added as an alternative to portable extensions
  • Empty beans.xml means bean discovery mode = all annotated

25 of 31

Other Changes

  • Java SE 11 required; Java SE 17 supported
  • Batch
    • Formalize CDI beans as Batch artifacts
    • @Inject JobOperator
    • @BatchProperty supports more Java types, @BatchProperty in methods/constructors
  • JSON Binding
    • Polymorphic serialization/deserialization
  • JPMS support

26 of 31

Try it Now!

27 of 31

Jakarta EE 11 Themes

  • CDI Alignment
    • @Schedule, @Lock, @MaxConcurrency in Concurrency, @MessageListener in Messaging, @RolesAllowed, @RunAs in Security
    • Better CDI support in REST, Batch, Concurrency
  • Java SE Alignment
    • Adapting to Records
    • Bootstrap API for Messaging
    • Modularity, standalone TCKs
  • Closing standardization gaps
    • JWT/OAuth alignment, batch job definition Java API, @Service
  • Supersede/deprecate
    • EJB
  • Innovation
    • NoSQL, MVC, Configuration, Repositories, gRPC

28 of 31

Ways of Contributing

  • Follow Jakarta EE technologies that interest you and share opinion
  • Advocate for a specific change or feature
    • https://jakarta.ee/projects/
  • Help implement a change in API, specification, TCK or implementation
    • Sign Eclipse Contributor Agreement
    • https://www.eclipse.org/legal/ECA.php
    • Becoming a committer comes much later
  • Engage an Ambassador if needed

29 of 31

Summary

  • Jakarta EE 8, 9, 9.1 very significant for the future of Java
  • Many important changes for Jakarta EE 10 and beyond
  • Jakarta EE 11 work already started - time to get involved is now!

30 of 31

Resources

  • JakartaOne Livestream recordings
    • https://jakartaone.org
  • Jakarta EE Community alias
  • Jakarta EE Twitter handle
    • @JakartaEE
  • Jakarta Tech Talks

31 of 31