glassfish
  1. glassfish
  2. GLASSFISH-120

new assertion: appclient can not use container managed entity manager

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe_dev
    • Component/s: verifier
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      120

      Description

      In section #5.5 of Java Persistence API 1.0 PFD spec (JSR 220), it is mentioned
      that container managed entity manager must be of type JTA.
      In table EE.6-1 of Java EE 5 platform PFD spec, it is mentioned that support for
      JTA is not required in application client container in Java EE 5 platform.

      These two statements automatically imply that an app client can not use
      "container managed entity manager".

      Please also note that a container managed entity manager is obtained by two ways:

      1) using dependency injection: This can be done using either @PersistenceContext
      or <persistence-context-ref/> in XML DD.

      2) using EntityManagerFactory.getEntityManager().

      Verifier should report error for either of these use cases.

      1. 120.tar
        30 kB
        Bhavanishankar

        Issue Links

          Activity

          Hide
          Sanjeeb Sahoo added a comment -

          Since an EntityManagerFactory decides whether EntityManagers produced by it are
          JTA or RESOURCE_LOCAL, this assertion can be implemented by checking the EMF type.

          Show
          Sanjeeb Sahoo added a comment - Since an EntityManagerFactory decides whether EntityManagers produced by it are JTA or RESOURCE_LOCAL, this assertion can be implemented by checking the EMF type.
          Hide
          Sanjeeb Sahoo added a comment -

          Bhavani,

          There is no EntityManagerFactory.getEntityManager() in post PFD spec. So the
          only test needed in verifier is:

          if (!applicationClientDescriptor.getEntityManagerReferences()

          { ...// test fails. }
          Show
          Sanjeeb Sahoo added a comment - Bhavani, There is no EntityManagerFactory.getEntityManager() in post PFD spec. So the only test needed in verifier is: if (!applicationClientDescriptor.getEntityManagerReferences() { ...// test fails. }
          Hide
          Sanjeeb Sahoo added a comment -

          This issue requires issue #309 tobe fixed as we use the annotation processor
          that is part of DOL.

          Show
          Sanjeeb Sahoo added a comment - This issue requires issue #309 tobe fixed as we use the annotation processor that is part of DOL.
          Hide
          Bhavanishankar added a comment -

          Code changes:
          =============

          Checking in LocalStrings.properties;
          /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/LocalStrings.properties,v
          <-- LocalStrings.properties
          new revision: 1.67; previous revision: 1.66
          done
          Checking in VerifierErrorHandler.java;
          /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/VerifierErrorHandler.java,v
          <-- VerifierErrorHandler.java
          new revision: 1.4; previous revision: 1.3
          done

          Show
          Bhavanishankar added a comment - Code changes: ============= Checking in LocalStrings.properties; /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/LocalStrings.properties,v <-- LocalStrings.properties new revision: 1.67; previous revision: 1.66 done Checking in VerifierErrorHandler.java; /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/VerifierErrorHandler.java,v <-- VerifierErrorHandler.java new revision: 1.4; previous revision: 1.3 done
          Hide
          Bhavanishankar added a comment -

          Integrated in b40.

          Show
          Bhavanishankar added a comment - Integrated in b40.
          Hide
          Bhavanishankar added a comment -

          Created an attachment (id=105)
          testcase - 120/client.jar

          Show
          Bhavanishankar added a comment - Created an attachment (id=105) testcase - 120/client.jar

            People

            • Assignee:
              Bhavanishankar
              Reporter:
              Sanjeeb Sahoo
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: