File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Need understanding of Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Need understanding of "Transaction associated with a Client" " Watch "Need understanding of "Transaction associated with a Client" " New topic
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
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1669
    
  25

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need understanding of "Transaction associated with a Client"