Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise programming model with use of virtual threads #1037

Open
edbratt opened this issue Feb 12, 2025 · 1 comment
Open

Revise programming model with use of virtual threads #1037

edbratt opened this issue Feb 12, 2025 · 1 comment
Labels
EE12 Issues being targetd for Jakarta EE 12

Comments

@edbratt
Copy link
Contributor

edbratt commented Feb 12, 2025

Is your feature request related to a problem? Please describe.
Simplify the programming model with Virtual Threads

Describe the solution you'd like
Jakarta EE 12 is proposed with a base Java version of 21. We should actively consider including more features that can simplify the programming model due to the fact that virtual thread will be available. We should consider areas in the platform where there are restrictions in programming model intended to steer developers away from blocking style code and platform management of threads. For example, some messaging patterns require the use of MDBs. In a virtual thread environment, code can be written to just call the messaging provider and the virtual thread can just wait (block) for the next message to become available. When it is available, continue with its work. Previously, this would be managed by an MDB or maybe with Inversion of Control. This requirement may be relaxed.

We can consider additional virtual thread enhancements however with the base JDK at 21, some of the more recent virtual thread enhancements may not be available.

@edbratt edbratt added the EE12 Issues being targetd for Jakarta EE 12 label Feb 12, 2025
@jhanders34
Copy link
Member

Virual threads aren't a magic bullet so I am happy that you are limiting it to particular scenarios. You can read more of what I am talking about in this article. It will be interesting as the technology improves how it can be used, but we may want to have options for users as well who do not want to use virtual threads to opt out of the use of virtual threads. Some of that can be making use of concurrency managed pools that may or may not be configured with virtual threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EE12 Issues being targetd for Jakarta EE 12
Projects
None yet
Development

No branches or pull requests

2 participants