+

Search Tips   |   Advanced Search

EJB 3.1 asynchronous methods

The Enterprise JavaBeans™ (EJB) 3.1 specification includes functionality that application developers can use to configure EJB asynchronous methods, which are run on a separate thread from the caller thread.

This mechanism decouples the client invocation request from the actual method execution. The client thread can continue doing other work while the EJB method is run on a separate thread, as directed by the EJB container.

Later, the client might want to examine the result of the asynchronous method execution, which is sometimes referred to as fire and return. In this case, the EJB container returns to the client an object that implements the java.util.concurrent.Future<V> interface. The client can use this object to check status, results, or exceptions from the asynchronous method invocation. Alternatively, asynchronous methods might not return any results, which is sometimes referred to as fire and forget.

For more details, see information about how to use EJB asynchronous methods in the application.

Here are some example usage scenarios for EJB asynchronous methods:


Related concepts

  • Client programming model for EJB asynchronous methods
  • Bean implementation programming model for EJB asynchronous methods
  • EJB container work manager for asynchronous methods


    Related tasks

  • Configure EJB 3.1 session bean methods to be asynchronous