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

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

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

Module.getParentModule介绍

暂无

代码示例

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

public static URI normalizeWsdlPath(Module module, URI wsdlUri){
    // is Absolute URL path
    if (isURL(wsdlUri)) return wsdlUri;
    
    // EAR
    //   L WAR
    if (module.getType().equals(ConfigurationModuleType.WAR) && module.getParentModule() != null && module.getParentModule().getType().equals(ConfigurationModuleType.EAR))
      return module.getTargetPathURI().resolve(wsdlUri);
    
    // EAR 
    //   L WAR
    //       L EJB
    if (module.getType().equals(ConfigurationModuleType.EJB) && module.getParentModule() != null && module.getParentModule().getType().equals(ConfigurationModuleType.WAR)
        && module.getParentModule().getParentModule() != null && module.getParentModule().getParentModule().getType().equals(ConfigurationModuleType.EAR))
      return module.getParentModule().getTargetPathURI().resolve(wsdlUri);
    
      
    return wsdlUri;
  }
}

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

module = module.getParentModule();
} while(module!=null);

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

private void installModule(Module module, EARContext earContext) throws DeploymentException {
  registerModule(module, earContext);
  JarFile moduleFile = module.getModuleFile();
  try {
    if (module.isStandAlone()) {
      JarUtils.unzipToDirectory(new JarFile(moduleFile.getName()), earContext.getBaseDir());
    } else {
      // extract the ejbJar file into a standalone packed jar file and add the contents to the output
      earContext.addIncludeAsPackedJar(URI.create(module.getTargetPath()), moduleFile);
      // add manifest class path entries to the ejb module classpath
      Collection<String> EjbModuleClasspaths = module.getClassPath();
      EjbModuleClasspaths.add(module.getTargetPath());
      Collection<String> moduleLocations = module.isStandAlone() ? null : module.getParentModule()
          .getModuleLocations();
      URI baseUri = URI.create(module.getTargetPath());
      earContext.getCompleteManifestClassPath(module.getDeployable(), baseUri, URI.create("."), EjbModuleClasspaths, moduleLocations);
      for (String classpath:EjbModuleClasspaths){
        earContext.addToClassPath(classpath);
      }
    }
    //earContext.addInclude(".", moduleFile);
  } catch (IOException e) {
    throw new DeploymentException("Unable to copy ejb module jar into configuration: " + moduleFile.getName(), e);
  }
}

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

while (m.getParentModule() != null) {
  m = m.getParentModule();

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

if (!(module.getParentModule() instanceof WebModule) && !(module.getParentModule() instanceof AppClientModule)) {
  earContext.getSubModuleNames().add(moduleName);
  module.getJndiScope(JndiScope.module).put("module/ModuleName", moduleName);

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

break;
parentModule = parentModule.getParentModule();

相关文章