jakartaee-platform icon indicating copy to clipboard operation
jakartaee-platform copied to clipboard

EE 12 description of CDI/Persistence integration needs to correct a typo

Open scottmarlow opened this issue 4 months ago • 4 comments

  1. Address typo in https://jakarta.ee/specifications/platform/11/jakarta-platform-spec-11.0#obtaining-an-entity-manager-using-cdi description to A Jakarta EE container must feature built-integration of Jakarta Persistence with the CDI bean manager, allowing injection of a container-managed entity manager using the annotation jakarta.inject.Inject.
  2. Correct typo in https://jakarta.ee/specifications/platform/11/jakarta-platform-spec-11.0#injecting-an-entity-manager-factory-using-cdi to A Jakarta EE container must feature built-integration of Jakarta Persistence with the CDI bean manager, allowing injection of an entity manager factory using the annotation jakarta.inject.Inject..

scottmarlow avatar Aug 08 '25 19:08 scottmarlow

Should we leave "container-managed" in there? That feels important as it should be managed by the container, e.g. you can't inject a application managed EMF without the user defining the producer.

jamezp avatar Aug 14 '25 15:08 jamezp

Should we leave "container-managed" in there? That feels important as it should be managed by the container, e.g. you can't inject a application managed EMF without the user defining the producer.

application managed EM is defined as an entity manager that is not managed by the container but there is no application managed EMF defined in the Persistence specification. Overloading the container managed phrase for an EntityManagerFactory sounds like a typo that could cause confusion when users ask what that is exactly and what does the container manage. If it was intentional (e.g. not a typo), I'd like to hear more details about what the container needs to manage exactly for a EntityManagerFactory.

scottmarlow avatar Aug 14 '25 15:08 scottmarlow

application managed EM is defined as an entity manager that is not managed by the container but there is no application managed EMF defined in the Persistence specification.

It means the application scoped EM(explicitly) and EMF(implicitly mapped to an EM) are registered in the persistence.xml file?

hantsy avatar Aug 15 '25 01:08 hantsy

Currently, when using WildFly, I noticed the WildFly created classic container managed resources for EMF(can be accessed via JNDI) at the startup stage, like other resources defined by the XXXDefinition annotations.

I created https://github.com/jakartaee/persistence/issues/701 that requires JPA alignment with other XXXXDefinitoins.

hantsy avatar Aug 15 '25 02:08 hantsy