Package com.sun.enterprise.config.serverbeans

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


                return false;
            }

            // find the ref to the life cycle module
            final Server server = ServerBeansFactory.getServerBean(config);
            final ApplicationRef appRef=server.getApplicationRefByRef(lcm.getName());

            // true if enabled in both lifecyle module and in the ref
            return ((lcm.isEnabled()) &&
                        (appRef != null && appRef.isEnabled()));

        } catch (ConfigException e) {
            return false;
        }
    }
View Full Code Here


        getWebModule(modId).setDescription(desc);
    }
   
    public String getVirtualServers(String modId) throws ConfigException {
  Server server = ServerBeansFactory.getServerBean(configContext);
  ApplicationRef ar = server.getApplicationRefByRef(modId);
  return ar.getVirtualServers();
    }
View Full Code Here

    protected boolean isEnabled(ConfigContext config, String moduleName) {
        try {
            ConfigBean app = ApplicationHelper.findApplication(config, moduleName);

            Server server = ServerBeansFactory.getServerBean(config);
            ApplicationRef appRef = server.getApplicationRefByRef(moduleName);

            return ((app != null && app.isEnabled()) &&
                        (appRef != null && appRef.isEnabled()));
        } catch (ConfigException e) {
            AdminEventListenerException ex = new AdminEventListenerException();
            ex.initCause(e);
            _logger.log(Level.FINE, "Error in finding " + moduleName, e);
View Full Code Here

    protected boolean isEnabled(ConfigContext config, String moduleName) {
        try {
            ConfigBean app = ApplicationHelper.findApplication(config, moduleName);

            Server server = ServerBeansFactory.getServerBean(config);
            ApplicationRef appRef = server.getApplicationRefByRef(moduleName);

            return ((app != null && app.isEnabled()) &&
                        (appRef != null && appRef.isEnabled()));
        } catch (ConfigException e) {
            AdminEventListenerException ex = new AdminEventListenerException();
            ex.initCause(e);
            _logger.log(Level.FINE, "Error in finding " + moduleName, e);
View Full Code Here

                for (int i = 0; i < wmBeans.length; i++) {
                    WebModule wm = wmBeans[i];
                    if (isActive(wm)) {                     
                        // skips if the web module is not referenced by
                        // this server
                        ApplicationRef ref =
                            serverBean.getApplicationRefByRef(wm.getName());
                        if (ref == null) {
                            continue;
                        }                      
View Full Code Here

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

                if (savedAppRefInfo != null) {
                    /*
                     *Find the newly-created app ref. and assign the saved
                     *values.
                     */
                    ApplicationRef newAppRef = ApplicationReferenceHelper.findCurrentAppRef(
                            deploymentCtx,
                            target.getName(),
                            req.getName());
                    newAppRef.setLbEnabled(savedAppRefInfo.appRef().isLbEnabled());
                    newAppRef.setDisableTimeoutInMinutes(savedAppRefInfo.appRef().getDisableTimeoutInMinutes());
                }
                postPhaseNotify(getPostPhaseEvent(req));
            }
            sendAssociateEvent(req);
           
View Full Code Here

    protected boolean isEnabled (ConfigContext config, String moduleName) {
        try {
            ConfigBean app = ApplicationHelper.findApplication(config, moduleName);

            Server server = ServerBeansFactory.getServerBean(config);
            ApplicationRef appRef = server.getApplicationRefByRef(moduleName);
            return ((app != null && app.isEnabled()) &&
                        (appRef != null && appRef.isEnabled()));
        } catch (ConfigException e) {
            AdminEventListenerException ex = new AdminEventListenerException();
            ex.initCause(e);
            _logger.log(Level.FINE, "Error in finding " + moduleName, e);
View Full Code Here

             *Remove the app ref and send the event unless this is part of a
             *redeployment sequence of operations and the attributes for the app
             *ref will not change as a result of the deployment, compared to
             *their current values.
             */
            ApplicationRef ref = ApplicationReferenceHelper.findCurrentAppRef(
                    deploymentCtx, target.getName(), req.getName());
            boolean needToRemoveRef = true;
            DeploymentContext.SavedApplicationRefInfo info = null;
            if (req.isRedeployInProgress()) {
                /*
                 *Save a pointer to the existing app ref for use during the later
                 *disassociate phase.
                 */

                String virtualServers = null;
                Properties optionalAttrs = req.getOptionalAttributes();
                if (optionalAttrs != null) {
                    virtualServers = (String) optionalAttrs.get(ServerTags.VIRTUAL_SERVERS);
                }
                if (virtualServers == null && ref.getVirtualServers() != null) {
                    // if user does not specify virtual server in a redeployment
                    // preserve the value from last deployment
                    virtualServers = ref.getVirtualServers();

                    // also set it in request so subsequent retrieval
                    // will get the proper value
                    if (req.getOptionalAttributes() == null) {
                        Properties optionalAttributes = new Properties();
View Full Code Here

                config = AdminService.getAdminService().getAdminContext().getAdminConfigContext();
            }
            ConfigBean app = ApplicationHelper.findApplication(config,
                moduleName);
            Server server = ServerBeansFactory.getServerBean(config);
            ApplicationRef appRef = server.getApplicationRefByRef(moduleName);

            return ((app != null && app.isEnabled()) &&
                        (appRef != null && appRef.isEnabled()));
        } catch (ConfigException e) {
            _logger.log(Level.FINE, "Error in finding " + moduleName, e);

            //If there is anything wrong, do not enable the module
            return false;
View Full Code Here

TOP

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

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.