wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Transaction propagation in EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction propagation in EJB" Watch "Transaction propagation in EJB" New topic
Author

Transaction propagation in EJB

Murali Pen
Greenhorn

Joined: May 23, 2006
Posts: 28
I have some questions about transaction propagation between the client and EJB. Can someone clarify the following scenarios? Assume the client is a Web tier client like servlet in all the scenarios described.

1) Stateless Session Bean CMP

Scenario 1:

Client starts transaction
Invokes bean method with Required transaction attribute
Client ends transaction

Scenario 2:

Client starts transaction
Invokes bean method with NotSupported or no transaction attribute
Client ends transaction

Question: Is the bean method part of client transaction in the above scenarios?

2) Stateless Session Bean BMP

Scenario 1:

Client starts transaction
Invokes bean method with user transaction in it
Client ends transaction

Scenario 2:

Client starts transaction
Invokes bean method without any user transaction in it.
Client ends transaction

Question: Is the bean method part of client transaction in scenario 2?

3) Stateful Session Bean CMP

Scenario 1:

Client starts transaction
Invokes bean method with Required transaction attribute
Client ends transaction

Question: Is the bean method part of client transaction in the above scenarios? For stateful session bean, the container transaction ends when the bean method finishes. When does it end in the above scenario?

Scenario 2:

Client starts transaction
Invokes bean method with NotSupported or no transaction attribute
Client ends transaction

Question: Is the bean method part of client transaction in the above scenario?

4) Stateless Session Bean BMP

Scenario 1:

Client starts transaction
Invokes bean method1 that starts user transaction
Invokes bean method2 that ends user transaction
Client ends transaction

Scenario 2:

Client starts transaction
Invokes bean method1 which has no user transaction
Client ends transaction

Question: What is the transaction propagation in the above 2 scenarios?


Murali
SCJP,SCBCD,SCWCD
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

"Porphyro"

Please click on the My Profile link above and change your display anme to match the JavaRanch Naming Policy of using your real first and real last names.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Murali Pen
Greenhorn

Joined: May 23, 2006
Posts: 28
Ok, I have changed it. Can somebody please answer my questions?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transaction propagation in EJB