• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need understanding of "Transaction associated with a Client"

 
Mohit G Gupta
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2453
97
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 634
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Frits
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic