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 your application.
Here are some example usage scenarios for EJB asynchronous methods:
In this example, presumably the application does not need to check for results from these method calls. Perhaps this is handled by the home office employee who picks up the sales reports from a printer the next morning. Suppose that one of the branch stores failed to provide the requested report. The person collecting the reports can decide if that was expected, for example, the branch store was closed for renovations, or if the get sales report request must be reissued to that branch store.