HHH-6793: checking if session isn't closed
This commit is contained in:
parent
70bd57bcff
commit
946925f3e2
|
@ -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);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue