What to Expect From Jakarta Concurrency 3.1 With Jakarta EE 11?

Jakarta EE

The upcoming release of Jakarta EE 11 is expected to feature a number of updated specifications. One of the key updates expected in this release is to Jakarta Concurrency, which will be advancing to version 3.1. This update is set to bring a host of new features and improvements aimed at making concurrent programming in Jakarta EE even more powerful and flexible.

What is Coming With Jakarta Concurrency 3.1

1. Simplified Scheduling with @Schedule Annotation

Jakarta Concurrency 3.1 introduces the @Schedule annotation for scheduling the automatic execution of asynchronous methods. The annotation features support for both cron expressions and literal definitions of the execution time based on parameters. 

2. Integration with Java 9 Flow and Reactive Streams

With support for Java 9 Flow and Reactive Streams, you can now leverage the power of asynchronous, reactive data processing in your Jakarta EE applications. This integration opens up new possibilities for building responsive and efficient systems. 

3. Dependency Injection for Concurrency Resources

The new spec introduces support for Dependency Injection (DI) by making ManagedExecutorService and ContextService available as injectable CDI beans. This simplifies resource management and promotes cleaner, more testable code. You can now do @Inject on those resources without any fanfare. 

4. Virtual Threads 

One of the most anticipated features in Jakarta Concurrency 3.1 is the support for virtual threads, particularly when running on Java SE 21. In this release, virtual threads can be requested in place of platform threads within the @ManagedThreadFactoryDefinition, @ManagedExecutorDefinition, and @ManagedScheduledExecutorDefinition annotations through the virtual boolean parameter. 

This feature significantly enhances the concurrency model in Jakarta EE. However, it’s important to note that there are technical considerations regarding whether the executor can always create virtual threads as requested, depending on the environment and the specific use case. We encourage you to review the JavaDoc for detailed guidance on implementing virtual threads within your applications.

For those interested in exploring the potential of virtual threads further, be sure to check out our in-depth blog post by our resident concurrency expert, where we dive deep into the implications and use cases of virtual threads in a managed runtime environment like Jakarta EE.

And More – Stay Tuned!

In addition to these highlights, this release also comes with several improvements, bug fixes and enhancements.  As part of the upcoming Jakarta EE 11 release, this update will play a critical role in modernizing enterprise Java applications and making them more robust and scalable.

Jakarta Concurrency 3.1 is expected to be released with Jakarta EE 11 later this year, 2024. In the meantime, you can take it for a spin on Payara Server 7 alpha 1. Join the project discussions on GitHub and the mailing list to stay updated on the latest developments as we approach the final release.  Happy Coding!

 

Comments (0)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

Related Posts

Payara promotional graphic showing transition from Spring to Jakarta EE, including technology logos, a code icon and arrows leading from Spring to Jakarta EE. 6 minutes
Jakarta EE

From Spring Boot To Jakarta EE 11: How Payara Starter Eases The Transition

If you’ve been living in the Spring ecosystem, you’re used to fast project setup. Spring Initializr gives you a […]

payara qube logo 2 minutes
News

Enterprise Java Deployment Simplified with Payara Qube’s New, Unified Offering

Payara Services, a leading vendor of enterprise Java technologies, is aligning Payara Cloud with the Payara Qube Java application […]

Graphic promoting the Jakarta EE Agentic AI Project by Payara Community. The design shows a laptop screen with a central icon of a person wearing headphones and using a laptop, surrounded by sparkles. The background features blue ocean-themed elements with coral and small fish. Logos for Jakarta EE and Payara Community appear at the top. 3 minutes
Community

Announcing the Jakarta Agentic AI Project

Exploring the Future of AI with the Jakarta EE Community At Payara, we’re passionate about pushing the boundaries of […]