Examples of InstanceException


Examples of com.sun.enterprise.admin.servermgmt.InstanceException

        //the cluster.
        final ConfigContext configContext = getConfigContext();
        final Cluster cluster = ClusterHelper.getClusterForInstance(configContext, serverName);
        final ServerRef ref = cluster.getServerRefByRef(serverName);
        if (ref == null) {
            throw new InstanceException(_strMgr.getString("clusterMissingServerRef",
                cluster.getName(), serverName));
        } else {
            cluster.removeServerRef(ref, OVERWRITE);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

                    isReachable = false;
                }
            }

            if(isReachable)
                throw new InstanceException(_strMgr.getString("serverIsNotStopped",
                    serverName));
           
            if (ServerHelper.isServerStandAlone(configContext, serverName)) {
                //If the server instance is stand-alone, we must remove its stand alone
                //configuration after removing the server instance (since a configuration
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

                    break;
                } catch (PortInUseException ex) {                          
                    if (i++ > 25) {
                        //We do not want to throw the PortInUseException since it is an internal
                        //class and protected.
                        throw new InstanceException(ex.getMessage());
                    }
                    //If there were port conflicts, then we pick unused ports.
                    ArrayList newPorts = pickNonConflictingPorts(server, ex.getConflictingPorts());
                   
                    //Keep track of the initial list of conflicting ports. This is tricky
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

        try {                       
            final ConfigContext configContext = getConfigContext();
            ConfigContextImpl.lock();
            //validate name uniqueness
            if (!ConfigAPIHelper.isNameUnique(configContext, serverName)) {
                 throw new InstanceException(_strMgr.getString("serverNameNotUnique",
                    serverName));
            }
           
      ConfigAPIHelper.checkLegalName(serverName);
     
            // see if nodeagent exists, if not create an empty reference
            Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);           
            NodeAgents agents=domain.getNodeAgents();
            NodeAgent agent=agents.getNodeAgentByName(nodeAgentName);
            if (agent == null) {
                // create an implnodeagent reference
                NodeAgentsConfigBean naMBean = getNodeAgentsConfigBean();
                naMBean.createNodeAgentConfig(nodeAgentName);
            }                   
           
            //a configuration and cluster cannot both be specified
            if (configName != null && clusterName != null) {
                throw new InstanceException(_strMgr.getString("configAndClusterMutuallyExclusive"));
            }           
           
            //Ensure that server specified by serverName does not already exist.
            //Given that we've already checked for uniqueness earlier, this should never
            //be the case, but we'll be extra safe here.
            Servers servers = domain.getServers();
            Server server = servers.getServerByName(serverName);
            if (server != null) {
                throw new InstanceException(_strMgr.getString("serverAlreadyExists",
                    serverName));
            }                           
           
            //Create the new server instance
            server = new Server();           
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

            exec.execute(false, false);
            return exec;
        }
        catch (Exception e)
        {
            throw new InstanceException(_strMgr.getString("procExecError"), e);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

    public void createInstance() throws InstanceException
    {
        try {
            checkRepository(getInstanceConfig(), false);           
        } catch (RepositoryException ex) {
            throw new InstanceException(ex);
        }
       
        try {
            getEEFileLayout().createServerInstanceDirectories();      
            createStartInstance();
            createStopInstance();
            setPermissions(getConfig());
        } catch (InstanceException ex) {
            FileUtils.liquidate(getInstanceDir());
            throw ex;
        } catch (Exception ex) {
            FileUtils.liquidate(getInstanceDir());
            throw new InstanceException(ex);
        }               
    }
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

        throws InstanceException
    {              
        try {
            deleteRepository(getInstanceConfig(), deleteJMSProvider);
        } catch (Exception e) {
            throw new InstanceException(e);
        }
    }                 
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

        throws InstanceException   
    {       
        try {
            return listRepository(getConfig());
        } catch (Exception e) {
            throw new InstanceException(e);
        }       
    }   
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

        try {
            //TODO: Rename listDomainsAndStatusAsString to listRepositoryAndStatusAsString
            //when the PE branch is open
            return listDomainsAndStatusAsString(getConfig());
        } catch (Exception e) {
            throw new InstanceException(e);
        }    
    }          
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.InstanceException

             */
             // set interativeOptions for security to hand to starting process from ProcessExecutor
            // since SE/EE and IndentityManager is already populated, use it for passing values to the instance
            return super.startInstance(IdentityManager.getIdentityArray(), commandLineArgs, getEnvProps());           
        } catch (Exception e) {
            throw new InstanceException(e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.