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

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

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

Module.getModuleURI介绍

暂无

代码示例

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

public static String normalizeCatalogPath(Module module, String catalogName) {
  if(isURL(catalogName)) {
    return catalogName;
  }
  Module parentModule = module.getParentModule();
  if(parentModule == null) {
    return catalogName;
  }
  // EAR
  // L WAR
  if(module.getType().equals(ConfigurationModuleType.WAR) && parentModule.getType().equals(ConfigurationModuleType.EAR)) {
    return module.getTargetPathURI().resolve(catalogName).toString();
  }
  
  // EAR
  //   L EJB
  if(module.getType().equals(ConfigurationModuleType.EJB) && parentModule.getType().equals(ConfigurationModuleType.EAR)) {
    return module.getModuleURI().toString() + "!/" + catalogName;
  }
  return catalogName;
}

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

public void initContext(JndiConsumer specDD, XmlObject plan, Module module) throws DeploymentException {
  Collection<MessageDestination> specDestinations;
  try {
    Method m = specDD.getClass().getMethod("getMessageDestination", new Class[0]);
    m.setAccessible(true);
    specDestinations = (Collection<MessageDestination>) m.invoke(specDD, new Object[0]);
  } catch (Exception e) {
    specDestinations = new ArrayList<MessageDestination>();
  }
  XmlObject[] gerDestinations = plan.selectChildren(GER_MESSAGE_DESTINATION_QNAME_SET);
  Map<String, GerMessageDestinationType> nameMap = new HashMap<String, GerMessageDestinationType>();
  for (XmlObject gerDestination : gerDestinations) {
    GerMessageDestinationType destination = (GerMessageDestinationType) gerDestination.copy().changeType(GerMessageDestinationType.type);
    String name = destination.getMessageDestinationName().trim();
    nameMap.put(name, destination);
    boolean found = false;
    for (MessageDestination specDestination : specDestinations) {
      if (specDestination.getMessageDestinationName().trim().equals(name)) {
        found = true;
        break;
      }
    }
    if (!found) {
      throw new DeploymentException("No spec DD message-destination for " + name);
    }
  }
  module.getRootEarContext().registerMessageDestionations(module.getModuleURI().toString(), nameMap);
}

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

private ModuleBuilder getBuilder(Module module) throws DeploymentException {
  if (module instanceof EJBModule) {
    if (getEjbConfigBuilder() == null) {
      throw new DeploymentException("Cannot deploy ejb application; No ejb deployer defined: " + module.getModuleURI());
    }
    return getEjbConfigBuilder();
  } else if (module instanceof WebModule) {
    if (getWebConfigBuilder() == null) {
      throw new DeploymentException("Cannot deploy web application; No war deployer defined: " + module.getModuleURI());
    }
    return getWebConfigBuilder();
  } else if (module instanceof ConnectorModule) {
    if (getConnectorConfigBuilder() == null) {
      throw new DeploymentException("Cannot deploy resource adapter; No rar deployer defined: " + module.getModuleURI());
    }
    return getConnectorConfigBuilder();
  } else if (module instanceof AppClientModule) {
    if (getAppClientConfigBuilder() == null) {
      throw new DeploymentException("Cannot deploy app client; No app client deployer defined: " + module.getModuleURI());
    }
    return getAppClientConfigBuilder();
  }
  throw new IllegalArgumentException("Unknown module type: " + module.getClass().getName());
}

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

public static String normalizeWsdlPath(Module module, String wsdlLocation){
  // is Absolute URL path
  if (isURL(wsdlLocation)) return wsdlLocation;
  
  Module parentModule = module.getParentModule();
  if(parentModule == null) {
    return wsdlLocation;
  }
  // EAR
  //   L WAR
  if (module.getType().equals(ConfigurationModuleType.WAR) && parentModule.getType().equals(ConfigurationModuleType.EAR))
    return module.getTargetPathURI().resolve(wsdlLocation).toString();
  
  // EAR 
  //   L WAR
  //       L EJB
  if (module.getType().equals(ConfigurationModuleType.EJB) && parentModule.getType().equals(ConfigurationModuleType.WAR)
      && parentModule.getParentModule() != null && parentModule.getParentModule().getType().equals(ConfigurationModuleType.EAR))
    return parentModule.getTargetPathURI().resolve(wsdlLocation).toString();
  
  // EAR
  //   L EJB
  if(module.getType().equals(ConfigurationModuleType.EJB) && parentModule.getType().equals(ConfigurationModuleType.EAR)) {
    return module.getModuleURI().toString() + "!/" + wsdlLocation;
  }
  return wsdlLocation;
}

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

jndiEncInfoBuilder.build(specDD, "GeronimoEnc", moduleId, module.getModuleURI(), moduleJndi, compJndi);
ejbEncInfo.ejbLocalReferences.addAll(compJndi.ejbLocalReferences);
JndiEncBuilder jndiEncBuilder = new JndiEncBuilder(ejbEncInfo, null, moduleId, module.getModuleURI(), moduleId, getClass().getClassLoader());

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

String remote = getStringValue(ejbRef.getRemote());
verifyInterfaces(refName, module.getModuleURI(), bundle, remote, home);

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

URI moduleURI = module.getModuleURI();
String moduleString = moduleURI == null ? null : moduleURI.toString();

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

for (int i = 0; i < tssLinks.length; i++) {
  String tssLink = tssLinks[i];
  URI moduleURI = module.getModuleURI();
  String moduleString = moduleURI == null ? null : moduleURI.toString();
  AbstractNameQuery tssBeanName = ENCConfigBuilder.buildAbstractNameQuery(null, moduleString, tssLink, NameFactory.EJB_MODULE, NameFactory.EJB_MODULE);

相关文章