Package com.sun.enterprise.config.serverbeans

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


       
        protected void doRun() throws ConfigException, ServerLifecycleException {
            //ROB: config changes
            //Applications apps =
                //ServerBeansFactory.getServerBean(mServerContext.getConfigContext()).getApplications();
            final Applications apps = ServerBeansFactory.getApplicationsBean(mServerContext.getConfigContext());
            if (apps == null) return;

            final LifecycleModule[] lcms = apps.getLifecycleModule();
            if(lcms == null) return;
       

            final Set<ServerLifecycleModule> listenerSet = new HashSet<ServerLifecycleModule>();
            for(int i=0;i<lcms.length;i++) {
View Full Code Here


        String appName = event.getApplication().getRegistrationName();
        ConfigContext ctx = event.getConfigContext();
        if (ctx == null) {
            ctx = ApplicationServer.getServerContext().getConfigContext();
        }
        Applications apps = null;
        try {
            apps = ServerBeansFactory.getApplicationsBean(ctx);               
        } catch (Exception e) {
            return null;
        }
        J2eeApplication app = apps.getJ2eeApplicationByName(appName);
           
        if (app == null )
            return null;
           
        if (__logger.isLoggable(Level.FINE)) {
View Full Code Here

            try {
                ServerContext srCtx = ApplicationServer.getServerContext();
                ConfigContext cfgCtx = srCtx.getConfigContext();
       
                Domain domain = ServerBeansFactory.getDomainBean(cfgCtx);
                Applications apps = domain.getApplications();
                Mbean definedMBean = apps.getMbeanByName(alertRef);
                ObjectName objName =
                    CustomMBeanRegistrationImpl.getCascadingAwareObjectName(
                                                                  definedMBean);
                Object[] params = new Object[2];
                String[] signature = new String[2];
View Full Code Here

           
            configBean = ConfigBeansFactory.getConfigBeanByXPath(this.configContext,
                                        ServerXPathHelper.XPATH_APPLICATIONS);
            //RAMAKANTH
            if (configBean == null) {
                configBean = new Applications();
            }

            //ROB: config changes
            // use 'appConfigTemp' so that 'appConfig' can be 'final'
            DasConfig appConfigTemp =
View Full Code Here

        List modules = new Vector();
       
        //ROB: config changes
        //Applications appsBean = serverBean.getApplications();
        Applications appsBean = null;
        try {
            appsBean = ServerBeansFactory.getApplicationsBean(serverBean.getConfigContext());
        } catch (ConfigException e) {
            String msg = _rb.getString("vs.appsConfigError");
            Object[] params = { getID() };
            msg = MessageFormat.format(msg, params);
            _logger.log(Level.SEVERE, msg, e);
        }

        if (appsBean != null) {
            WebModule[] wmBeans = appsBean.getWebModule();
            if (wmBeans != null && wmBeans.length > 0) {
                for (int i = 0; i < wmBeans.length; i++) {
                    WebModule wm = wmBeans[i];
                    if (isActive(wm)) {                     
                        // skips if the web module is not referenced by
View Full Code Here

     *              if there was an error loading its deployment descriptors.
     */
    protected String getDefaultContextPath(Server serverBean) {

        String contextRoot = null;
        Applications appsBean = null;

        try{
            appsBean = ServerBeansFactory.getApplicationsBean(
                serverBean.getConfigContext());
        } catch (ConfigException e) {
            String msg = _rb.getString("vs.appsConfigError");
            Object[] params = { getID() };
            msg = MessageFormat.format(msg, params);
            _logger.log(Level.SEVERE, msg, e);
        }

        String wmID = getDefaultWebModuleID();
        if (wmID != null) {
            // Check if the default-web-module is part of a
            // j2ee-application
            WebModuleConfig wmInfo = findWebModuleInJ2eeApp(appsBean, wmID);

            // Look up the list of standalone web modules
            if (wmInfo == null) {
                WebModule wm = appsBean.getWebModuleByName(wmID);
                if (wm != null) {
                    if (isActive(wm, false)) {
                        // Create a copy as we need to change the name
                        // and context root to indicate that this web module
                        // is to be loaded as the 'default' web module for
View Full Code Here

        List modules = new Vector();
       
        //ROB: config changes
        //Applications appsBean = serverBean.getApplications();
        Applications appsBean = null;
        try {
            appsBean = ServerBeansFactory.getApplicationsBean(serverBean.getConfigContext());
        } catch (ConfigException e) {
            String msg = _rb.getString("vs.appsConfigError");
            Object[] params = { getID() };
            msg = MessageFormat.format(msg, params);
            _logger.log(Level.SEVERE, msg, e);
        }

        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
View Full Code Here

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

    /**
    * 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 returnValue;       
    }   
   
    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

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.