Example usage for org.apache.commons.httpclient MultiThreadedHttpConnectionManager shutdownAll

List of usage examples for org.apache.commons.httpclient MultiThreadedHttpConnectionManager shutdownAll

Introduction

In this page you can find the example usage for org.apache.commons.httpclient MultiThreadedHttpConnectionManager shutdownAll.

Prototype

public static void shutdownAll() 

Source Link

Usage

From source file:org.viafirma.nucleo.Nucleo.java

/**
 * Muestra un mensaje cuando se apacha el Nucleo.
 * /*ww w .jav a  2s  .  co m*/
 * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
 */
@Override
public void contextDestroyed(ServletContextEvent contextEvent) {
    // apagamos las diferentes caches.
    cacheCertificados.getCacheManager().removalAll();
    CacheManager.getInstance().shutdown();
    // Detenemos el registro RMI
    if (rmiRegistry != null) {
        try {
            rmiRegistry.unbind(Constantes.NOMBRE_CONECOR_RMI_PUBLICADO);
            // Detenemos el registro RMI.
            UnicastRemoteObject.unexportObject(rmiRegistry, true);
            rmiRegistry = null;
        } catch (Exception e) {
            log.warn("No se puede detener el registro RMI del motor de formularios." + e.getMessage());
        }
        log.info("Desactivando el registro RMI");
    }
    // Desactivamos el manejador de conexiones http
    MultiThreadedHttpConnectionManager.shutdownAll();

    System.out.println("Nucleo Viafirma apagado. " + this);
    super.contextDestroyed(contextEvent);

}