@Override public AsyncContext startAsync() { return startAsync(this, HttpResponse.class.cast(getAttribute("openejb_response"))); }
@Override public AsyncContext getAsyncContext() { setAttribute("openejb_async", "true"); return new OpenEJBAsyncContext(this /* TODO */, HttpResponse.class.cast(getAttribute("openejb_response")), contextPath); }
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)); } }
final boolean async = "true".equals(req.getAttribute("openejb_async")); return !async ? res : null;
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() { 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)); } }