Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

transaction registerSynchronization()  RSS feed

 
Dushy Inguva
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

I am using EJB CMT and deep inside my call stack, I need to register a synchronization. How do I get access to javax.transaction.Transaction ? Since I am doing CMT, using UserTransaction is out of the window.

I could make my ejbs implement SessionSynchronization, and provide a registering mechanism, bind the register to a thread local variable. But thats a lot of work.

I was wondering if there is a way for an arbitrary method to lookup the current javax.transaction.Transaction object.
 
Dushy Inguva
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I looked at the spec and realized that a stateless session bean CANNOT implement SessionSynchronization interface. So, what options do I have to get a notification about the transaction from the stateless session bean with CMT ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!