use of org.apache.openejb.assembler.classic.EjbLocalReferenceInfo in project tomee by apache.
the class TomcatJndiBuilder method mergeJndi.
public void mergeJndi() throws OpenEJBException {
final NamingResourcesImpl naming = standardContext.getNamingResources();
final URI moduleUri = URLs.uri(webAppInfo.moduleId);
for (final EnvEntryInfo ref : webAppInfo.jndiEnc.envEntries) {
mergeRef(naming, ref);
}
for (final EjbReferenceInfo ref : webAppInfo.jndiEnc.ejbReferences) {
mergeRef(naming, ref);
}
for (final EjbLocalReferenceInfo ref : webAppInfo.jndiEnc.ejbLocalReferences) {
mergeRef(naming, ref);
}
for (final PersistenceContextReferenceInfo ref : webAppInfo.jndiEnc.persistenceContextRefs) {
mergeRef(naming, ref, moduleUri);
}
for (final PersistenceUnitReferenceInfo ref : webAppInfo.jndiEnc.persistenceUnitRefs) {
mergeRef(naming, ref, moduleUri);
}
for (final ResourceReferenceInfo ref : webAppInfo.jndiEnc.resourceRefs) {
mergeRef(naming, ref);
}
for (final ResourceEnvReferenceInfo ref : webAppInfo.jndiEnc.resourceEnvRefs) {
mergeRef(naming, ref);
}
for (final ServiceReferenceInfo ref : webAppInfo.jndiEnc.serviceRefs) {
mergeRef(naming, ref);
}
final ContextTransaction contextTransaction = new ContextTransaction();
contextTransaction.setProperty(Constants.FACTORY, UserTransactionFactory.class.getName());
naming.setTransaction(contextTransaction);
}
use of org.apache.openejb.assembler.classic.EjbLocalReferenceInfo in project tomee by apache.
the class JndiEncInfoBuilder method toLocal.
private EjbLocalReferenceInfo toLocal(final EjbReferenceInfo referenceInfo) {
final EjbLocalReferenceInfo local = new EjbLocalReferenceInfo();
local.ejbDeploymentId = referenceInfo.ejbDeploymentId;
local.externalReference = referenceInfo.externalReference;
local.homeClassName = referenceInfo.homeClassName;
local.interfaceClassName = referenceInfo.interfaceClassName;
local.referenceName = referenceInfo.referenceName;
local.link = referenceInfo.link;
local.location = referenceInfo.location;
local.targets.addAll(referenceInfo.targets);
local.localbean = referenceInfo.localbean;
return local;
}
Aggregations