2

Is there a way to propagate a transaction through an RMI call? At the moment I have a service annotated with @Transactional on the client side which uses an injected RMI proxy of a DAO (the implementation of the DAO runs on the server side, obviously). When I use the DAO I get a Hibernate exception ("Could not obtain transaction-synchronized session for current thread"), which makes sense as the DAO itself does not start a new Transaction. The only workaround I have a the moment is to start a new transaction on the server side (by adding @Transactional(propagation = Propagation.REQUIRED) to the DAO method).

Basically this boils down to whether someone has come up with a good answer to Spring Distributed Transaction Involving RMI calls possible? / Spring has added the distributed transaction support.

Btw.: I actually don't really need the transactional support as such, i.e. if this there is a way to get a hibernate session with some kind of dummy transaction without starting a new one explicitly on the server side I am happy as well.

Community
  • 1
  • 1
Ueli Hofstetter
  • 2,409
  • 4
  • 29
  • 52

0 Answers0