EventListenerConfigurator uses Ejb3Configuration but could use AnnotationConfiguration instead

Description

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 .

Environment

Tested with Hibernate 3.2.6ga, Annotations 3.2.1ga, EntityManager 3.3.2ga but seems to affect the code in the trunk.

Activity

Show:
Emmanuel Bernard
March 31, 2010, 2:21 PM

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?

Steve Ebersole
March 31, 2010, 2:25 PM

The idea is to make it easier for users to set up the callback listeners when using core+annotations (sans entitymanager)

Emmanuel Bernard
April 13, 2010, 5:52 PM

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).

Gail Badner
July 12, 2010, 10:10 PM

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).

Thanks,
Gail

Brett Meyer
March 7, 2014, 5:30 PM

Bulk closing rejected tickets in "resolved" state.

Assignee

Emmanuel Bernard

Reporter

Alexandre Pretyman

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Priority

Trivial
Configure