This should fix #15 for persistent entities updated in a Hibernate session. When Hibernate flushes the session, the AuditEventListener.onFlush() is invoked. The existing session can be used instead of creating a new one. Also, in this use case I don't see any reason why it's necessary to use a HibernatePersistenceContextInterceptor.
I've also modified the use of the interceptor for batch index requests, as it appears that they are not always being initialized/destroyed correctly.
This should fix #15 for persistent entities updated in a Hibernate session. When Hibernate flushes the session, the AuditEventListener.onFlush() is invoked. The existing session can be used instead of creating a new one. Also, in this use case I don't see any reason why it's necessary to use a HibernatePersistenceContextInterceptor.
I've also modified the use of the interceptor for batch index requests, as it appears that they are not always being initialized/destroyed correctly.