1. before- and after-Completion
2. in the current transaction
3. after db, I think
I am using Websphere as the application server.
2. I went through the hibernate source code and found that hibernate gets the user transaction via JNDI lookup. The transaction used is com.ibm.ws.Transaction.JTA.UserTransactionImpl .
On the other hand, tree cache gets the transaction by calling transactionManager.getTransaction(). In tree cache logs, i see a line "removing local transaction com.ibm.ws.Transaction.JTA.TransactionImpl@1dc13f29#tid=1 and global transaction <10.164.32.30:2517>:1"
As you can see these two transaction instances are different, this point is confusing me. I am unable to understand how treecache is notified on commit of hibernate transaction.
4. There can be two scenarios -
a) Cache Replication is performed parallel to database commit
- In this scenario both the local and replicated cache has to be rolled back.
b) Cache Replication is performed after database commit.
- In this scenario only local cache has to be rolled back.
What do u think how its been implemented a or b.