|
From: Costin L. <cos...@ya...> - 2005-09-08 11:59:02
|
Hello Disclaimer: I'm not proficient with the internals of (global) transactions, resource adapters so please excuse my mistakes if I make any. I'm working on an some code to integrate JackRabbit (JSR-170) with Spring (and make it part of Spring modules in the end). I've got some problems with transaction support because the current implementation offers an XA resource to work which ofc requires an Xid and everything; having a javax.transaction.Transaction would have been much better (the existing Hibernate TMs are very good leads - actually the initial code I worked on emulating transaction using the JCR session methods refresh and save (think of them as Hibernate Session saveOrUpdate and clear()). I tried to look through the Spring sources in order to see a best practice of how an XA resource should be handled inside a transaction manager but I didn't find anything. Right now the solution seems to be creating a wrapper transaction manager (maybe by subclassing JtaTransactionManager) specific to JackRabbit (to acquire the XAResource) which will enlist/delist the XAResource to the delegated/parent transaction manager but I feel like I'm missing something here; that I've should have found something already inside the Spring package. Any help/hints/links appreciated. -- Regards, Costin Leau |