You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Annotation to define max concurrency for access to a method or bean. This was first mooted on the EJB spec but adding to concurrency would mean this could be used generally across the platform.
If we have the new Async annotation I think we can have a very simple definition with just a single attribute for maxConcurrency and rely on Semaphore isolation. As the new Async annotation allows the developer to specify the specific ExecutorService which can be configured to have a maxAsync. Thread isolation can be acheived using the Async annotation and a ExecutorService with a configured maxAsync
It seems like the most important part of this is already covered by Asynchronous/executor with maxAsync, and all that remains is semaphore isolation. I am wondering what the value is of providing a @MaxConcurrency to enforce sempahore isolation when a user can already do that with java.util.concurrent.Sempahore and other classes of java.util.concurrent. How much benefit does the user get from having the Jakarta EE product provider hold onto the semaphore for them and automatically invoke it upon entry and exit from methods of a class? Is there more to this that I am not aware of?
Annotation to define max concurrency for access to a method or bean. This was first mooted on the EJB spec but adding to concurrency would mean this could be used generally across the platform.
See javaee/ejb-spec#9
Also see https://download.eclipse.org/microprofile/microprofile-fault-tolerance-2.1/apidocs/org/eclipse/microprofile/faulttolerance/Bulkhead.html
The text was updated successfully, but these errors were encountered: