Asynchronous processing in EJB 3.1 and 3.2

Before Java EE 6 the only asynchronous processing facility in Java EE was JMS (Java Message Service) and MDBs (Message Driven Beans) in which a session bean method could send a JMS message to describe a request and then let an MDB process the request in an asynchronous manner. Using the JMS and MDBs the session bean method could return immediately and the client could check for the request completion using the reference returned by the method for the long running operation being handled by some MDBs.

The above solution works well, as it has worked for a decade now, but it is not easy to use and that was the reason for Java EE 6 to introduce the @Asynchronous annotation to annotate a method in a session ...

Get Developing RESTful Services with JAX-RS 2.0, WebSockets, and JSON now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.