use of org.apache.openejb.assembler.classic.ReferenceLocationInfo 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;
}
}
}
use of org.apache.openejb.assembler.classic.ReferenceLocationInfo in project tomee by apache.
the class JndiEncInfoBuilder method buildLocationInfo.
private ReferenceLocationInfo buildLocationInfo(final JndiReference reference) {
final String lookupName = reference.getLookupName();
if (lookupName != null) {
final ReferenceLocationInfo location = new ReferenceLocationInfo();
location.jndiName = lookupName;
return location;
}
final String mappedName = reference.getMappedName();
if (mappedName != null && mappedName.startsWith("jndi:")) {
final ReferenceLocationInfo location = new ReferenceLocationInfo();
final String name = mappedName.substring(5);
if (name.startsWith("ext://")) {
final URI uri = URLs.uri(name);
location.jndiProviderId = uri.getHost();
location.jndiName = uri.getPath();
} else {
location.jndiName = name;
}
return location;
}
return null;
}
Aggregations