Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.Cluster$DeleteDecorator


            String msg = _localStrMgr.getString("ConfigBeanAndNameNull");
            throw new IllegalArgumentException(msg);
        }
        _ctx = ctx;
        _s = s;
        Cluster c = null;
        try {
           c = ClusterHelper.getClusterByName(_ctx, cRef.getRef());
        } catch(ConfigException ce) {
            String msg = _localStrMgr.getString("InstanceNotFound", s.getName(),
                                        cRef.getRef());
            throw new IllegalArgumentException(msg);
        }
        _sRef = c.getServerRefByRef(s.getName());

        if (_sRef == null) {
            String msg = _localStrMgr.getString("ServerRefNotFound",s.getName(),                             cRef.getRef());
            throw new IllegalArgumentException(msg);
        }
View Full Code Here


        final Domain domain = getDomainConfigBean(configContext);       
        final Clusters clusters = domain.getClusters();
        if (clusters == null) {
            return false;
        }
        final Cluster cluster = clusters.getClusterByName(clusterName);
        return (cluster != null ? true : false);
    }
View Full Code Here

     */
    public static Cluster getClusterByName(ConfigContext configContext, String clusterName)
        throws ConfigException
    {
        final Domain domain = getDomainConfigBean(configContext);         
        final Cluster cluster = domain.getClusters().getClusterByName(clusterName);
        if (cluster == null) {
            throw new ConfigException(_strMgr.getString("noSuchCluster",
                clusterName));
        }
        return cluster;
View Full Code Here

     * happen).
     */
    public static Config getConfigForCluster(ConfigContext configContext, String clusterName)
        throws ConfigException
    {
        final Cluster cluster = getClusterByName(configContext, clusterName);               
        final Domain domain = getDomainConfigBean(configContext);                 
        final Config config = domain.getConfigs().getConfigByName(cluster.getConfigRef());
        if (config == null) {
            throw new ConfigException(_strMgr.getString("noSuchClusterConfig",
                cluster.getConfigRef(), clusterName));
        }
        return config;
    }       
View Full Code Here

     * (and its instances) only. No other clusters or servers may refer to its configuration.
     */
    public static boolean isClusterStandAlone(ConfigContext configContext, String clusterName)
        throws ConfigException
    {
        final Cluster cluster = getClusterByName(configContext, clusterName);
        final String configName = cluster.getConfigRef();
        if (isConfigurationNameStandAlone(configName, clusterName)) {           
            if (isConfigurationReferencedByClusterOnly(configContext, configName, clusterName)) {
                return true;
            }
        }      
View Full Code Here

     * Return true if the given server instance references the stated application.
     */
    public static boolean clusterReferencesApplication(ConfigContext configContext,
        String clusterName, String appName) throws ConfigException
    {
        final Cluster cluster = getClusterByName(configContext, clusterName);        
        return clusterReferencesApplication(cluster, appName);
    }
View Full Code Here

    public static boolean clusterReferencesJdbcConPool(ConfigContext ctx,
            String clusterName, String poolName) throws ConfigException
    {

        final Cluster cluster = getClusterByName(ctx, clusterName);
        return clusterReferencesJdbcConPool(cluster, poolName);
    }
View Full Code Here

     * Return true if the given server instance references the stated resource.
     */
    public static boolean clusterReferencesResource(ConfigContext configContext,
        String clusterName, String resourceName) throws ConfigException
    {
        final Cluster cluster = getClusterByName(configContext, clusterName);        
        return clusterReferencesResource(cluster, resourceName);
    }
View Full Code Here

     * Return all the application refs of the server
     */
    public static ApplicationRef[] getApplicationReferences(ConfigContext configContext,
        String clusterName) throws ConfigException
    {
        final Cluster cluster = getClusterByName(configContext, clusterName);
        if (cluster.getApplicationRef() == null) {
            return new ApplicationRef[0];
        } else {
            return cluster.getApplicationRef();
        }
    }
View Full Code Here

     * Return all the resource refs of the server
     */   
    public static ResourceRef[] getResourceReferences(ConfigContext configContext,
        String clusterName) throws ConfigException
    {
        final Cluster cluster = getClusterByName(configContext, clusterName);
        if (cluster.getResourceRef() == null) {
            return new ResourceRef[0];
        } else {
            return cluster.getResourceRef();
        }
    }   
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.Cluster$DeleteDecorator

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.