Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2233

JPA ClassTransformers are ignored

    XMLWordPrintable

Details

    Description

      JPA 2 spec states (persistence-2_0-final-spec.pdf chapter 9.5.1):

      javax.persistence.spi.ClassTransformer.transform:
      "A persistence provider supplies an instance of this interface to the PersistenceUnitInfo.addTransformer method. The supplied transformer instance will get called to transform entity class files when they are loaded or redefined. The transformation occurs before the class is defined by the JVM."

      AS7 JPA service doesn't currently implement this as org.jboss.as.jpa.config.PersistenceUnitMetadataImpl.addTransformer doesn't install the transformer. Installing the transformer to the classloader should be immediate when this method is called as the only way a persistence provider can access PersistenceUnitInfo is from inside PersistenceProvider.createContainerEntityManagerFactory.

      Attachments

        Issue Links

          Activity

            People

              smarlow@redhat.com Scott Marlow
              alaisi_jira Antti Laisi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: