This example demonstrates the use of the EJB 3.1 @Asynchronous annotation in an EJB class or specific method. In EJB 3.1, session beans support asynchronous method invocations. Bean methods annotated with @Asynchronous are invoked asynchronously. When a client invokes methods with the @Asynchronous annotation, the container immediately returns control to the client and invokes the method in a different thread. The method may return a future object to allow the client to check on the status of the method invocation, and retrieve result values that are asynchronously produced. EJB 3.1 supports this feature by using Future, which is part of standard java concurrency. Future represents the result of an asynchronous computation.
Release Date: 06-Sep-12
Duration: 45 minutes
Credited To: Anjana Shenoy
No Flash Plugin Needed