Example usage for com.liferay.portal.kernel.servlet ServletContextPool remove

List of usage examples for com.liferay.portal.kernel.servlet ServletContextPool remove

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.servlet ServletContextPool remove.

Prototype

public static ServletContext remove(String servletContextName) 

Source Link

Usage

From source file:blade.portlet.GreeterPortlet.java

License:Apache License

@Override
public void destroy() {
    PortletContext portletContext = getPortletContext();

    ServletContextPool.remove(portletContext.getPortletContextName());

    super.destroy();
}

From source file:com.liferay.httpservice.internal.http.NonWABHttpServiceWrapper.java

License:Open Source License

protected void removeRegistration(Object object) {
    _registrations.remove(object);//from   w ww  . ja v  a 2 s .  c o m

    if (!_registrations.isEmpty()) {
        return;
    }

    ServletContextPool.remove(bundleServletContext.getServletContextName());

    bundleServletContext = null;
}

From source file:com.liferay.httpservice.internal.WebBundleDeployer.java

License:Open Source License

public void doStop(Bundle bundle, String servletContextName) {
    EventUtil.sendEvent(bundle, EventUtil.UNDEPLOYING, null, false);

    BundleServletContext bundleServletContext = null;

    ServletContext servletContext = ServletContextPool.get(servletContextName);

    if ((servletContext != null) && (servletContext instanceof BundleServletContext)) {

        bundleServletContext = (BundleServletContext) servletContext;
    }//from  www .jav  a  2  s  . c  o  m

    if (bundleServletContext == null) {
        EventUtil.sendEvent(bundle, EventUtil.UNDEPLOYED, null, false);

        ServletContextPool.remove(servletContextName);

        return;
    }

    try {
        bundleServletContext.close();
    } catch (Exception e) {
        EventUtil.sendEvent(bundle, EventUtil.FAILED, null, false);
    }

    EventUtil.sendEvent(bundle, EventUtil.UNDEPLOYED, null, false);

    ServletContextPool.remove(servletContextName);

    handleCollidedWABs(bundle, servletContextName);
}