Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Global Transaction management using spring + hibernate

 
sourabh girdhar
Ranch Hand
Posts: 71
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,Solomon,

Can you please put some light on managing global transactions using hibernate with spring.

It becomes quite cumbersome when you use hibernate .

I want to know if there are soem best practices to manage by using spring with hibernate.

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sourabh girdhar wrote:Hi Paul,Solomon,

Can you please put some light on managing global transactions using hibernate with spring.

It becomes quite cumbersome when you use hibernate .

I want to know if there are soem best practices to manage by using spring with hibernate.



Can you be a little more specific. What do you mean by a global transaction, and how is Hibernate making it cumbersome.

Mark
 
sourabh girdhar
Ranch Hand
Posts: 71
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the scenario where in my application has two databases.

I want to add transaction management to the operation which updates both the databases..

One of them is Sybase and other is MYSQL.

 
Ganesh Gowtham
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Use HibernateTransactionManager either programatically (or) declaratively in XMl based on your needs

http://static.springsource.org/spring/docs/1.1.5/api/org/springframework/orm/hibernate/HibernateTransactionManager.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic