This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction propagation in EJB

 
Murali Pen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Murali Pen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I have changed it. Can somebody please answer my questions?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic