uCosminexus Application Server, EJB Container Functionality Guide
BMT is a model that performs transaction management in an Enterprise Bean. The BMT target is the Session Beans and the Message-driven Beans (BMT does not target the Entity Beans, the CMT target is always Entity Beans).
During BMT, use javax.transaction.UserTransaction in the business methods of the Enterprise Bean and perform the following operations:
In a Stateless Session Bean, one transaction needs to be concluded (committed or rolled back) in one business method. In a Message-driven Bean, a transaction needs to be concluded (committed or rolled back) in one of the following methods: The methods differ depending on the versions of EJB.
On the other hand, in a Stateful Session Bean, many business methods can be included in a single transaction scope. At this point, the EJB container maintains the relationship between the Bean instance and the transaction. The following figure shows the Stateful Session Bean in BMT:
Figure 2-6 Stateful Session Bean in BMT
Table 2-17 Transaction control in BMT
Client-side transactions | Transactions of Bean instance | Transactions connected to the methods |
---|---|---|
-- | -- | -- |
T1 | -- | -- |
-- | T2 | T2 |
T1 | T2 | T2 |
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.