• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Transaction propagation in EJB

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I have changed it. Can somebody please answer my questions?
 
The knights of nee want a shrubbery. And a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic