Steve Ebersole commented on Improvement HHH-3809

I changed the listener interfaces for the listeners involved. E.g.:

public interface PostInsertEventListener extends Serializable {
    ...

    /**
     * Does this listener require that after transaction hooks be registered?   Typically this is {@code true}
     * for post-insert event listeners, but may not be, for example, in JPA cases where there are no callbacks defined
     * for the particular entity.
     *
     * @param persister The persister for the entity in question.
     *
     * @return {@code true} if after transaction callbacks should be added.
     */
    public boolean requiresPostCommitHanding(EntityPersister persister);
}

I adjusted the standard JPA and Envers implementations of these listeners to do the right thing. With custom listeners you will have to do the same. The idea though is that if any post-commit listeners for a given type of entity and type of callback return true the AfterTransactionCompletionProcess gets registered.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira