Steve,
If I define the following in my hibernate-service.xml file :
Code:
<attribute name="SessionFactoryInterceptor">com.adcware.rcs.util.AuditLogInterceptor</attribute>
How do I get the interceptor from my session facade method such that I can set the hibernate session on the interceptor?
My session bean method is:
Code:
public Branch createBranch(Branch branch, String microMarketId)
throws HibernateException {
Session hsession = _sessionFactory.getCurrentSession();
MicroMarket microMarket = (MicroMarket) hsession.load(MicroMarket.class, microMarketId);
branch.assignToMicroMarket(microMarket);
hsession.save(branch);
return branch;
}
Is the writing of the audit log records done in the same managed session as above or in a separate one that I have to open, begin tx, commit tx and close by myself?
Any help is greatly appreciated.
Many thanks in advance,
Joe