Package com.sun.enterprise.admin.event

Examples of com.sun.enterprise.admin.event.AdminEventResult


      ShutdownEvent shutdownEvent = new ShutdownEvent(SERVER_INSTANCE, "true");
      getLogger().log(Level.INFO,
          "sending notification to server..." +
          SERVER_INSTANCE);
      AdminEventResult result = rmiClient.sendNotification(shutdownEvent);
      getLogger().log(Level.INFO,
          "server.shutdown_complete");

  } catch(Exception e) {
      getLogger().log(Level.SEVERE, "j2eerunner.initError", e);
View Full Code Here


            return false;
        }
    }

    protected void registerException(BaseDeployEvent event, String msg) {
        AdminEventResult result = AdminEventResult.getAdminEventResult(event);
        result.setResultCode(AdminEventResult.SUCCESS);
        result.addException(event.getEffectiveDestination(),
                            new AdminEventListenerException(msg));
    }
View Full Code Here

                _logger.log(Level.FINEST, "mbean.event_sent",
                        event.getEventInfo());
            } else {
                _logger.log(Level.INFO, "mbean.send_event", event.toString());
            }
            AdminEventResult result=AdminEventMulticaster.multicastEvent(event);
            _logger.log(Level.FINE, "mbean.event_res", result.getResultCode());
            _logger.log(Level.FINEST, "mbean.event_reply",
                    result.getAllMessagesAsString());
            if (!AdminEventResult.SUCCESS.equals(result.getResultCode())) {
                requiresRestart = true;
                cache.setRestartNeeded(true);
                // if there was an error in the listener, admin event
                // multicaster already sets the restart required to true
                //_logger.log(Level.INFO, "mbean.notif_failed");
View Full Code Here

            sLogger.log(Level.FINEST, "mbean.event_sent", event.getEventInfo());
        } else {
            sLogger.log(Level.FINE, "mbean.send_event", event.toString());
        }

        AdminEventResult multicastResult =
                AdminEventMulticaster.multicastEvent(event);
        sLogger.log(Level.FINE, "mbean.event_res",
                multicastResult.getResultCode());
        sLogger.log(Level.FINE, "mbean.event_reply",
                multicastResult.getAllMessagesAsString());
        boolean eventSuccess = true;
            //ALREADY SET in Admin Event Multicaster
            //AdminEventCache cache =
            //        AdminEventCache.getInstance(mInstanceName);
            //cache.setRestartNeeded(true);

            // if there is an exception thrown when loading modules
            // rethrow the exception
            AdminEventListenerException ale = null;
            ale = multicastResult.getFirstAdminEventListenerException();
            if (ale != null) {
                sLogger.log(Level.WARNING, "mbean.event_failed",
                    ale.getMessage());
                DeploymentException de =
                    new DeploymentException(ale.getMessage());
View Full Code Here

                        EjbTimerEvent.ACTION_LISTTIMERS,
                        server,
                        allServers);
        
   event.setTargetDestination(server);
         AdminEventResult res = forwardEvent(event);

  return (String[]) res.getAttribute(server,
      EjbTimerEvent.EJB_TIMER_CALL_RESULT_ATTRNAME);
     }
View Full Code Here

      EjbTimerEvent.EJB_TIMER_CALL_RESULT_ATTRNAME);
     }
      
     protected AdminEventResult forwardEvent(AdminEvent e) {

        AdminEventResult result = null;
        result = AdminEventMulticaster.multicastEvent(e);
        return result;
    }
View Full Code Here

   {
        AdminEvent event = new TransactionsRecoveryEvent(getServerName(),
                    serverToRecover,
                    transactionLogDir);
        event.setTargetDestination(destinationServer);
        AdminEventResult res = forwardEvent(event);
        if(!AdminEventResult.SUCCESS.equals(res.getResultCode()))
        {
            Throwable exc = null;
            exc = res.getFirstThrowable();
            if (exc != null) {
                throw new MBeanConfigException(_strMgr.getString("tx.exceptionInTargetServer",
                    exc.getMessage()));
            }
            throw new MBeanConfigException(_strMgr.getString("tx.notSuccessInSendReturn",
                    res.getResultCode()));
        }
    }
View Full Code Here

        }
    }
     

     private AdminEventResult forwardEvent(AdminEvent e) {
        AdminEventResult result = null;
        result = AdminEventMulticaster.multicastEvent(e);
        return result;
    }
View Full Code Here

        // domains set the instance name to "server" -- but not in the RepositoryConfig
        if(!ok(instanceName))
            instanceName = "server";
       
      ShutdownEvent shutdownEvent = new ShutdownEvent(instanceName, stopInstancesOverride);
      AdminEventResult result = rmiClient.sendNotification(shutdownEvent);
        waitUntilStopped(60);
        postStop();
    }
View Full Code Here

        // domains set the instance name to "server" -- but not in the RepositoryConfig
        if(!ok(instanceName))
            instanceName = "server";
       
  ShutdownEvent shutdownEvent = new ShutdownEvent(instanceName, "true");
  AdminEventResult result = rmiClient.sendNotification(shutdownEvent);
        waitUntilStopped(timeout);
        if (isInstanceNotRunning()) {
            postStop();
            return true;
        } else return false;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.event.AdminEventResult

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.