File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Global Transaction management using spring + hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply 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: 17234
    
    1

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: 223



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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Global Transaction management using spring + hibernate
 
Similar Threads
HibernateTemplate
Nested Transactions
Any Simple Example on Spring with Hibernate
Is this right architecture
Problem with @Transactional (Transaction is not getting rollbacked)