Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-19973

@PersistenceContext properties attribute should be processed

XMLWordPrintable

      using the following injection:

      @PersistenceContext(unitName = "myUnit", properties = { @PersistenceProperty(name = "mykey" value = "myvalue") })
       

      the properties attribute wont be processed by the WeldJpaInjectionServices, so the values wont be passed to the underlying vendor specific entitymanager later.

       

      In the following line: https://github.com/wildfly/wildfly/blob/802969514ae18ba21c2cda389d59f54eca3ccb3a/weld/jpa/src/main/java/org/jboss/as/weld/services/bootstrap/WeldJpaInjectionServices.java#L142

      the TransactionScopedEntityManager will be constructed with an empty hashmap instead of the persistencecontext.properties() ( context variable ) 

              smarlow1@redhat.com Scott Marlow
              robert.csinos@gmail.com Róbert Csinos
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: