@Override protected void applyLifecycle(LifecycleManager lifecycleManager) throws Exception { // If the MuleContext is started, start all objects in the new Registry. if (lifecycleManager.isPhaseComplete(Startable.PHASE_NAME)) { lifecycleManager.fireLifecycle(Startable.PHASE_NAME); } }
/** * Stops the <code>MuleContext</code> which stops all sessions and * connectors * * @throws MuleException if either any of the sessions or connectors fail to stop */ @Override public synchronized void stop() throws MuleException { startLatch.release(); getLifecycleManager().checkPhase(Stoppable.PHASE_NAME); fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STOPPING)); getLifecycleManager().fireLifecycle(Stoppable.PHASE_NAME); fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STOPPED)); }
@Override public synchronized void start() throws MuleException { getLifecycleManager().checkPhase(Startable.PHASE_NAME); if (getQueueManager() == null) { throw new MuleRuntimeException(CoreMessages.objectIsNull("queueManager")); } startDate = System.currentTimeMillis(); fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STARTING)); getLifecycleManager().fireLifecycle(Startable.PHASE_NAME); overridePollingController(); overrideClusterConfiguration(); startMessageSources(); fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_STARTED)); startLatch.release(); if (logger.isInfoEnabled()) { SplashScreen startupScreen = buildStartupSplash(); logger.info(startupScreen.toString()); } }
getLifecycleManager().fireLifecycle(Disposable.PHASE_NAME);
getNotificationManager().start(workManager, workListener); fireNotification(new MuleContextNotification(this, MuleContextNotification.CONTEXT_INITIALISING)); getLifecycleManager().fireLifecycle(Initialisable.PHASE_NAME);