Hi All,
hopefully somebody can give me some pointers as i've found very little info and this combination.
We're implementing a system that stores data on an Oracle database through a hibernate backed persistence service that is backed by Jini. Jini has a transaction manager that we would like to be in control. However i'm having a bit of trouble hooking hibernate to that transaction manager.
I've currently made a ConnectionProvider that uses an XA datasource and registers that connection with the transaction.
I've made a TransactionManager that supplies JTA Transactions. Those transactions are then added as transactionparticipants to the jini transaction manager. Hibernate seems to register its cache/flushable thing (don't know the right term at the moment) as a synchronization on the jta transaction. When calling that synchronization as a part of the prepare of the two-phase commit hibernate seems to write everything to the database. We then call the XAresource.prepare from the XAConnection. On the commit we call the commit from the XAResource.
It seems to work intermittently and i'm however a brainfreeze on how to make this more stable and working better. I'm having the feeling i'm doing to much work to get this working.
Does anybody have any ideas for me to try out? When it all works i'll post the final code on the board as i think this will benefit anybody who wants to combine hibernate and jini...
Thanks in advance for all ideas and helpfull criticisms....
Regards,
Robert
|