// Wrap in RESTEasy contexts
try {
log.debug("processing REST request");
ResteasyProviderFactory.pushContext(HttpServletRequest.class, request);
ResteasyProviderFactory.pushContext(HttpServletResponse.class, response);
ResteasyProviderFactory.pushContext(SecurityContext.class, new ServletSecurityContext(request));
// Wrap in Seam contexts
new ContextualHttpServletRequest(request)
{
@Override