This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Managing hibernate transactions involving sessions from multiple sessionFactories Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Managing hibernate transactions involving sessions from multiple sessionFactories" Watch "Managing hibernate transactions involving sessions from multiple sessionFactories" New topic
Author

Managing hibernate transactions involving sessions from multiple sessionFactories

benjamin muktesh
Greenhorn

Joined: Jul 01, 2008
Posts: 24
I am trying to wrap transactions spanning multiple databases in a JtaTransactionManager.
I am using JOTM to get instance of a userTransaction



my understanding here is that i dont need to make my sessionFactory aware of what transaction management strategy i am using.
Also if i need to make piece of code atomic i just mark the method as @Transactional.

Somehow this approach fails miserably and my transactions are not being rolled back.
Any insight or help is greatly welcome

Thanks
benjamin muktesh
Greenhorn

Joined: Jul 01, 2008
Posts: 24
Never mind.
I switched to Atomikos and it worked like a dream.
 
Don't get me started about those stupid light bulbs.
 
subject: Managing hibernate transactions involving sessions from multiple sessionFactories
 
Similar Threads
Spring transaction rollback aop config
Spring/Hibernate/Jboss/JTA/getCurrentSession()/createQuery is not valid without active transaction
Transaction demarcation works with TransactionProxy but not AOP
Memory Issue
Transaction doesn't rollback