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

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

本文整理了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

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

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

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

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

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

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

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

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

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

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

  1. put(persistenceUnitRefName, reference, ReferenceType.PERSISTENCE_UNIT, module.getJndiContext(), persistenceUnitRef.getInjectionTarget(), sharedContext);
  2. } catch (DeploymentException e) {
  3. problems.add(e);
  4. AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceUnitRef, localConfiguration);
  5. PersistenceUnitReference reference = new PersistenceUnitReference(module.getConfigId(), persistenceUnitNameQuery);
  6. put(persistenceUnitRefName, reference, ReferenceType.PERSISTENCE_UNIT, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
  7. } catch (DeploymentException e) {
  8. problems.add(e);
  9. put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), persistenceContextRef.getInjectionTarget(), sharedContext);
  10. } catch (DeploymentException e) {
  11. problems.add(e);
  12. AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceContextRef, localConfiguration);
  13. PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
  14. put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), Collections.<InjectionTarget> emptySet(), sharedContext);
  15. } catch (DeploymentException e) {
  16. problems.add(e);

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

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

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

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

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

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

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

  1. private void addDataSourceGBean(Module module, Map<EARContext.Key, Object> sharedContext, DataSource ds)
  2. throws DeploymentException {
  3. String jndiName = ds.getKey();
  4. if (lookupJndiContextMap(module, jndiName) != null) {
  5. return;
  6. }
  7. String name = jndiName;
  8. if (name.startsWith("java:")) {
  9. name = name.substring(5);
  10. }
  11. EARContext earContext = module.getEarContext();
  12. AbstractName dataSourceAbstractName = earContext.getNaming().createChildName(module.getModuleName(), name, "GBean");
  13. DataSourceDescription dsDescription = createDataSourceDescription(ds);
  14. String osgiJndiName = null;
  15. if (dsDescription.getProperties() != null) {
  16. osgiJndiName = dsDescription.getProperties().get(ConnectorModuleBuilder.OSGI_JNDI_SERVICE_NAME);
  17. }
  18. if (osgiJndiName == null) {
  19. osgiJndiName = module.getEarContext().getNaming().toOsgiJndiName(dataSourceAbstractName);
  20. }
  21. dsDescription.setOsgiServiceName(osgiJndiName);
  22. try {
  23. Object ref = DataSourceService.buildReference(dsDescription);
  24. put(jndiName, ref, ReferenceType.DATA_SOURCE, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
  25. } catch (IOException e) {
  26. throw new DeploymentException("Could not construct Reference for datasource " + dsDescription, e);
  27. }
  28. }

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

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

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

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

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

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

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

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

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

  1. 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

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

相关文章