views:

25

answers:

1

I find that in a session bean, while using Container-Managed-Transactions, the transaction can be made to join with the existing client-transaction using transactional attributes like REQUIRED / SUPPORTS.

While using Bean-Managed-Transaction, is there a way to make that transaction join with the existing client-transaction ?

+2  A: 

No (See § 13.6.1 and § 13.6.2 in the spec).

But why would you do that anyway? If the bean is meant to join a transaction started somewhere else, just make if CMT with REQUIRED. It's the same situation when a BMT bean whan to call another bean. The BMT bean controls the transaction demarcation, and the other bean uses CMT to join the transaction.

Note also that in the spec, the term "client" refers to the caller of a bean, it can be another bean, a stand-alone client, or external client (e.g. web service request).

ewernli
+1 to the point!
Pascal Thivent