org.apache.geronimo.j2ee.deployment.Module.getJndiContext()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.7k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.apache.geronimo.j2ee.deployment.Module.getJndiContext()方法的一些代码示例,展示了Module.getJndiContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Module.getJndiContext()方法的具体详情如下:
包路径:org.apache.geronimo.j2ee.deployment.Module
类名称:Module
方法名:getJndiContext

Module.getJndiContext介绍

暂无

代码示例

代码示例来源:origin: org.apache.geronimo.modules/geronimo-web-2.5-builder

protected static Map<JndiKey, Map<String, Object>> shareJndi(Module parent) {
  return Module.share(Module.APP, parent == null ? null : parent.getJndiContext());
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-openwebbeans-builder

@Override
public void buildNaming(JndiConsumer specDD, XmlObject plan, Module module, Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
  put("java:comp/BeanManager", new BeanManagerReference(), ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-corba-builder

public void buildNaming(JndiConsumer specDD, XmlObject plan, Module module, Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
  if (matchesDefaultEnvironment(module.getEnvironment())) {
    CorbaGBeanNameSource corbaGBeanNameSource = corbaGBeanNameSourceCollection.getElement();
    if (corbaGBeanNameSource != null) {
      AbstractNameQuery corbaName = corbaGBeanNameSource.getCorbaGBeanName();
      if (corbaName != null) {
        Artifact[] moduleId = module.getConfigId();
        put("java:comp/ORB", new ORBReference(moduleId, corbaName), ReferenceType.ORB, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
        put("java:comp/HandleDelegate", new HandleDelegateReference(moduleId, corbaName), ReferenceType.HANDLEDELEGATE, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
      }
    }
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-openejb-builder

Map<JndiKey,Map<String,Object>> moduleJndiContext = module.getJndiContext();
      put(fullName, value, referenceType, module.getJndiContext(), injections, sharedContext);
    appclientAppContext.put(entry.getKey(), createClientRef(entry.getValue()));
  module.getJndiContext().put(JndiScope.app, appclientAppContext);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-naming-builder

put(name, value, ReferenceType.ENV_ENTRY, module.getJndiContext(), envEntry.getInjectionTarget(), sharedContext);
} else if(isSharableJndiNamespace(name)) {

代码示例来源:origin: org.apache.geronimo.modules/geronimo-persistence-jpa20-builder

put(persistenceUnitRefName, reference, ReferenceType.PERSISTENCE_UNIT, module.getJndiContext(), persistenceUnitRef.getInjectionTarget(), sharedContext);
} catch (DeploymentException e) {
  problems.add(e);
  AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceUnitRef, localConfiguration);
  PersistenceUnitReference reference = new PersistenceUnitReference(module.getConfigId(), persistenceUnitNameQuery);
  put(persistenceUnitRefName, reference, ReferenceType.PERSISTENCE_UNIT, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
} catch (DeploymentException e) {
  problems.add(e);
  put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), persistenceContextRef.getInjectionTarget(), sharedContext);
} catch (DeploymentException e) {
  problems.add(e);
  AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef, localConfiguration);
  PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
  put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), Collections.<InjectionTarget> emptySet(), sharedContext);
} catch (DeploymentException e) {
  problems.add(e);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-openejb-builder

context = parentModule.getJndiContext();
} else if (parentModule != null) {
  context = Module.share(Module.APP, parentModule.getJndiContext());

代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder-1_6

query.add(transactionManager);
  GBeanReference transactionManagerRef = new GBeanReference(module.getConfigId(), query, TransactionManager.class);
  put("java:comp/TransactionManager", transactionManagerRef, ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
  GBeanReference transactionSynchronizationRef = new GBeanReference(module.getConfigId(), query, TransactionSynchronizationRegistry.class);
  put("java:comp/TransactionSynchronizationRegistry", transactionSynchronizationRef, ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
put("java:comp/Bundle", new BundleReference(), ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget> emptySet(), sharedContext);
put("java:comp/BundleContext", new BundleContextReference(), ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget> emptySet(), sharedContext);
    unresolvedRefs.add(name);
  } else {
    put(name, value, ReferenceType.RESOURCE_ENV, module.getJndiContext(), resourceEnvRef.getInjectionTarget(), sharedContext);
    put(name, value, ReferenceType.RESOURCE_ENV, module.getJndiContext(), messageDestinationRef.getInjectionTarget(), sharedContext);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-openejb-builder

bind(bean, appName, ejbModule.getName(), deploymentId, module.getJndiContext());

代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder-1_6

private void addDataSourceGBean(Module module, Map<EARContext.Key, Object> sharedContext, DataSource ds)
  throws DeploymentException {
  String jndiName = ds.getKey();
  if (lookupJndiContextMap(module, jndiName) != null) {
    return;
  }
  String name = jndiName;
  if (name.startsWith("java:")) {
    name = name.substring(5);
  }
  EARContext earContext = module.getEarContext();
  AbstractName dataSourceAbstractName = earContext.getNaming().createChildName(module.getModuleName(), name, "GBean");
  DataSourceDescription dsDescription = createDataSourceDescription(ds);
  String osgiJndiName = null;
  if (dsDescription.getProperties() != null) {
    osgiJndiName = dsDescription.getProperties().get(ConnectorModuleBuilder.OSGI_JNDI_SERVICE_NAME);
  }
  if (osgiJndiName == null) {
    osgiJndiName = module.getEarContext().getNaming().toOsgiJndiName(dataSourceAbstractName);
  }
  dsDescription.setOsgiServiceName(osgiJndiName);
  try {
    Object ref = DataSourceService.buildReference(dsDescription);
    put(jndiName, ref, ReferenceType.DATA_SOURCE, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
  } catch (IOException e) {
    throw new DeploymentException("Could not construct Reference for datasource " + dsDescription, e);
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-corba-builder

public void buildNaming(JndiConsumer specDD, XmlObject plan, Module module, Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
  Collection<EjbRef> ejbRefsUntyped = specDD.getEjbRef();
  XmlObject[] gerEjbRefsUntyped = plan == null ? NO_REFS : convert(plan.selectChildren(GER_EJB_REF_QNAME_SET), OPENEJB_CONVERTER, GerEjbRefType.type);
  Map ejbRefMap = mapEjbRefs(gerEjbRefsUntyped);
  Bundle bundle = module.getEarContext().getDeploymentBundle();
  for (EjbRef ejbRef : ejbRefsUntyped) {
    String ejbRefName = getStringValue(ejbRef.getKey());
    GerEjbRefType remoteRef = (GerEjbRefType) ejbRefMap.get(ejbRefName);
    Reference ejbReference = addEJBRef(module, ejbRef, remoteRef, bundle);
    if (ejbReference != null) {
      put(ejbRefName, ejbReference, ReferenceType.EJB, module.getJndiContext(), ejbRef.getInjectionTarget(), sharedContext);
    }
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder-1_6

unresolvedRefs.add(name);
} else {
  put(name, value, ReferenceType.RESOURCE, module.getJndiContext(), resourceRef.getInjectionTarget(), sharedContext);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-naming-builder

put(refName, new GBeanReference(module.getConfigId(), queries, gBeanType), ReferenceType.GBEAN, module.getJndiContext(), Collections.<InjectionTarget> emptySet(), sharedContext);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-jaxws-builder

serviceInterfaceClass, serviceQName,
              wsdlURI, serviceReferenceType, portComponentRefMap);
put(name, ref, ReferenceType.SERVICE, module.getJndiContext(), serviceRef.getInjectionTarget(), sharedContext);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder-1_6

Module module = new ConnectorModule<Connector, XmlObject>(standAlone, moduleName, name, environment, moduleFile, targetPath, connector, gerConnector, specDD, parentModule == null? null: parentModule.getJndiContext(), parentModule);

代码示例来源:origin: org.apache.geronimo.modules/geronimo-j2ee-builder

Map<JndiKey, Map<String, Object>> jndiContext = Module.share(Module.APP, module.getJndiContext());

相关文章