Search in sources :

Example 6 with PersistenceContextReferenceInfo

use of org.apache.openejb.assembler.classic.PersistenceContextReferenceInfo in project aries by apache.

the class EJBExtender method processJPAMappings.

private void processJPAMappings(EjbJarInfo ejbInfo) {
    for (EnterpriseBeanInfo ebi : ejbInfo.enterpriseBeans) {
        for (PersistenceUnitReferenceInfo pui : ebi.jndiEnc.persistenceUnitRefs) {
            pui.location = new ReferenceLocationInfo();
            pui.location.jndiName = "aries/integration/unit/" + pui.persistenceUnitName;
        }
        for (PersistenceContextReferenceInfo pci : ebi.jndiEnc.persistenceContextRefs) {
            pci.location = new ReferenceLocationInfo();
            pci.location.jndiName = "aries/integration/context/" + pci.persistenceUnitName;
        }
    }
}
Also used : EnterpriseBeanInfo(org.apache.openejb.assembler.classic.EnterpriseBeanInfo) PersistenceContextReferenceInfo(org.apache.openejb.assembler.classic.PersistenceContextReferenceInfo) ReferenceLocationInfo(org.apache.openejb.assembler.classic.ReferenceLocationInfo) PersistenceUnitReferenceInfo(org.apache.openejb.assembler.classic.PersistenceUnitReferenceInfo)

Aggregations

PersistenceContextReferenceInfo (org.apache.openejb.assembler.classic.PersistenceContextReferenceInfo)6 PersistenceUnitReferenceInfo (org.apache.openejb.assembler.classic.PersistenceUnitReferenceInfo)5 Context (javax.naming.Context)2 NamingException (javax.naming.NamingException)2 AppContext (org.apache.openejb.AppContext)2 BeanContext (org.apache.openejb.BeanContext)2 EnterpriseBeanInfo (org.apache.openejb.assembler.classic.EnterpriseBeanInfo)2 EnvEntryInfo (org.apache.openejb.assembler.classic.EnvEntryInfo)2 ResourceReferenceInfo (org.apache.openejb.assembler.classic.ResourceReferenceInfo)2 PersistenceContextRef (org.apache.openejb.jee.PersistenceContextRef)2 Property (org.apache.openejb.jee.Property)2 URI (java.net.URI)1 ArrayList (java.util.ArrayList)1 EntityManagerFactory (javax.persistence.EntityManagerFactory)1 PersistenceUnit (javax.persistence.PersistenceUnit)1 NamingResourcesImpl (org.apache.catalina.deploy.NamingResourcesImpl)1 AppInfo (org.apache.openejb.assembler.classic.AppInfo)1 Assembler (org.apache.openejb.assembler.classic.Assembler)1 EjbJarInfo (org.apache.openejb.assembler.classic.EjbJarInfo)1 EjbLocalReferenceInfo (org.apache.openejb.assembler.classic.EjbLocalReferenceInfo)1