Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] [cdi-dev] Discussion: The new structure of EE integration sections

Hi,

On Fri, 17 Nov 2023 at 17:43, Emily Jiang via jakartaee-platform-dev <jakartaee-platform-dev@xxxxxxxxxxx> wrote:
If spec has the CDI dependencies, the TCKs will have dependencies on CDI. I think Lukas does not want the spec to rely on CDI. 

Sorry for repeating it, but Jakarta Persistence already depends on CDI.

See https://jakarta.ee/specifications/persistence/3.1/jakarta-persistence-spec-3.1#entity-listeners

"Entity listener classes in Jakarta EE environments support dependency injection through the Contexts and Dependency Injection API (CDI) [7] when CDI is enabled[41]. An entity listener class that makes use of CDI injection may also define lifecycle callback methods annotated with the PostConstruct and PreDestroy annotations. These methods will be invoked after injection has taken place and before the entity listener instance is destroyed respectively.

The persistence provider is responsible for using the CDI SPI to create instances of the entity listener class; to perform injection upon such instances; to invoke their PostConstruct and PreDestroy methods, if any; and to dispose of the entity listener instances."


(emphasis mine)

Kind regards,
Arjan Tijms
 

 

Back to the top