| Author |
Need understanding of "Transaction associated with a Client"
|
Mohit G Gupta
Ranch Hand
Joined: May 18, 2010
Posts: 634
|
|
Source:13.6.1 Bean-Managed Transaction Demarcation
As mentioned in the above topic:
The actions performed by the container for an instance with bean-managed transaction are summarized
by the following table. T1 is a transaction associated with a client request, T2 is a transaction that is cur-rently associated with the instance (i.e. a transaction that was started but not completed by a previous
business method).
As per my understanding,T2 is transaction that was started using ut.begin()(ut is instance of UserTransaction interface) in Bean class but was not committed or roll-backed.
However,I am not able to understand T1 .
Question 01:what does" T1 is a transaction associated with a client request" exactly means ?
Question 02:Can someone give or refer a example explaining the same ?
|
OCPJP 6.0 93%
OCPJWCD 5.0 98%
|
 |
Frits Walraven
Rancher
Joined: Apr 07, 2010
Posts: 1042
|
|
Hi Mohit,
Question 01:what does" T1 is a transaction associated with a client request" exactly means ?
It just means that the client is associated with a transaction. For instance a Container Managed Stateless Session Bean running under a transaction (T1) calling a Bean Managed Stateless Session bean being associated with another transaction (T2 can only come from a Stateful Session Bean).
Bottom line is: the Client's transaction is always suspended when it comes to BMT beans, even if the client is another BMT bean (as opposed to CMT beans, they can run under a transaction started from a CMT bean or even from a BMT bean (see example in my notes 5.4.4))
Regards,
Frits
|
 |
Mohit G Gupta
Ranch Hand
Joined: May 18, 2010
Posts: 634
|
|
|
Thanks Frits
|
 |
 |
|
|
subject: Need understanding of "Transaction associated with a Client"
|
|
|