Hi,
I'm using JTATransactionManager and JDK 5 annotations to manage transactions with hibernate, using Spring 2.0.5.
I would like to be able to hook in some custom code just before the database commit is called. I could use the hibernate event listener framework, but that is called on updates to the individual POJO entities - I want my code to run just once towards the end of the transaction.
As an added bit of complexity - my code must run within the transaction - i.e., it does some database work (via hibernate again) of its own.
I attempted doing this with AOP, wiring an aspect around AbstractPlatformTransactionManager.commit(Transact ionStatus) but this resulted in a circular depency at spring startup around the hibernate session factory bean.
Any ideas on how I can accomplish this?
Thanks,
Ishaaq


Reply With Quote