uCosminexus Service Platform, Overview

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

2.3.3 Transactions when using Session Bean

The following figure shows the transactions when a Session Bean is used.

Figure 2-30 Transactions when a Session Bean is used

[Figure]

When you use a Session Bean, operations are performed within the HCSC server with a CMT (Container Managed Transaction). Also, the transaction attribute of standard reception (Session Bean) is Required. Therefore, if the service requester invokes standard reception (Session Bean) of the HCSC server within the transaction scope, the transaction context is inherited on the HCSC server. Then, the process within the HCSC server enters the transaction scope at the service requester side. On the contrary, if the service requester invokes standard reception (Session Bean) of the HCSC server outside the transaction scope, a new transaction starts on the HCSC server.

Note that the transaction attribute of the service component must be RequiresNew or NotSupported. Therefore, the transaction is not inherited in the service component. For details about whether you can specify the transaction attribute of service components using a Session Bean, see 2.6.2 Applicable scope of service components using a Session Bean in the Service Platform Basic Development Guide.

A business process operates by using a BMT (Bean Managed Transaction). The business process itself is controlled by using a new transaction. If you invoke a business process, each service component invocation process defined in the invoke service activity of the business process is controlled by using a new transaction. Therefore, even when the service requester invokes standard reception (Session Bean) of the HCSC server within the transaction scope, the transaction is not inherited up to the service adapter. The following figure shows the transactions passing through the business process.

Figure 2-31 Transactions passing through the business process

[Figure]

For persistent business processes, see the description of the transactions during execution of business processes in 3.4 Transaction of a business process.