public void destroy() { final boolean openejbRequestDestroyed = getAttribute("openejb_requestDestroyed") == null; if (listeners != null && !listeners.isEmpty()) { if (begin != null && end != null && openejbRequestDestroyed) { end.requestDestroyed(new ServletRequestEvent(getServletContext(), this)); } final ServletRequestEvent event = new ServletRequestEvent(getServletContext(), this); for (final ServletRequestListener listener : listeners) { listener.requestDestroyed(event); } } if (begin != null && openejbRequestDestroyed) { setAttribute("openejb_requestDestroyed", "ok"); begin.requestDestroyed(new ServletRequestEvent(getServletContext(), this)); } }
public void init() { if (begin != null && getAttribute("openejb_requestInitialized") == null) { setAttribute("openejb_requestInitialized", "ok"); // if called again we loose the request scope begin.requestInitialized(new ServletRequestEvent(getServletContext(), this)); } listeners = LightweightWebAppBuilderListenerExtractor.findByTypeForContext(contextPath, ServletRequestListener.class); if (!listeners.isEmpty()) { final ServletRequestEvent event = new ServletRequestEvent(getServletContext(), this); for (final ServletRequestListener listener : listeners) { listener.requestInitialized(event); } } }
public void destroy() { if (end != null && getAttribute("openejb_requestDestroyed") == null) { setAttribute("openejb_requestDestroyed", "ok"); end.requestDestroyed(new ServletRequestEvent(getServletContext(), this)); } }
public void init() { if (begin != null && getAttribute("openejb_requestInitialized") == null) { setAttribute("openejb_requestInitialized", "ok"); begin.requestInitialized(new ServletRequestEvent(getServletContext(), this)); } }