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

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

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

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

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

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

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

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

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

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

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

PersistenceUnitReference reference = new PersistenceUnitReference(module.getConfigId(), persistenceUnitNameQuery);
  String persistenceUnitRefName = gerPersistenceUnitRef.getPersistenceUnitRefName();
  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) {
    persistenceUnitNameQuery = findPersistenceUnitQuery(module, localConfiguration, persistenceContextRef);
  PersistenceContextReference reference = new PersistenceContextReference(module.getConfigId(), persistenceUnitNameQuery, transactionScoped, properties);
  put(persistenceContextRefName, reference, ReferenceType.PERSISTENCE_CONTEXT, module.getJndiContext(), persistenceContextRef.getInjectionTarget(), sharedContext);
} catch (DeploymentException e) {
  addProperties(gerPersistenceContextRef, properties);
  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) {

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

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

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

Set<AbstractNameQuery> query = new HashSet<AbstractNameQuery>();
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);

相关文章