uCosminexus Application Server, EJB Container Functionality Guide
When a transaction is managed in CMT, transactions are managed by the container. In such cases, you can develop an application without implementing start and end of the transaction. In the management by a container, the transaction starts immediately before the start of the method and it is committed and ended immediately after the end of the method.
If you want to execute a specific processing before and after the start and end of a transaction by the container, use the Session Synchronization functionality. You can use the Session Synchronization functionality in either of the following methods:
You can use the method that specifies the annotation in EJB3.1 or later. If you specify annotations, you can set the timing of executing the process before and after the start and end of a transaction without implementing the javax.ejb.SessionSynchronization interface. This simplifies the development of the application.
This subsection describes the specifications when annotations are to be used. You can use the following annotations:
You can specify these annotations in the class of a Stateful Session Bean (or its parent class). With respective Session Beans, you can specify one of these annotations for each type.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.