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

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

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

Module.getConfigId介绍

暂无

代码示例

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

  1. private ResourceReferenceFactory buildManagedObjectReference(Module module, AbstractNameQuery containerId, Class iface) throws DeploymentException {
  2. Configuration localConfiguration = module.getEarContext().getConfiguration();
  3. try {
  4. // first, lookup in configuration
  5. localConfiguration.findGBean(containerId);
  6. } catch (GBeanNotFoundException e) {
  7. // second, lookup in kernel
  8. Set results = this.kernel.listGBeans(containerId);
  9. if (results == null || results.isEmpty()) {
  10. throw new DeploymentException("Cannot resolve managed object ref " + containerId);
  11. } else if (results.size() > 1) {
  12. throw new DeploymentException("Managed object ref resolved to multiple results " + containerId);
  13. }
  14. }
  15. return new ResourceReferenceFactory(module.getConfigId(), containerId, iface, module.getModuleName());
  16. }

代码示例来源: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-connector-builder

  1. private ResourceReferenceFactory<RuntimeException> buildAdminObjectReference(Module module, AbstractNameQuery containerId, Class iface) throws DeploymentException {
  2. Configuration localConfiguration = module.getEarContext().getConfiguration();
  3. try {
  4. localConfiguration.findGBean(containerId);
  5. } catch (GBeanNotFoundException e) {
  6. throw new DeploymentException("Can not resolve admin object ref " + containerId + " in configuration " + localConfiguration.getId(), e);
  7. }
  8. return new ResourceReferenceFactory<RuntimeException>(module.getConfigId(), containerId, iface);
  9. }

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

  1. Artifact[] moduleId = module.getConfigId();
  2. Map context = getJndiContextMap(componentContext);
  3. context.put(ENV + name, new ORBReference(moduleId, corbaName));
  4. Object ref = new ResourceReferenceFactory<ResourceException>(module.getConfigId(), containerId, iface);
  5. getJndiContextMap(componentContext).put(ENV + name, ref);

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

  1. Artifact[] moduleId = module.getConfigId();
  2. EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), corbaEnvironment);
  3. return new ORBReference(moduleId, corbaName);

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

  1. PersistenceUnitReference reference = new PersistenceUnitReference(module.getConfigId(), persistenceUnitNameQuery);
  2. String persistenceUnitRefName = gerPersistenceUnitRef.getPersistenceUnitRefName();
  3. AbstractNameQuery persistenceUnitNameQuery = findPersistenceUnit(gerPersistenceUnitRef, localConfiguration);
  4. PersistenceUnitReference reference = new PersistenceUnitReference(module.getConfigId(), persistenceUnitNameQuery);
  5. put(persistenceUnitRefName, reference, ReferenceType.PERSISTENCE_UNIT, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
  6. } catch (DeploymentException e) {
  7. persistenceUnitNameQuery = findPersistenceUnitQuery(module, localConfiguration, persistenceContextRef);
  8. PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
  9. put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), persistenceContextRef.getInjectionTarget(), sharedContext);
  10. } catch (DeploymentException e) {
  11. addProperties(gerPersistenceContextRef, properties);
  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) {

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

  1. module.getEarContext().findGBean(cssBean);
  2. } catch (GBeanNotFoundException e) {
  3. throw new DeploymentException("Could not find css bean matching " + cssBean + " from configuration " + module.getConfigId(), e);
  4. ejbReference = new CORBAProxyReference(module.getConfigId(), cssBean, new URI(remoteRef.getNsCorbaloc().trim()), remoteRef.getName().trim(), home);
  5. } catch (URISyntaxException e) {
  6. throw new DeploymentException("Could not construct CORBA NameServer URI: " + remoteRef.getNsCorbaloc(), e);

代码示例来源: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-connector-builder-1_6

  1. Set<AbstractNameQuery> query = new HashSet<AbstractNameQuery>();
  2. query.add(transactionManager);
  3. GBeanReference transactionManagerRef = new GBeanReference(module.getConfigId(), query, TransactionManager.class);
  4. put("java:comp/TransactionManager", transactionManagerRef, ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);
  5. GBeanReference transactionSynchronizationRef = new GBeanReference(module.getConfigId(), query, TransactionSynchronizationRegistry.class);
  6. put("java:comp/TransactionSynchronizationRegistry", transactionSynchronizationRef, ReferenceType.RESOURCE_ENV, module.getJndiContext(), Collections.<InjectionTarget>emptySet(), sharedContext);

相关文章