use of org.apache.openejb.assembler.classic.ServiceReferenceInfo in project tomee by apache.
the class JndiEncInfoBuilder method buildServiceRefInfos.
private void buildServiceRefInfos(final JndiConsumer jndiConsumer, final JndiEncInfo moduleJndiEnc, final JndiEncInfo compJndiEnc) {
for (final ServiceRef ref : jndiConsumer.getServiceRef()) {
final ServiceReferenceInfo info = new ServiceReferenceInfo();
info.referenceName = ref.getName();
info.location = buildLocationInfo(ref);
info.targets.addAll(buildInjectionInfos(ref));
insert(info, appInfo.globalJndiEnc.serviceRefs, appInfo.appJndiEnc.serviceRefs, moduleJndiEnc.serviceRefs, compJndiEnc.serviceRefs);
if (SystemInstance.get().hasProperty("openejb.geronimo")) {
continue;
}
info.id = ref.getMappedName();
info.serviceQName = ref.getServiceQname();
info.serviceType = ref.getServiceInterface();
info.referenceType = ref.getServiceRefType();
info.wsdlFile = ref.getWsdlFile();
info.jaxrpcMappingFile = ref.getJaxrpcMappingFile();
info.handlerChains.addAll(ConfigurationFactory.toHandlerChainInfo(ref.getAllHandlers()));
for (final PortComponentRef portComponentRef : ref.getPortComponentRef()) {
final PortRefInfo portRefInfo = new PortRefInfo();
portRefInfo.qname = portComponentRef.getQName();
portRefInfo.serviceEndpointInterface = portComponentRef.getServiceEndpointInterface();
portRefInfo.enableMtom = portComponentRef.isEnableMtom();
portRefInfo.properties.putAll(portComponentRef.getProperties());
info.portRefs.add(portRefInfo);
}
}
}
use of org.apache.openejb.assembler.classic.ServiceReferenceInfo 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);
}
Aggregations