uCosminexus Application Server, EJB Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

2.17.1 Applicability of asynchronous invocation of Session Bean

If you execute an asynchronous invocation for the Session Bean, the EJB container immediately returns the control to the client which is a source of invocation without waiting for the processing of the Session Bean. A method that receives the asynchronous invocation executes processing in a thread different from the source of invocation. On the client machine, throughput of the application improves because application moves to the next processing without waiting for the result.

You can execute an asynchronous invocation for a Session Bean containing the following EJB 3.1 compliant interfaces or views:

You can perform an asynchronous invocation by using the @Asynchronous annotation.

You can execute all the public methods in a Stateless Session Bean or Singleton Session Bean as asynchronous methods by using the @Asynchronous annotation.

Note that you cannot implement asynchronous methods with the method of a Stateful Session Bean because the session details and transaction status at the time of executing the asynchronous invocation are not retained.

The transmission of security information when an asynchronous invocation is executed is the same as that in the case of a synchronous invocation.