Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.ExtensionModule


            } else {
                ConfigBean wm = wmInfo.getBean();
                if(wm instanceof WebModule) {
                    contextRoot = ((WebModule)wm).getContextRoot();
                } else {
                    ExtensionModule emBean = (ExtensionModule)wm;
                    contextRoot =
                      emBean.getElementPropertyByName("contextRoot").getValue();
                }
            }

            if (contextRoot == null) {
                Object[] params = { wmID, getID() };
View Full Code Here


        if (appsBean != null) {
            ExtensionModule[] emBeans = appsBean.getExtensionModule();
            if (emBeans != null && emBeans.length > 0) {
                for (int i = 0; i < emBeans.length; i++) {
                    ExtensionModule em = emBeans[i];
                    if (isActive(em)) {                     
                        // skips if the extension module is not referenced by
                        // this server
                        ApplicationRef ref =
                            serverBean.getApplicationRefByRef(em.getName());
                        if (ref == null) {
                            continue;
                        }                      

                        String location = em.getLocation();
                        // If module root is relative then prefix it with the
                        // location of where all the standalone modules for
                        // this server instance are deployed
                        File moduleBase = new File(location);
                        if (!moduleBase.isAbsolute()) {
                            location = modulesRoot+File.separator+location;
                            em.setLocation(location);
                        }
                        WebModuleConfig wmInfo = loadWebModuleConfig(em);
                        if (wmInfo != null)
                            modules.add(wmInfo);
                    } else {
                        if (_debug) {
                            _logger.finer("Web Module [" + em.getName() +
                                          "] is not applicable for virtual " +
                                          " server [" + getID() + "]");
                        }
                    }
                }
View Full Code Here

     * @param moduleId The module id of the extension module
     * @return A comma separated list representing the libraries
     * specified by the deployer.
     */
    public static String getLibrariesForExtensionModule(String moduleId) {
        ExtensionModule app = null;
        try {
            app = getApplications().getExtensionModuleByName(moduleId);
            if(app == null) return null;
        } catch(ConfigException malEx) {
            _logger.log(Level.WARNING, "loader.cannot_convert_classpath_into_url",
                                                                                           moduleId);
            _logger.log(Level.WARNING,"loader.exception", malEx);           
        }
        return app.getLibraries();
    }
View Full Code Here

    }
       
    private Properties getProperties() {
      Properties result = null;
      try {
        ExtensionModule  em = ((ExtensionModuleConfigManager)configManager).getExtensionModule(id);
        ElementProperty[] eProp = em.getElementProperty();
        if (eProp.length != 0) {
          // return a non-null result
          result = new Properties();
          for(int j=0; j<eProp.length; j++) {
            ElementProperty eProp1 = eProp[j];
View Full Code Here

        }
       
        // Set the context root on the extension module as a property
        if(appBean instanceof ExtensionModule) {
           
            ExtensionModule extApp = (ExtensionModule) appBean;
           
            ElementProperty isConvergedProperty = new ElementProperty();
            isConvergedProperty.setName(IS_CONVERGED);
           
            ElementProperty contextRootProperty = new ElementProperty();
            contextRootProperty.setName(CONTEXT_ROOT);
           
            Properties props = request.getOptionalArguments();

            /*
             * The (name=value)[:name=value]* of the property option is
             * converted to ElementProperty here.
             */
            Map<String, String> propMap = (Map) props.get("property");
            if(propMap != null) {
                ArrayList list = new ArrayList();
                for (Iterator<String> itr = propMap.keySet().iterator(); itr.hasNext();) {
                    String key = itr.next();
                    ElementProperty property = new ElementProperty();
                    property.setName(key);
                    property.setValue(propMap.get(key));
                    list.add(property);
                }

                ElementProperty[] eProp = (ElementProperty[]) list.toArray(new ElementProperty[list.size()]);
                extApp.setElementProperty(eProp);
            }

            String value = props.getProperty("isConverged");
            if(value != null ) {
                if("true".equals(value)) {
                    isConvergedProperty.setValue("true");
                    // Check if context root is explictily set
                    if(request.getContextRoot() != null) {
                        contextRootProperty.setValue(request.getContextRoot());
                    } else {
                        contextRootProperty.setValue(
                            request.getDefaultContextRoot());
                    }
                    if(extApp.getElementPropertyByName("isConverged") != null ) {
                        extApp.removeElementProperty(
                               extApp.getElementPropertyByName("isConverged"));
                    }
                    if(extApp.getElementPropertyByName("contextRoot") != null) {
                         extApp.removeElementProperty(
                                extApp.getElementPropertyByName("contextRoot"));
                    }
                    extApp.addElementProperty(isConvergedProperty, true);
                    extApp.addElementProperty(contextRootProperty, true );
                } else {
                    isConvergedProperty.setValue("false");
                    if(extApp.getElementPropertyByName("isConverged") != null ) {
                        extApp.removeElementProperty(
                            extApp.getElementPropertyByName("isConverged"));
                    }
                    extApp.addElementProperty(isConvergedProperty);               
                }
            }
        }
       
        // now see if there is a property added for j2ee-applications
View Full Code Here

        } else if (type.equals(DeployableObjectType.EJB)) {
            result = new EjbModule();
        } else if (type.equals(DeployableObjectType.WEB)) {
            result = new WebModule();
        } else {
            result = new ExtensionModule();
        }
        return result;
    }
View Full Code Here

                // returning a value
                if("true".equals(
                       ((ExtensionModule)_wmBean).
                              getElementPropertyByName("isConverged").
                                                             getValue())) {
                    ExtensionModule emBean = (ExtensionModule)_wmBean;
                    ctxPath = emBean.getElementPropertyByName("contextRoot").
                                                                     getValue();
                   
                } else {
                    ctxPath ="/"+ getModuleName();
                }
View Full Code Here

        long b = System.currentTimeMillis();

        _logger.log(Level.FINE, "synchronization.start.download.bits", appName);

        ExtensionModule app = null;
        try {
            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getExtensionModuleByName(appName);
        } catch (ConfigException ce) {
View Full Code Here

        boolean sipModuleAvailability = false;
        J2eeApplication j2eeApp = ctx.getApplicationBean();

        if (j2eeApp == null) {
            // The stand-alone sip module case
            ExtensionModule bean = (ExtensionModule) ctx.getBean();
            sipModuleAvailability = bean.isAvailabilityEnabled();
        } else {
            // The j2ee application case
            sipModuleAvailability = j2eeApp.isAvailabilityEnabled();
        }
View Full Code Here

                      ((com.sun.enterprise.config.serverbeans.WebModule)wmInfo.
                            getBean()).getContextRoot();
            } else {
                if("true".equals(((ExtensionModule)wmInfo.getBean()).
                         getElementPropertyByName("isConverged").getValue())) {
                    ExtensionModule emBean = (ExtensionModule)wmInfo.getBean();
                    contextRoot =
                            emBean.getElementPropertyByName("contextRoot").
                                                                     getValue();
                } else {
                    contextRoot = wmInfo.getModuleName();
                   
                }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.ExtensionModule

Copyright © 2018 www.massapicom. 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.