This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why not usertransaction instead of SessionSynchronization in SessionBean

 
Sanju
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In Session Bean we can use SessionSynchronization. Why not usertransaction instead of SessionSynchronization? what is the major advantages SessionSynchroniation interface?

Regards,
Sanju.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanju,

The SessionSynchronization interface is used with BMT and allows you to synchronize the instance variables with their corresponding values in the database. UaserTransaction interface on the other hand, is used with BMT and gives you the control over the transaction boundaries. You can have multiple (linear not nested) transactions starting and ending within the same method if you want, etc. This type of granularity you cannot achieve with BMT.
Regards.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please correct this:

The SessionSynchronization interface is used with BMT

With:
The SessionSynchronization interface is used with CMT
Sorry...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic