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,7 +20,9 @@ public class SessionCacheCleaner {
public void scheduleAuditDataRemoval(final Session session, final Object data) {
((EventSource) session).getActionQueue().registerProcess(new AfterTransactionCompletionProcess() {
public void doAfterTransactionCompletion(boolean success, SessionImplementor session) {
((Session) session).evict(data);
if (!session.isClosed()) {
((Session) session).evict(data);
}
}
});
}