Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-520

3.6. Java EE components

    XMLWordPrintable

Details

    • Clarification
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Out of Date
    • 1.1.Final
    • TBD
    • Java EE integration
    • None

    Description

      I don't understand this text:

      "The instance used by the container to service an invocation of a Java EE component will not be the same instance obtained when using @Inject, instantiated by the container to invoke a producer method, observer method or disposer method, or instantiated by the container to access the value of a producer field."

      More specifically, I am trying to understand how we can use CDI to put a scope on EntityManager whose life cycle is rather undefined by JPA. I see that the specification use an example of a @Disposes method to close a container-managed entity manager which throw IllegalStateException in the disposer . Anyways, trying to solve this puzzle has led me to the paragraph quoted previously, of which I understand nothing to be honest.

      My research about the "CDI managed container-managed entity manager" continues. As of now, the example is flawed and a container-managed entity manager remains open after the disposer method. Anyways, I might open up a separate ticket for that.

      Attachments

        Activity

          People

            Unassigned Unassigned
            martin.andersson_jira Martin Andersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: