jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: injection into entity listeners

From: Linda DeMichiel <linda.demichiel_at_oracle.com>
Date: Wed, 20 Jul 2011 14:33:56 -0700

The provider doesn't do the injection itself but calls into CDI to have the injection done.

 From the spec point of view, the provider is responsible for the injection (i.e., for
causing it to happen), but delegates the work to CDI.

(Did I answer your question?)

On 7/20/2011 2:26 PM, Gordon Yorke wrote:
> This seems to suggest we will be requiring the Provider to manage the injection into the EntityListeners but this is not
> the case correct? The container will be responsible for injecting instances into the EntityListener?
> --Gordon
>
> On 7/20/2011 4:51 PM, Linda DeMichiel wrote:
>> The persistence provider is only required to support CDI
>> injection into listeners in Java EE container environments
>> where the BeanManager is available in JNDI as java:comp/BeanManager.
>> When this is not the case, @BeanListener classes will be
>> ignored.