Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-169

PersistenceContextInjectionTest is using an invalid isOpen() call

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.2.CR2, 1.1.0.Alpha1
    • 1.0.2.CR1
    • None
    • None

    Description

      org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest:

      The Java EE resource producer field pattern is tested by a couple of methods. During the test, the EntityManager.isOpen() method is used for testing, but calling isOpen() from within the test method is invalid, because the EntityManager is transaction-scoped and not application-managed, and the call happens outside the scope of a JTA transaction.

      Proposed solution: inject the produced EM in an EJB and perform the check from within a transaction.

      Attachments

        Activity

          People

            marius.bogoevici Marius Bogoevici (Inactive)
            marius.bogoevici Marius Bogoevici (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty