Issue Type: Bug Bug
Affects Versions: 2.0.0.Final
Assignee: Jozef Hartinger
Created: 25/Apr/13 4:35 AM
Description:

It seems the following code is legal (alhough it's not very clear in the Servlet spec):

// This servlet is part of CDI-enabled webapp1
@WebServlet("/info1")
public class InfoServlet1 extends HttpServlet {
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        // CDI-enabled webapp2 contains InfoServlet2 mapped to /info2
        req.getServletContext().getContext("/webapp2").getRequestDispatcher("/info2").include(req, resp);
    }
}

The problem is the WeldListener in webapp2 cleans up bound request context (ThreadLocal bean store) after the InfoServlet2 processing is finished. Afterwards the request context deactivation in webapp1 results in NPE.

Project: Weld
Priority: Major Major
Reporter: Martin Kouba
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira