Search in sources :

Example 1 with ContainerShutdown

use of org.jboss.weld.environment.se.events.ContainerShutdown in project core by weld.

the class WeldContainer method shutdown.

/**
 * Shutdown the container.
 *
 * @see Weld#initialize()
 */
public synchronized void shutdown() {
    checkIsRunning();
    try {
        beanManager().fireEvent(new ContainerBeforeShutdown(id), BeforeDestroyed.Literal.APPLICATION);
    } finally {
        discard(id);
        // Destroy all the dependent beans correctly
        creationalContext.release();
        beanManager().fireEvent(new ContainerShutdown(id), Destroyed.Literal.APPLICATION);
        bootstrap.shutdown();
        WeldSELogger.LOG.weldContainerShutdown(id);
    }
}
Also used : ContainerShutdown(org.jboss.weld.environment.se.events.ContainerShutdown) ContainerBeforeShutdown(org.jboss.weld.environment.se.events.ContainerBeforeShutdown)

Aggregations

ContainerBeforeShutdown (org.jboss.weld.environment.se.events.ContainerBeforeShutdown)1 ContainerShutdown (org.jboss.weld.environment.se.events.ContainerShutdown)1