Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting TransactionManager

 
prashanth nagaraj
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone provide me some example code , to how to get the object of javax.transaction.TransactionManager using hibernate apis (or any alternate means) in Websphere Appserver. From TxManager , I need to get the javax.transaction.Transaction object. The thing is the TxManager invokes call back beforeCompletion and afterCompletion methods. For this , we need to implement the interface javax.transaction.Synchronization interface and override beforeCompletion and afterCompletion methods. The class that implements Synchronization interface has to be registered by passing the object to Transaction.registerSynchronization method. Since I am not getting TransactionManager object , the above functionality is failing in my application. This works fine in Weblogic , problem is with Websphere only. Can anyone tell me any alternate means of getting the TranactionManager object.
thanks
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!