Package com.sun.enterprise.admin.servermgmt

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


        throws InstanceException
    {
        try {
            return getInstanceRegistry().getConnection(instanceName);      
        } catch (AgentException ex) {
            throw new InstanceException(ex);
        }
    }   
View Full Code Here


    {
        try {
            String dasName = ServerHelper.getDAS(configContext).getName();
            return getInstanceConnectionInfo(configContext, dasName);
        } catch (ConfigException ex) {
            throw new InstanceException(ex);
        }
    }
View Full Code Here

        throws InstanceException
    {
        try {
            return getInstanceRegistry().findConnectionInfo(instanceName);
        } catch (AgentException ex) {
            throw new InstanceException(ex);
        }
    }
View Full Code Here

        String instanceName) throws InstanceException
    {
        try {
            return getInstanceRegistry().findConnectionInfo(configContext, instanceName);
        } catch (AgentException ex) {
            throw new InstanceException(ex);
        }
    }
View Full Code Here

        throws ConfigException, InstanceException
    {
        //Check to ensure that the configuration is not the default-config
        //template. No-one is allowed to refer to it.
        if (configName.equals(DEFAULT_CONFIGURATION_NAME)) {
            throw new InstanceException(_strMgr.getString("cannotReferenceDefaultConfigTemplate",
                DEFAULT_CONFIGURATION_NAME));
        }

        //Check to ensure that the configuration is not the configuration
        //of the domain administration server
        final Server das = ServerHelper.getDAS(configContext);
        final Config dasConfig = ServerHelper.getConfigForServer(configContext, das.getName());    
        final String dasConfigName = dasConfig.getName();
        if (configName.equals(dasConfigName)) {
            throw new InstanceException(_strMgr.getString("cannotReferenceDASConfig",
                dasConfigName));
        }
               
        //Get the configuration specified by configName and ensure that it exists
        return ConfigAPIHelper.getConfigByName(configContext,
View Full Code Here

            //FIXTHIS: We could expect the proxy to do this for us as it
            //seems to be a common case.
            if (InstanceProxy.isUnreachable(ex)) {
                // do nothing
            } else {
                throw new InstanceException(ex);                       
            }
        }       
    }
View Full Code Here

            //FIXTHIS: We could expect the proxy to do this for us as it
            //seems to be a common case.
            if (InstanceProxy.isUnreachable(ex)) {
                return new RuntimeStatus(serverName);
            } else {
                throw new InstanceException(ex);                       
            }
        }
    }      
View Full Code Here

            Target target = null;
            try {
                target = TargetBuilder.INSTANCE.createTarget(
                    VALID_TYPES, serverName, configContext);  
            } catch (Exception e) {
                throw new InstanceException(
                    _strMgr.getString("noSuchInstance", serverName));
            }
            NodeAgent controller = target.getNodeAgents()[0];
            String agentName = controller.getName();
                                   
            // Call the Node Agent to start the server instance remotely
            NodeAgentsConfigBean ncb = getNodeAgentsConfigBean();
            if (ncb.isRunning(agentName)) {
                if (isRunning(serverName)) {
                    // WBN January 2007 Issue 726
                    // This is now OFFICIALLY not an error.  Log it and return
                    StringManagerBase sm = StringManagerBase.getStringManager(
                        getLogger().getResourceBundleName());        
                    getLogger().log(Level.WARNING,
                        sm.getString("eeadmin.already.running", serverName));
                    return;
                } else {
                    String installRoot = System.getProperty(
                    SystemPropertyConstants.INSTALL_ROOT_PROPERTY);
                    String instanceRoot = System.getProperty(
                    SystemPropertyConstants.INSTANCE_ROOT_PROPERTY);
                    NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(agentName);                       
                    agentMBean.startInstance(serverName, props);       
                }
            } else {
                throw new InstanceException(_strMgr.getString("agentNotRunning",
                    agentName, serverName));
            }
        } catch (Exception ex) {
            throw getExceptionHandler().handleInstanceException(
                ex, "eeadmin.startServerInstance.Exception", serverName);
View Full Code Here

                    if (forcekill) {
                        agentMBean.stopInstance(serverName, timeout);
                    } else {
                        agentMBean.stopInstance(serverName);
                    }
            } else throw new InstanceException(
                   _strMgr.getString("agentNotRunning", agentName, serverName));           
        } catch (Exception ex) {
            throw getExceptionHandler().handleInstanceException(
                ex, "eeadmin.stopServerInstance.Exception", serverName);           
        }
View Full Code Here

      }

      // if none of the above are true then the restart is a failure
      // throw appropriate exception
      if (! restarted) {
                throw new InstanceException(_strMgr.getString("serverCannotRestart",
      serverName));
      }

        } catch (Exception ex) {
            throw getExceptionHandler().handleInstanceException(
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.servermgmt.InstanceException

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.