aspose file tools*
The moose likes Spring and the fly likes Spring Persistence with Hibernate - Transaction contexts across remote calls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Persistence with Hibernate - Transaction contexts across remote calls" Watch "Spring Persistence with Hibernate - Transaction contexts across remote calls" New topic
Author

Spring Persistence with Hibernate - Transaction contexts across remote calls

Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
Hi Paul,

Most Application Servers support propagation of transaction contexts across remote calls, but the Spring Framework / Spring Container does not support propagation of transaction contexts across remote calls, so do you think theres any alternative other than EJB ?

Does the book talk about distributed transactions spanning multiple databases?

Thanks,
Tauri.


A Moment's insight is sometimes worth a Life's experience.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

The answer lies in responsibility. In an app server what is responsible for handlig these transactions, and that is the transaction manager. JTA Transaction manager. Spring can use a JTA Transaction manager and run in an app server. So in essence my point is, it isn't Spring's responsibility to do this. It is the server and tm which Spring gladly participates without having to do any jumping through hoops.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Paul Fisher
author
Greenhorn

Joined: Jul 06, 2010
Posts: 23
Distributed transactions are not a primary focus of the book, but Spring is able to work with both local and distributed transactions — without requiring any code changes. This is one of the advantages of Spring: you are able to decouple these types of concerns to a matter of configuration. You can leverage JTA vs a local transaction provider simply by updating your Spring configuration.

--Paul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Persistence with Hibernate - Transaction contexts across remote calls