|
From: <jue...@we...> - 2004-12-09 10:24:18
|
Actually, there seems to be a pretty straightforward solution: I've = added a check whether there is a SessionHolder bound to the current = thread, only invoking "unbindResource" if found. Else, the SessionHolder = is simply left bound to the thread: It's empty anyway, as the = synchronization code will have removed and closed the transactional = Session. The next data access operation on that thread will simply reuse = the same SessionHolder, adding a new Hibernate Session to it. =20 I've attached a refined version of SessionFactoryUtils.java to the JIRA = issue. Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Do 09.12.2004 10:45 An: spr...@li... Betreff: [Springframework-developer] Spring JTA synchronization in a = remote transaction propagation scenario Does someone have experience with using Spring's JTA synchronization, in = particular the Hibernate Session synchronization, in a remote = transaction propagation scenario? That is, one server starts and ends = the transaction but the actual data access happens on other servers that = participate in the transaction. The problem is that the synchronization callbacks get executed on each = server, but in a different thread than the one that performed the data = access (triggered by JTA commit, which sends a remote call to each = participating server to execute the synchronizations). So Spring's = synchronization implementation can't find the thread-bound Hibernate = Session anymore, which leads to an IllegalStateException. Have a look at the corresponding JIRA issue: http://opensource.atlassian.com/projects/spring/browse/SPR-532 Any input is greatly appreciated! Juergen ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |