• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Persistence with Hibernate - Transaction contexts across remote calls

 
Tauri Valor
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Fisher
author
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic