HHH-6793: checking if session isn't closed

This commit is contained in:
Adam Warski 2011-11-02 11:44:08 +01:00
parent 70bd57bcff
commit 946925f3e2
1 changed files with 3 additions and 1 deletions

View File

@ -20,8 +20,10 @@ public class SessionCacheCleaner {
public void scheduleAuditDataRemoval(final Session session, final Object data) { public void scheduleAuditDataRemoval(final Session session, final Object data) {
((EventSource) session).getActionQueue().registerProcess(new AfterTransactionCompletionProcess() { ((EventSource) session).getActionQueue().registerProcess(new AfterTransactionCompletionProcess() {
public void doAfterTransactionCompletion(boolean success, SessionImplementor session) { public void doAfterTransactionCompletion(boolean success, SessionImplementor session) {
if (!session.isClosed()) {
((Session) session).evict(data); ((Session) session).evict(data);
} }
}
}); });
} }
} }