jsr338-experts@jpa-spec.java.net

[jsr338-experts] Integration of EntityListeners Classes with CDI (Java EE 7)

From: Adam Bien <abien_at_adam-bien.com>
Date: Tue, 21 Jun 2011 14:18:26 +0200

Hi *

EntityListeners should be integrated with CDI / EJB 3.2. It means: Java EE 7 DI should work in EntityListener classes. An EntityListener could be annotated with @Singleton / @Stateless / @RequestScoped etc. (everything what is stateless)

We should extend the sentence: "Entity listeners are stateless. The lifecycle of an entity listener is unspecified" at the page 95 of the Expert Group Draft 2. to "The lifecycle of an entity listener is unspecified in unmanaged environments. An EJB 3.2 @Stateless, @Singleton or CDI managed bean can also receive callback events",

What do you think?

adam