Package com.sun.enterprise.config.serverbeans

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


    /**
    * Get the applications element from domain.xml.
    * return null if not found
    */    
    private Applications getApplicationsBeanDynamic() {
        Applications applicationsBean = null;
        Domain domainBean = null;
        ConfigContext configCtx = this.getConfigContextDynamic();
        try {
            domainBean = ServerBeansFactory.getDomainBean(configCtx);
            if(domainBean != null) {
View Full Code Here


    * return null if not found
    * @param name
    */     
    private EjbModule getEjbModuleByName(String name) {
        EjbModule result = null;
        Applications applicationsBean = this.getApplicationsBeanDynamic();
        if(applicationsBean == null) {
            return null;
        }
        return applicationsBean.getEjbModuleByName(name);
    }
View Full Code Here

    * return null if not found
    * @param appName
    */    
    private J2eeApplication getJ2eeApplicationByName(String appName) {
        J2eeApplication result = null;
        Applications applicationsBean = this.getApplicationsBeanDynamic();
        if(applicationsBean == null) {
            return null;
        }
        return applicationsBean.getJ2eeApplicationByName(appName);
    }
View Full Code Here

                ApplicationRef appRef = verifyActionMBean(actionMBeanName, domain,
                                                          ctxToUse);
      
      
                if (appRef != null) {
                    Applications apps = domain.getApplications();
                    Mbean definedMBean = apps.getMbeanByName(actionMBeanName);   
               
                  
                    if (appRef.isEnabled() && definedMBean.isEnabled() ) {
                        if ((definedMBean.getObjectType()).equals(USER_DEFINED_TYPE)) {
                            actionObjName = registerAction(ruleEvent,actionMBeanName,
View Full Code Here

            }
       
            //should have obtained the app reference, if all well
            if (appRef != null) {
                //check there exists a definition
                Applications apps = domain.getApplications();
                Mbean definedMBean = apps.getMbeanByName(actionMBeanName);
                if (definedMBean == null ) {
                    appRef = null;
                }
            }
        } catch (ConfigException ex) {
View Full Code Here

          Domain domain = ServerBeansFactory.getDomainBean(ctxToUse);
          ApplicationRef appRef = verifyActionMBean(actionMBeanName, domain, ctxToUse);


          if (appRef != null) {
              Applications apps = domain.getApplications();
              Mbean definedMBean = apps.getMbeanByName(actionMBeanName);


              if (appRef.isEnabled() && definedMBean.isEnabled() ) {
                  if ((definedMBean.getObjectType()).equals(USER_DEFINED_TYPE)) {
                      actionObjName = registerAction(ruleEvent,actionMBeanName,
View Full Code Here

        if (_reloadingEnabled) {
            // Enable dynamic reloading (via the .reload file) for all
            // standalone web-modules that are marked as enabled
            Applications appsBean = null;
            try {
              appsBean = ServerBeansFactory.getApplicationsBean(_configContext);
            } catch (ConfigException e) {
               String msg = _rb.getString("webcontainer.appsConfigError");
               _logger.log(Level.SEVERE, msg, e);
            }

            _reloadManager = new StandaloneWebModulesManager(_id,
                                                             _modulesRoot,
                                                             _pollInterval);
            if (appsBean != null) {
                com.sun.enterprise.config.serverbeans.WebModule[] wmBeans = appsBean.getWebModule();
                if (wmBeans != null && wmBeans.length > 0) {
                    _reloadManager.addWebModules(wmBeans);
                }
            }
        }
View Full Code Here

     *
     * @param isStartUp true, if this is called during server startup
     */
    private void loadAllJ2EEApplicationWebModules(boolean isStartUp) {

        Applications appsBean = null;
        try {
            appsBean = ServerBeansFactory.getApplicationsBean(_configContext);
        } catch (ConfigException e) {
            String msg = _rb.getString("webcontainer.appsConfigError");
            _logger.log(Level.SEVERE, msg, e);
        }

        if (appsBean != null) {
            J2eeApplication[] j2eeAppBeans = appsBean.getJ2eeApplication();
            if (j2eeAppBeans != null) {
                for (int i = 0; i < j2eeAppBeans.length; i++) {
                    //Begin EE: 4927099 - load only associated applications
                    if ( isReferenced(j2eeAppBeans[i].getName()) ) {
                        loadJ2EEApplicationWebModules(j2eeAppBeans[i]);
View Full Code Here

    /**
     * Enables monitoring of web service endpoints in for all webmodules.
     */
    private void enableAllWSEndpoints() {

        Applications appsBean = null;
        try {
            appsBean = ServerBeansFactory.getApplicationsBean(_configContext);
        } catch (ConfigException e) {
            String msg = _rb.getString("webcontainer.appsConfigError");
            _logger.log(Level.SEVERE, msg, e);
        }

        if (appsBean != null) {
            J2eeApplication[] j2eeAppBeans = appsBean.getJ2eeApplication();
            if (j2eeAppBeans != null) {
                for (int i = 0; i < j2eeAppBeans.length; i++) {
                    //Begin EE: 4927099 - load only associated applications
                    if ( isReferenced(j2eeAppBeans[i].getName()) ) {
                        enableWSMonitoring(j2eeAppBeans[i].getName());
View Full Code Here

    protected void addSystemApplications(Object clusterOrServer) throws ConfigException
    {       
        final ConfigContext configContext = getConfigContext();
        final Domain domain = ConfigAPIHelper.getDomainConfigBean(
            configContext);
        final Applications applications = domain.getApplications();
        ConnectorModule[] connectors = applications.getConnectorModule();       
        for (int i = 0; i < connectors.length; i++) {
            if (isSystemApp(connectors[i].getObjectType())) {
                addApplicationReference(clusterOrServer, connectors[i].isEnabled(),
                    connectors[i].getName());
            }
        }
        EjbModule[] ejbs = applications.getEjbModule();
        for (int i = 0; i < ejbs.length; i++) {
            if (isSystemApp(ejbs[i].getObjectType())) {
                addApplicationReference(clusterOrServer, ejbs[i].isEnabled(),
                    ejbs[i].getName());
            }
        }
        J2eeApplication[] apps = applications.getJ2eeApplication();
        for (int i = 0; i < apps.length; i++) {
            if (isSystemApp(apps[i].getObjectType())) {
                addApplicationReference(clusterOrServer, apps[i].isEnabled(),
                    apps[i].getName());
            }
        }
        WebModule[] webs = applications.getWebModule();
        for (int i = 0; i < webs.length; i++) {
            if (isSystemApp(webs[i].getObjectType())) {
                addApplicationReference(clusterOrServer, webs[i].isEnabled(),
                    webs[i].getName());
            }
        }

  Mbean[] mbeans = applications.getMbean();
  for (int i = 0; i < mbeans.length; i++) {
      if (isSystemApp(mbeans[i].getObjectType())) {
          addApplicationReference(clusterOrServer, mbeans[i].isEnabled(),
                       mbeans[i].getName());
            }
  }

        //There doesnt seem to be a way to add system lifecycle module.
        //Adding this hack temperorily until this is disussed and
        //decided.
       /*  LifecycleModule[] lcs = applications.getLifecycleModule();
        for (LifecycleModule lcm : lcs) {
            if (lcm.getName().equals("JBIFramework")) {
                addApplicationReference(clusterOrServer, lcm.isEnabled(),
                    lcm.getName());
            }
        } */
        // Attempting to add a ref for all LCMs
        LifecycleModule[] lcs = applications.getLifecycleModule();
        for (LifecycleModule lcm : lcs) {
            if (isSystemApp(lcm.getObjectType())) {
                addApplicationReference(clusterOrServer, lcm.isEnabled(),
                    lcm.getName());
            }
View Full Code Here

TOP

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

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.