mstein/elasticsearch-grails-plugin — pull request #44 by tcrossland (2012-10-16 16:05:21+00:00)
Title: Fix for #15: Problem in Hibernate sessions management

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.