EventListenerConfigurator uses Ejb3Configuration but could use AnnotationConfiguration instead
The class EventListenerConfigurator uses Ejb3Configuration on it's constructor, but it could use AnnotationConfiguration directly, as the methods called on the Ejb3Configuration instance by the EventListenerConfigurator, are actually delegations to the AnnotationConfiguration .
Tested with Hibernate 3.2.6ga, Annotations 3.2.1ga, EntityManager 3.3.2ga but seems to affect the code in the trunk.
Bulk closing rejected tickets in "resolved" state.
This issue is currently scheduled for 3.5.x, but not 3.6. Should this issue be fixed in 3.6 as well (or instead)? If so, please correct the fix version(s).
I am not super comfortable with exposing EventListenerConfigurator as a public API.
It does several things:
add the JPA style callbacks
change the semantics of flush and persist to accommodate JPA
add JACC support
I imagine the users only want JPA style callbacks and hence are using annotations already.
If that's the case, we need to prototype a way to push it back the callback listener configuration to annotations (instead of entitymanager).
The idea is to make it easier for users to set up the callback listeners when using core+annotations (sans entitymanager)
Not exactly true as we do change the contextual class loader in some of these method calls.
But more importantly, why do you want to pass an AnnotationConfiguration instead of an Ejb3Configuration?