permaculture playing cards*
The moose likes Spring and the fly likes Global Transaction management using spring + hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Global Transaction management using spring + hibernate" Watch "Global Transaction management using spring + hibernate" New topic
Author

Global Transaction management using spring + hibernate

sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

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.


SCJP SCWCD AIX SOA
The significant problems we face cannot be solved by the same level of thinking that created them -- Albert Einstein

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

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

Joined: Mar 30, 2005
Posts: 225



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


Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Global Transaction management using spring + hibernate
 
Similar Threads
HibernateTemplate
Nested Transactions
Is this right architecture
Problem with @Transactional (Transaction is not getting rollbacked)
Any Simple Example on Spring with Hibernate