예제 #1
0
  public synchronized void start() throws MuleException {
    lifecycleManager.checkPhase(Startable.PHASE_NAME);
    if (!isStarted()) {
      if (getSecurityManager() == null) {
        throw new MuleRuntimeException(CoreMessages.objectIsNull("securityManager"));
      }
      if (getQueueManager() == null) {
        throw new MuleRuntimeException(CoreMessages.objectIsNull("queueManager"));
      }

      startDate = System.currentTimeMillis();

      fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STARTING));

      lifecycleManager.firePhase(this, Startable.PHASE_NAME);

      fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STARTED));

      if (logger.isInfoEnabled()) {
        SplashScreen splashScreen = SplashScreen.getInstance(ServerStartupSplashScreen.class);
        splashScreen.setHeader(this);
        splashScreen.setFooter(this);
        logger.info(splashScreen.toString());
      }
    }
  }