I had a some questions regarding BMT.
1. How is the container managing the lifetime of the UserTransaction in the Context object? When is it created and when is it destroyed?
2. Does the UserTransaction propagate automatically when a BMT bean calls another BMT bean? And does it propagate when a BMT bean calls a CMT, and vice versa?
3. How can one specify the Transaction Attibute in the ejb-jar-xml for a BMT bean? Do we need to specify "Require" or something?
1. I guess you mean
ejb container does not manager the life time of UserTransaction. The Transaction service is offered by server. Container simply use it.
2. For a BMT to BMT call, the first BMT is considered as a client the second BMT, by spec, the The container suspend any trasaction associated with the client. So the transactin is not propagated.
3. Transacton attribute is for CMT only. BMT control the transaction by code not declaration.
Thanks,<br />Jack Zhou<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS,SCEA