Package com.sun.enterprise.config.serverbeans

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


    }
       
    protected void addApplicationReference(Object cluster, boolean enabled, String name,
        String virtualServers) throws ConfigException
    {       
        ApplicationRef ref = new ApplicationRef();
        ref.setEnabled(enabled);
        ref.setRef(name);
        if (virtualServers != null) {
            ref.setVirtualServers(virtualServers);
        }
        ((Cluster)cluster).addApplicationRef(ref, OVERWRITE);       
    }
View Full Code Here


    }
   
    public static boolean clusterReferencesApplication(Cluster cluster, String appName)
        throws ConfigException
    {
        final ApplicationRef ref = cluster.getApplicationRefByRef(appName);
        return (ref == null) ? false : true;
    }
View Full Code Here

        }
        if (s == null ) {
            String msg = _strMgr.getString("ServerNotDefined", serverName);
            throw new MBeanException ( new ConfigException(msg));
        }
        ApplicationRef appRef = s.getApplicationRefByRef(appName);
        if (appRef == null ) {
            String msg = _strMgr.getString("AppRefNotDefined", appName,
                            serverName);
            throw new MBeanException ( new ConfigException(msg));
        }
        int curTout = Integer.parseInt(appRef.getDisableTimeoutInMinutes());
        boolean enabled = appRef.isLbEnabled();
        if ((enabled == false) && (curTout == timeout)) {
            String msg = _strMgr.getString("AppDisabledOnServer",
                appRef.getRef(), serverName);
            throw new MBeanException(new ConfigException(msg));
        }
        appRef.setLbEnabled(false);
        appRef.setDisableTimeoutInMinutes(new Integer(timeout).toString());
        _logger.log(Level.INFO,_sMgr.getString(
                "http_lb_admin.ApplicationDisabled", appName,serverName));

    }
View Full Code Here

        }
        if (s == null ) {
            String msg = _strMgr.getString("ServerNotDefined", serverName);
            throw new MBeanException ( new ConfigException(msg));
        }
        ApplicationRef appRef = s.getApplicationRefByRef(appName);
        if (appRef == null ) {
            String msg = _strMgr.getString("AppRefNotDefined", appName);
            throw new MBeanException ( new ConfigException(msg));
        }
        boolean enabled = appRef.isLbEnabled();
        if (enabled == true) {
            String msg = _strMgr.getString("AppEnabledOnServer",
                appRef.getRef(), serverName);
            throw new MBeanException(new ConfigException(msg));
        }
        appRef.setLbEnabled(true);
        _logger.log(Level.INFO,_sMgr.getString(
                        "http_lb_admin.ApplicationEnabled",appName,serverName));
   }
View Full Code Here

        }
        if (c == null ) {
            String msg = _strMgr.getString("ClusterNotDefined", clusterName);
            throw new MBeanException ( new ConfigException(msg));
        }
        ApplicationRef appRef = c.getApplicationRefByRef(appName);
        if (appRef == null ) {
            String msg = _strMgr.getString("AppRefNotDefined",
                                            appName, clusterName);
            throw new MBeanException (new ConfigException(msg));
        }
        int curTout = Integer.parseInt(appRef.getDisableTimeoutInMinutes());
        boolean enabled = appRef.isLbEnabled();
        if ((enabled == false) && (curTout == timeout)) {
            String msg = _strMgr.getString("AppDisabledOnCluster",
                appRef.getRef(), clusterName);
            throw new MBeanException(new ConfigException(msg));
        }
        appRef.setLbEnabled(false);
        appRef.setDisableTimeoutInMinutes(new Integer(timeout).toString());
        _logger.log(Level.INFO,_sMgr.getString(
                    "http_lb_admin.ApplicationDisabled", appName,clusterName));

    }
View Full Code Here

        }
        if (c == null ) {
            String msg = _strMgr.getString("ClusterNotDefined", clusterName);
            throw new MBeanException ( new ConfigException(msg));
        }
        ApplicationRef appRef = c.getApplicationRefByRef(appName);
        if (appRef == null ) {
            String msg =
                _strMgr.getString("AppRefNotDefined", appName, clusterName);
            throw new MBeanException ( new ConfigException(msg));
        }
        boolean enabled = appRef.isLbEnabled();
        if (enabled == true) {
            String msg = _strMgr.getString("AppEnabledOnCluster",
                appRef.getRef(), clusterName);
            throw new MBeanException(new ConfigException(msg));
        }
        appRef.setLbEnabled(true);
        _logger.log(Level.INFO,_sMgr.getString(
                    "http_lb_admin.ApplicationEnabled", appName,clusterName));
    }
View Full Code Here

    }          
           
    protected void addApplicationReference(Object server, boolean enabled, String name,
        String virtualServers) throws ConfigException
    {       
        ApplicationRef ref = new ApplicationRef();
        ref.setEnabled(enabled);
        ref.setRef(name);
        if (virtualServers != null) {
            ref.setVirtualServers(virtualServers);
        }
        ((Server)server).addApplicationRef(ref, OVERWRITE);       
    }
View Full Code Here

        } catch (Exception e) {
            e.printStackTrace();
            System.out.println(" Sun web app bean creation failed  " );
        }

        ApplicationRef ref =
            servers.getServerByName(SERVERNAME).getApplicationRefByRef(APPNAME);
        impl = new SunWebModuleReaderImpl(ctx, ref, sunWebApp);
    }
View Full Code Here

        ResourceRef rref = new ResourceRef();
        rref.setEnabled(true);
        rref.setRef("jdbc/__CallFlowPool");

        ApplicationRef aref = new ApplicationRef();
        aref.setEnabled(true);
        aref.setDisableTimeoutInMinutes("30");
        aref.setLbEnabled(false);
        aref.setRef("SipContainerLifecycle");

        cl.addResourceRef(rref);
        cl.addApplicationRef(aref);

        clusters.addCluster(cl);
View Full Code Here

                    processResourceRef(ref);
                }
                else if ( type.equals( mApplicationRefType ) )
                {
                    mLogger.fine( "NEW ApplicationRef MBEAN registered: " + objectName);
                    final ApplicationRef ref = (ApplicationRef) ConfigBeanRegistry.getInstance().getConfigBean(objectName);
                    processApplicationRef(ref);
                }
            }
            else if (notif.getType().equals(MBeanServerNotification.UNREGISTRATION_NOTIFICATION))
            {
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.