Examples of WebModuleConfig


Examples of com.sun.appserv.management.config.WebModuleConfig

        SunTarget sunTarget = (SunTarget) tmid.getTarget();
        /*
         *Navigate to the Web app's proxy.
         */
        WebModuleConfig webProxy = (WebModuleConfig)getDomainConfigProxy().
            getContainee(XTypes.WEB_MODULE_CONFIG, moduleID);
       
        String path = webProxy.getContextRoot();
        if (!path.startsWith("/")) { //NOI18N
            path = "/" + path; //NOI18N
        }
       
        // Patchup code for fixing netbeans issue 6221411; Need to find a good solution for this and WSDL publishing
View Full Code Here

Examples of com.sun.appserv.management.config.WebModuleConfig

                    deployedItemRefConfig.setLBEnabled(true);
                }
                continue;
            }
            //Check to see if this is Web module
            final WebModuleConfig web =
                    mDomainConfig.getWebModuleConfigMap().get(deployedItemRefConfig.getName());
            if (web != null) {
                //if the type is user, then only set the lb-enabled to true
                if(web.getObjectType().equals(ObjectTypeValues.USER)) {
                    deployedItemRefConfig.setLBEnabled(true);
                }
                continue;
            }
            //Check to see if this is EJB module
View Full Code Here

Examples of com.sun.appserv.management.config.WebModuleConfig

      }
  }else
  if ("webApp".equals(appType)){
            module = AMXUtil.getDomainConfig().getWebModuleConfigMap().get(name);
      if (module != null){
                WebModuleConfig webModule = (WebModuleConfig) module;
    handlerCtx.setOutputValue("contextRoot", webModule.getContextRoot());
    handlerCtx.setOutputValue("availEnabled", webModule.getAvailabilityEnabled());
    if(!AMXUtil.supportCluster()) {
      //We need this only for PE, so hard code it "server"
      handlerCtx.setOutputValue("vs", TargetUtil.getAssociatedVS(name, "server"));
    }
      }
View Full Code Here

Examples of com.sun.appserv.management.config.WebModuleConfig

      }
  }else
  if ("webApp".equals(appType)){
      module = AMXUtil.getDomainConfig().getWebModuleConfigMap().get(name);
      if (module != null){
                WebModuleConfig webModule = (WebModuleConfig) module;
    webModule.setContextRoot((String)handlerCtx.getInputValue("contextRoot"));
                if (AMXUtil.isEE()){
                    Boolean ae = (Boolean)handlerCtx.getInputValue("availEnabled");
                    if (ae != null)
                        webModule.setAvailabilityEnabled(ae);
                }
    else {
      String vs = (String)handlerCtx.getInputValue("vs");
      //only for PE, so hard-code to 'server'
      TargetUtil.setVirtualServers(name, "server", vs);
View Full Code Here

Examples of com.sun.appserv.management.config.WebModuleConfig

       
        String serverName = (String) handlerCtx.getInputValue("serverName");
        Iterator<WebModuleConfig> iter = AMXUtil.getDomainConfig().getWebModuleConfigMap().values().iterator();
        List result = new ArrayList();
        while(iter.hasNext()){
            WebModuleConfig appConfig = iter.next();
            if (ObjectTypeValues.USER.equals(appConfig.getObjectType())){
                HashMap oneRow = new HashMap();
                String protocol = "http" ;
                String enable =  TargetUtil.getEnabledStatus(appConfig, true);
                oneRow.put("name", appConfig.getName());
                oneRow.put("enabled", enable);
                String contextRoot = appConfig.getContextRoot();
                oneRow.put("contextRoot", contextRoot);
                String port = getPortForApplication(appConfig.getName());
                if (port.startsWith("-") ){
                    protocol="https";
                    port = port.substring(1);
                }
                oneRow.put("port", port);
View Full Code Here

Examples of com.sun.enterprise.web.WebModuleConfig

     * @return WebModuleConfig
     */
    public WebModuleConfig getModuleConfig(ExtensionModule em,
                                                      WebBundleDescriptor wbd) {
       
        WebModuleConfig wmInfo = new WebModuleConfig();      
        wmInfo.setBean(em);
        String wmID = em.getName();
        try {
            wmInfo.setDescriptor(wbd);
            String vs = configManager.getVirtualServers(wmID);
            wmInfo.setVirtualServers(vs);
        } catch (Exception ce) {
            wmInfo = null;
        }
        return wmInfo;       
    }
View Full Code Here

Examples of com.sun.enterprise.web.WebModuleConfig

     */
    public boolean loadJ2eeApplicationModule(ArchiveDescriptor descriptor)
                                                             throws Exception {
       
        com.sun.enterprise.config.serverbeans.ExtensionModule em = null;
        WebModuleConfig wmInfo = null;  
        Application appDesc = null;

        J2eeApplication j2eeAppBean = getJ2eeAppBean();
        ConfigContext eventConfigContext = j2eeAppBean.getConfigContext();
        String id = j2eeAppBean.getName();
        String location = j2eeAppBean.getLocation();
        String resourceType = j2eeAppBean.getObjectType()
       
        //TODO : Check if enabled and take action
       
        // get the application descriptor
        ApplicationRegistry registry = ApplicationRegistry.getInstance();
        ClassLoader appLoader = registry.getClassLoaderForApplication(id);
        if (appLoader != null) {
            appDesc = registry.getApplication(appLoader);
        }
        // If the Application object is null then we should not load.
        if(appDesc == null ) {
            // log message
            return false;
        }
        String j2eeApplication = appDesc.getRegistrationName();
       
        // get the Bundle Descriptor
        WebBundleDescriptor wbd = (WebBundleDescriptor)descriptor;
        String moduleName = wbd.getModuleDescriptor().getArchiveUri();
                           
        StringBuffer dir = new StringBuffer(location);
        dir.append(File.separator);
        dir.append(FileUtils.makeFriendlyFilename(moduleName));
        if (!(new File(dir.toString()).exists())) {
            dir = new StringBuffer(location).append(
                            File.separator).append(moduleName);
        }

        // set the values in the ExtensionModule config bean
        em = new com.sun.enterprise.config.serverbeans.ExtensionModule();
        em.setLocation(dir.toString().trim());
        em.setConfigContext(eventConfigContext);
        em.setName(moduleName);
        ElementProperty isConvergedProperty = new ElementProperty();
        isConvergedProperty.setName("isConverged");
        if(wbd.getContextRoot() != null) {
            isConvergedProperty.setValue("true");
            ElementProperty contextRootProperty = new ElementProperty();
            contextRootProperty.setName("contextRoot");
            contextRootProperty.setValue(wbd.getContextRoot());
            em.addElementProperty(contextRootProperty);
        } else {
            isConvergedProperty.setValue("false");
        }  
        em.addElementProperty(isConvergedProperty);
        em.setEnabled(true);
        em.setObjectType(resourceType);

        // create and populate the WebModuleConfig object
        wmInfo = new WebModuleConfig();
       
        wmInfo.setBean(em);
        wmInfo.setApplicationBean(j2eeAppBean);
        wmInfo.setDescriptor(wbd);
        wmInfo.setParentLoader(appLoader);
        wmInfo.setVirtualServers(getVirtualServers(id, eventConfigContext));
       
        // Call into the WebContainer
        List<Throwable> throwables =
                getWebContainer().loadWebModule(wmInfo, j2eeApplication);
        setJ2eeAppBean(null);
View Full Code Here

Examples of com.sun.enterprise.web.WebModuleConfig

     *              deployment descriptors.
     */
    private WebModuleConfig loadWebModuleConfig(WebModule wm,
        ConfigContext config) {

        WebModuleConfig wmInfo = new WebModuleConfig();
        wmInfo.setBean(wm);
        String wmID = wm.getName();
        String location = wm.getLocation();
        try {
      Application app = getWebModulesManager().getDescriptor(wmID,
                location);
            WebBundleDescriptor wbd = (WebBundleDescriptor) app.getStandaloneBundleDescriptor();               
            wmInfo.setDescriptor(wbd);
            String vs = ServerBeansFactory.getVirtualServersByAppName(
                    config, wmID);
            wmInfo.setVirtualServers(vs);
        } catch (ConfigException ce) {
            wmInfo = null;
        }
        return wmInfo;
       
View Full Code Here

Examples of com.sun.enterprise.web.WebModuleConfig

        String modulesRoot = getWebContainer().getModulesRoot();
        if (!moduleBase.isAbsolute()) {
            location = modulesRoot+File.separator+location;
            webModule.setLocation(location);
        }
        WebModuleConfig wmInfo = loadWebModuleConfig(webModule, config);
        List<Throwable> throwables =
            getWebContainer().loadWebModule(wmInfo, "null");
        if (throwables != null && !throwables.isEmpty()) {
            //we don't have the ability to return all errors.  so return the
            //first one, enough to signal the problem.
View Full Code Here

Examples of com.sun.enterprise.web.WebModuleConfig

            String modulesRoot = getWebContainer().getModulesRoot();
            if (!moduleBase.isAbsolute()) {
                location = modulesRoot+File.separator+location;
                webModule.setLocation(location);
            }
            WebModuleConfig wmInfo = loadWebModuleConfig(webModule, config);
            getWebContainer().enableWebModule(wmInfo, "null");
        }
       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.