ThreadLocalResteasyProviderFactory.push(dispatcher.getProviderFactory());
// Wrap in RESTEasy contexts (this also puts stuff in a thread-local)
SeamResteasyProviderFactory.pushContext(HttpServletRequest.class, request);
SeamResteasyProviderFactory.pushContext(HttpServletResponse.class, response);
SeamResteasyProviderFactory.pushContext(SecurityContext.class, new ServletSecurityContext(request));
// Wrap in Seam contexts
new ContextualHttpServletRequest(request)
{
@Override