-
1. Re: From EJB 3.2 : EJB @Asynchronous vs EJB Concurrency Utilities in Java EE 7 -ManagedExecutorService
wdfink Dec 28, 2013 10:14 AM (in response to masummymesingh)In short, @Asynchronous is a annotation (EE6) to mark an EJB method as async.
You can invoke the method and keep the future object to check whether the method is finished and get the result.
The EJB Concurrency Utilities are provided to have a save way in EE7 to delegate work to a parallel thread.
Threads started by this ConcurrentUtilities are managed by the container.
In difference to a direct start of a Thread (which is not allowed for an EE application)
There is less overhead than using @Async and you have a bit more control.
A good resource to get started is the Oracle EE7 Tutorial. Also Adam Bien's blog or a JavaOne presentation from Anthony Lai
-
2. Re: From EJB 3.2 : EJB @Asynchronous vs EJB Concurrency Utilities in Java EE 7 -ManagedExecutorService
emmartins Jan 9, 2014 8:59 PM (in response to masummymesingh)EJB with @Asynchronous defines that *all* invocations of it are done asynchronously, the invoker has no control of that, and these invocations are done using an executor chosen by *the container*. In short it is an asynchronous invocation mandated by the invocation *target*.
If instead an EJB is invoked, through a task submitted to a managed executor service, then only that *single* invocation is asynchronous, and that invocation is done using the (managed) executor *the invoker* chooses. In short it is an asynchronous invocation mandated by the invocation *source*.
--E
-
3. Re: From EJB 3.2 : EJB @Asynchronous vs EJB Concurrency Utilities in Java EE 7 -ManagedExecutorService
masummymesingh Apr 26, 2014 12:46 PM (in response to wdfink)Hi all , i share my idea .
when complexity rate is high then use following feature based on this rating.
Complexity Rate
Feature
Based on
1
Servlet Asynchronous
java.util.concurrent
2
EJB Asynchronous
java.util.concurrent
3
Concurrency Utilities- EJB for Java EE
java.util.concurrent
4
Batch Processing in JAVA EE
run in parallel
5
MDB –Message Driven Bean
JMS
6
7