Package com.sun.enterprise.ee.admin.mbeanapi

Examples of com.sun.enterprise.ee.admin.mbeanapi.ServerRuntimeMBean


            boolean restartFlag) {

        try {
            // only deals with server instance now
            if (ServerHelper.isAServer(ctx, inst)) {
                ServerRuntimeMBean runtimeMBean =
                    InstanceProxy.getInstanceProxy(inst);
                 runtimeMBean.setRestartRequired(restartFlag);
             } else {
                // FIXME: handle node agent end points
             }
        } catch (Throwable t) {
            getLogger().log(Level.FINE,"eeadmin.setrestart.exception", t);
View Full Code Here


     * This method will call a utility method instead of coding the logic here. TBD
     */
    private boolean isServerRunning(String server)
    {
        try {
            ServerRuntimeMBean serverMBean = InstanceProxy.getInstanceProxy(server);
                Status status = serverMBean.getRuntimeStatus().getStatus();
                if (status.getStatusCode() == Status.kInstanceRunningCode) {
                    return true;
                }
        } catch(Exception e) {
    //return false; //FIXME: what else to do??
View Full Code Here

    /**
     * This method will call a utility method instead of coding the logic here. TBD
     */
    private boolean isServerRunning(String server) throws InstanceException {
  try {
            ServerRuntimeMBean serverMBean = InstanceProxy.getInstanceProxy(server);
                Status status = serverMBean.getRuntimeStatus().getStatus();
                if (status.getStatusCode() == Status.kInstanceRunningCode) {
                    return true;
                }
  } catch(Exception e) {
    //return false; //FIXME: what else to do??
View Full Code Here

    /**
     * This method will call a utility method instead of coding the logic here. TBD
     */
    private boolean isServerDead(String server) throws InstanceException {
  try {
           ServerRuntimeMBean serverMBean = InstanceProxy.getInstanceProxy(server);
                Status status = serverMBean.getRuntimeStatus().getStatus();
                if (status.getStatusCode()  == Status.kInstanceNotRunningCode) {
                    return true;
                }
  } catch(Exception e) {
    return true; //is this true?? //FIXME
View Full Code Here

    }
   
    public void clearRuntimeStatus(String serverName) throws InstanceException
    {       
        try {                        
            ServerRuntimeMBean serverMBean = InstanceProxy.getInstanceProxy(serverName);
            serverMBean.clearRuntimeStatus();
        } catch (Exception ex) {
            //Ignore any error indicating that the server is unreachable.
            //FIXTHIS: We could expect the proxy to do this for us as it
            //seems to be a common case.
            if (InstanceProxy.isUnreachable(ex)) {
View Full Code Here

    }
     
    public RuntimeStatus getRuntimeStatus(String serverName) throws InstanceException
    {       
        try {                        
            ServerRuntimeMBean serverMBean = InstanceProxy.getInstanceProxy(serverName);
            return serverMBean.getRuntimeStatus();
        } catch (Exception ex) {
            //Ignore any error indicating that the server is unreachable.
            //FIXTHIS: We could expect the proxy to do this for us as it
            //seems to be a common case.
            if (InstanceProxy.isUnreachable(ex)) {
View Full Code Here

            final Servers servers = domain.getServers();
            final Server server = target.getServers()[0];
            boolean isReachable = true;

            try {               
                ServerRuntimeMBean serverMBean = InstanceProxy.getInstanceProxy(serverName);
                Status status = serverMBean.getRuntimeStatus().getStatus();
            } catch (Exception ex) {
                if (InstanceProxy.isUnreachable(ex)) {
                    isReachable = false;
                }
            }
View Full Code Here

                sendCCEvent = ruef.sendEvent(_event);

            // forwards the event if dynamic reconfiguration is enabled
            if ((config != null && (config.isDynamicReconfigurationEnabled() || sendCCEvent ))
                    || (_event instanceof CommandEvent)) {
                ServerRuntimeMBean sRuntime =
                    InstanceProxy.getInstanceProxy( _endPoint.getHost() );
                _result = sRuntime.forwardEvent(_event);
            } else {
                // dynamic reconfiguration is not enabled
                getLogger().log(Level.WARNING,
                    "eeadmin.eventDynamicReconfigDisabled.Warning",
                    new Object[] {serverName, _event.toString()});
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.admin.mbeanapi.ServerRuntimeMBean

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.