Originally posted by gowher amin naik:
what is reason behind "only session bean with BMT can keep transaction open at the end of a method"?
Only STATEFUL session beans with BMT can keep a transaction open at the end of a method!
Remember, stateless and message driven beans(MDBs) are pooled, so two method calls to these types of beans might be served by two different instances! That's why transactions should be closed (commited/rolled back) before your method ends.
If you have a STATEFUL bean, then you have a "conversational state". Every method call will be served by the same instance, therefore with BMT it's possible to keep transactions open between method calls!
If you have container managed transaction(CMT), then all the transactions will last for the time of a method call. They begin when your method starts, and end when your method ends. This is maintained explicitly by the container.
Correct me if i was wrong!
Andor N�meth