I have created a Hibernate interceptor which has overridden the EmptyInterceptor callback methods afterTransactionBegin(Transaction) and afterTransactionCompletion(Transaction).
I have found that the interceptor methods I listed above are never called when a transaction is initiated and closed. I have validated that other callback methods are called: beforeTransactionCompletion(Transaction), instantiate(...), preFlush(..), onPrepareStatement(...), etc...
I am somewhat puzzled over this. Anyone have any ideas what would cause beforeTransactionCompletion(...) to be called, but not afterTransactionCompletion(...) or beforeTransactionBegin(...)?
Some details (let me know if you need more):
I have registered this interceptor declaratively in the persistence.xml file:
Code:
<persistence-unit name="coreArchive" transaction-type="JTA">
<properties>
<property name="hibernate.archive.autodetection" value="none" />
<property name="hibernate.ejb.interceptor"
value="my.package.MyInterceptor" />
</properties>
</persistence-unit>
I am using WebLogic 9.1 and Spring2 to manage the transactions. I am also using Spring's WebLogicJtaTransactionManager to manage the transactions.
Any suggestions greatly appreciated!
-Kyle
Code: