Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigException


                }
            }
            try {
                targetHostName = InetAddress.getByName(targetHostName).getCanonicalHostName();
            } catch (java.net.UnknownHostException unex) {
                throw new ConfigException(unex.getMessage(), unex);
            }
            String redirectPortNb = hl.getRedirectPort();
            String portNb;
            if (redirectPortNb!=null) {
                portNb = redirectPortNb;
View Full Code Here


        String virtualServers, String referenceName) throws ConfigException
    {
        ApplicationRef ref = cluster.getApplicationRefByRef(referenceName);
        if (ref != null) {
            //Application ref already exists in cluster        
            throw new ConfigException(_strMgr.getString("clusterApplicationRefAlreadyExists",
                referenceName, cluster.getName()));    
        }
        ref = new ApplicationRef();
        ref.setEnabled(enabled);
        ref.setRef(referenceName);
View Full Code Here

        for (int i = 0; i < servers.length; i++) {
            final ApplicationRef ref = servers[i].getApplicationRefByRef(referenceName);
            if (ref != null) {
                //This indicates that the cluster is in an inconsistent state. Some of the
                //instances in the cluster have the ref and some do not.
                throw new ConfigException(_strMgr.getString("clusterApplicationRefInconsistency",
                    referenceName, cluster.getName(), servers[i].getName()));
            }
            addApplicationReferenceToServer(servers[i], enabled, virtualServers,
                referenceName);
        }       
View Full Code Here

        String virtualServers, String referenceName) throws ConfigException
    {       
        ApplicationRef ref = server.getApplicationRefByRef(referenceName);
        if (ref != null) {
            //Resource ref already exists in server        
            throw new ConfigException(_strMgr.getString("serverApplicationRefAlreadyExists",
                referenceName, server.getName()));        
        }
        ref = new ApplicationRef();
        ref.setEnabled(enabled);
        ref.setRef(referenceName);
View Full Code Here

            return ServerTags.WEB_MODULE;
        // XXX: Added for Deployment SPI           
        } else if (applications.getExtensionModuleByName(appName) != null) { 
             return ServerTags.EXTENSION_MODULE;
        } else {
            throw new ConfigException(_strMgr.getString("applicationDoesNotExist",
                appName));                 
        }      
    }
View Full Code Here

        } else if (target.getType() == TargetType.SERVER ||
            target.getType() == TargetType.DAS) {
            final Server server = ServerHelper.getServerByName(configContext, target.getName());
            addApplicationReferenceToServer(server, enabled, virtualServers, referenceName);
        } else {
            throw new ConfigException(_strMgr.getString("invalidClusterOrServerTarget",
                target.getName()));
        }             
    }
View Full Code Here

        String referenceName) throws ConfigException
    {
        final ApplicationRef ref = cluster.getApplicationRefByRef(referenceName);
        if (ref == null) {
            //Application ref already exists in cluster        
            throw new ConfigException(_strMgr.getString("clusterApplicationRefDoesNotExist",
                cluster.getName(), referenceName));    
        }
        cluster.removeApplicationRef(ref, BaseConfigMBean.OVERWRITE);       
    }
View Full Code Here

        for (int i = 0; i < servers.length; i++) {
            final ApplicationRef ref = servers[i].getApplicationRefByRef(referenceName);
            if (ref == null) {
                //This indicates that the cluster is in an inconsistent state. Some of the
                //instances in the cluster have the ref and some do not.
                throw new ConfigException(_strMgr.getString("clusterApplicationRefInconsistency",
                    referenceName, cluster.getName(), servers[i].getName()));
            }
            deleteApplicationReferenceFromServer(servers[i], referenceName);
        }       
    }
View Full Code Here

        String referenceName) throws ConfigException
    {       
        final ApplicationRef ref = server.getApplicationRefByRef(referenceName);
        if (ref == null) {
            //Application ref already exists in server        
            throw new ConfigException(_strMgr.getString("serverApplicationRefDoesNotExist",
                 server.getName(), referenceName));        
        }        
        server.removeApplicationRef(ref, BaseConfigMBean.OVERWRITE);
    }
View Full Code Here

            final Cluster cluster = ClusterHelper.getClusterByName(configContext, targetName);
            deleteApplicationReferenceFromCluster(cluster, referenceName);
            final Server[] servers = ServerHelper.getServersInCluster(configContext, targetName);
            deleteApplicationReferenceFromClusteredServers(cluster, servers, referenceName);           
        } else {
            throw new ConfigException(_strMgr.getString("invalidClusterOrServerTarget",
                targetName));
        }     
    }      
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.ConfigException

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.