* regardless of commit success.
* @param session Active Hibernate session.
* @param data Audit data that shall be evicted (e.g. revision data or entity snapshot)
*/
public void scheduleAuditDataRemoval(final Session session, final Object data) {
((EventSource) session).getActionQueue().registerProcess(new AfterTransactionCompletionProcess() {
public void doAfterTransactionCompletion(boolean success, SessionImplementor session) {
if (!session.isClosed()) {
((Session) session).evict(data);
}
}