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

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

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

Module.getName介绍

暂无

代码示例

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

private void processAnnotations(JndiConsumer ejb, Module module) {
  // Process all the annotations for this naming builder type
  if (EJBAnnotationHelper.annotationsPresent(module.getClassFinder())) {
    try {
      EJBAnnotationHelper.processAnnotations(ejb, module.getClassFinder());
    } catch (Exception e) {
      log.warn("Unable to process @EJB annotations for module" + module.getName(), e);
    }
  }
}

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

private void processAnnotations(JndiConsumer specDD, Module module) throws DeploymentException {
  // Process all the annotations for this naming builder type
  //At the moment the only exception thrown is if the resulting doc is not valid.  Bail now.
  try {
    WebServiceRefAnnotationHelper.processAnnotations(specDD, module.getClassFinder());
    ResourceAnnotationHelper.processAnnotations(specDD, module.getClassFinder(), ServiceRefProcessor.INSTANCE);
  }
  catch (Exception e) {
    log.warn("Unable to process @Resource annotations for module" + module.getName(), e);
  }
}

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

private Map buildServletMappings(Module module, WebAppType webApp, Map<String, Set<String>> servletMappings, Set<String> knownServletMappings) throws DeploymentException {
  ServletType[] servletTypes = webApp.getServletArray();
  Set<String> knownServlets = new HashSet<String>();
  for (ServletType type : servletTypes) {
    knownServlets.add(type.getServletName().getStringValue().trim());
  }
  ServletMappingType[] servletMappingArray = webApp.getServletMappingArray();
  for (ServletMappingType servletMappingType : servletMappingArray) {
    String servletName = servletMappingType.getServletName().getStringValue().trim();
    if (!knownServlets.contains(servletName)) {
      throw new DeploymentException("Web app " + module.getName() +
          " contains a servlet mapping that refers to servlet '" + servletName +
          "' but no such servlet was found!");
    }
    UrlPatternType[] urlPatterns = servletMappingType.getUrlPatternArray();
    addMappingsForServlet(servletName, urlPatterns, knownServletMappings, servletMappings);
  }
  return servletMappings;
}

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

public void initContext(XmlObject specDD, XmlObject plan, Module module) throws DeploymentException {
  List<MessageDestinationType> specDestinations = convert(specDD.selectChildren(messageDestinationQNameSet), JEE_CONVERTER, MessageDestinationType.class, MessageDestinationType.type);
  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 (MessageDestinationType specDestination : specDestinations) {
      if (specDestination.getMessageDestinationName().getStringValue().trim().equals(name)) {
        found = true;
        break;
      }
    }
    if (!found) {
      throw new DeploymentException("No spec DD message-destination for " + name);
    }
  }
  module.getRootEarContext().registerMessageDestionations(module.getName(), nameMap);
}

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

private void configureTagLibs(Module module, WebAppType webApp, GBeanData webModuleData, Map<String, Set<String>> servletMappings, Set<String> knownServletMappings, String jspServletName) throws DeploymentException {
  JspConfigType[] jspConfigArray = webApp.getJspConfigArray();
  if (jspConfigArray.length > 1) {
    throw new DeploymentException("Web app " + module.getName() + " cannot have more than one jsp-config element.  Currently has " + jspConfigArray.length + " jsp-config elements.");
  }
  Map<String, String> tagLibMap = new HashMap<String, String>();
  for (JspConfigType aJspConfigArray : jspConfigArray) {
    TaglibType[] tagLibArray = aJspConfigArray.getTaglibArray();
    for (TaglibType taglib : tagLibArray) {
      tagLibMap.put(taglib.getTaglibUri().getStringValue().trim(), taglib.getTaglibLocation().getStringValue().trim());
    }
    for (JspPropertyGroupType propertyGroup: aJspConfigArray.getJspPropertyGroupArray()) {
      UrlPatternType[] urlPatterns = propertyGroup.getUrlPatternArray();
      addMappingsForServlet(jspServletName, urlPatterns, knownServletMappings, servletMappings);
    }
  }
  webModuleData.setAttribute("tagLibMap", tagLibMap);
}

代码示例来源:origin: org.apache.geronimo.plugins/plancreator-portlets

public void parseEAR(ApplicationInfo applicationInfo) {
  environmentConfig = new EnvironmentConfigData(getEnterpriseApp().addNewEnvironment());
  environmentConfig.parseEnvironment(applicationInfo.getEnvironment());
  LinkedHashSet<Module<?,?>> modules = applicationInfo.getModules();
  for (Module<?,?> module : modules) {
    //Module module = (Module) module1;
    if (ConfigurationModuleType.WAR == module.getType()) {
      WARConfigData warConfig = new WARConfigData();
      warConfig.parseReferences(((WebModule) module).getSpecDD());
      warConfig.parseSecurity(((WebModule) module).getSpecDD());
      webModules.put(module.getName(), warConfig);
    } else if (ConfigurationModuleType.EJB == module.getType()) {
      EjbConfigData ejbConfig = new EjbConfigData();
      ejbModules.put(module.getName(), ejbConfig);
    } else {
      System.out.println("Module Type = " + module.getType());
    }
  }
}

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

JndiEncInfo compJndi = new JndiEncInfo();
String moduleId = module.getName();
jndiEncInfoBuilder.build(specDD, "GeronimoEnc", moduleId, module.getModuleURI(), moduleJndi, compJndi);

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

log.warn("Unable to process @Resource annotations for module" + module.getName(), e);

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

log.warn("Unable to process @Resource annotations for module" + module.getName(), e);

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

log.warn("Unable to process @Resource annotations for module" + module.getName(), e);

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

appModule.setModuleId(ejbModule.getParentModule().getName());

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

String moduleName = module.getName();

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

log.warn("Unable to process @Resource annotations for module" + module.getName(), e);

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

log.warn("Unable to process @Resource annotations for module" + module.getName(), e);

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

ResourceAnnotationHelper.processAnnotations(module.getAnnotatedApp(), module.getClassFinder(), processor);
} catch (Exception e) {
  log.warn("Unable to process @Resource annotations for module " + module.getName(), e);

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

public void initContext(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
    WebAppType webApp = (WebAppType) module.getSpecDD();
//        MessageDestinationType[] messageDestinations = webApp.getMessageDestinationArray();
    TomcatWebAppType gerWebApp = (TomcatWebAppType) module.getVendorDD();
//        GerMessageDestinationType[] gerMessageDestinations = gerWebApp.getMessageDestinationArray();

//        ENCConfigBuilder.registerMessageDestinations(earContext, module.getName(), messageDestinations, gerMessageDestinations);
    getNamingBuilders().initContext(webApp, gerWebApp, module.getEarContext().getConfiguration(), earContext.getConfiguration(), module);
    if ((webApp.getSecurityConstraintArray().length > 0 || webApp.getSecurityRoleArray().length > 0) &&
        !gerWebApp.isSetSecurityRealmName()) {
      throw new DeploymentException("web.xml for web app " + module.getName() + " includes security elements but Geronimo deployment plan is not provided or does not contain <security-realm-name> element necessary to configure security accordingly.");
    }
    boolean hasSecurityRealmName = gerWebApp.isSetSecurityRealmName();
    buildSubstitutionGroups(gerWebApp, hasSecurityRealmName, module, earContext);
  }

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

private void configureLoginConfigs(Module module, WebAppType webApp, JettyWebAppType jettyWebApp, GBeanData webModuleData) throws DeploymentException {
  LoginConfigType[] loginConfigArray = webApp.getLoginConfigArray();
  if (loginConfigArray.length > 1) {
    throw new DeploymentException("Web app " + module.getName() + " cannot have more than one login-config element.  Currently has " + loginConfigArray.length + " login-config elements.");

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

module.getEnvironment(),
module.getModuleName(),
module.getName(),
jarFile,
null,

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

AbstractName resourceAdapterjsr77Name = earContext.getNaming().createChildName(resourceAdapterModuleName, module.getName(), NameFactory.RESOURCE_ADAPTER);
AbstractName jcaResourcejsr77Name = earContext.getNaming().createChildName(resourceAdapterjsr77Name, module.getName(), NameFactory.JCA_RESOURCE);

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

XmlObject[] tsss = plan.selectChildren(TSS_QNAME);
String[] jndiNames = toStringArray(plan.selectChildren(JNDI_NAME_QNAME));
AbstractNameQuery ejbModuleName = NameFactory.newTypeNameQuery(module.getEarContext().getConfigID(), NameFactory.EJB_MODULE, module.getName());
for (int i = 0; i < tssLinks.length; i++) {
  String tssLink = tssLinks[i];

相关文章