| If that is the expectation of Weld, that flat-out contradicts the steps explicitly laid out in the JPA spec (JPA 2.1, section 3.5.1 Entity Listeners):
An entity listener is a noncontextual object. In supporting injection into entity listeners, the persistence provider must behave as if it carries out the following steps involving the use of the CDI SPI. ...
- Obtain a BeanManager instance. (See section 9.1.)
- Create an AnnotatedType instance for the entity listener class.
- Create an InjectionTarget instance for the annotated type.
- Create a CreationalContext.
- Instantiate the listener by calling the InjectionTarget produce method.
- Inject the listener instance by calling the InjectionTarget inject method on the instance.
- Invoke the PostConstruct callback, if any, by calling the InjectionTarget postConstruct method on the instance.
|