Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1415

Cross-context include call from another web app breaks HttpRequestContext cleanup

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.14.Final, 2.0.2.Final
    • 2.0.0.Final
    • None
    • None

      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.

            [WELD-1415] Cross-context include call from another web app breaks HttpRequestContext cleanup

            mark yarborough <myarboro@redhat.com> changed the Status of bug 956631 from VERIFIED to CLOSED

            RH Bugzilla Integration added a comment - mark yarborough <myarboro@redhat.com> changed the Status of bug 956631 from VERIFIED to CLOSED

            Ron Šmeral <rsmeral@redhat.com> made a comment on bug 956631

            Verified on EAP 6.2.0.ER5.

            RH Bugzilla Integration added a comment - Ron Šmeral <rsmeral@redhat.com> made a comment on bug 956631 Verified on EAP 6.2.0.ER5.

            Ron Šmeral <rsmeral@redhat.com> changed the Status of bug 956631 from ON_QA to VERIFIED

            RH Bugzilla Integration added a comment - Ron Šmeral <rsmeral@redhat.com> changed the Status of bug 956631 from ON_QA to VERIFIED

            Brian Stansberry <brian.stansberry@redhat.com> made a comment on bug 956631

            Yes. It was fixed via https://github.com/jbossas/jboss-eap/pull/460 which resolved the depended-upon component upgrade BZ https://bugzilla.redhat.com/show_bug.cgi?id=1011551.

            I'm moving this to ON_QA.

            RH Bugzilla Integration added a comment - Brian Stansberry <brian.stansberry@redhat.com> made a comment on bug 956631 Yes. It was fixed via https://github.com/jbossas/jboss-eap/pull/460 which resolved the depended-upon component upgrade BZ https://bugzilla.redhat.com/show_bug.cgi?id=1011551 . I'm moving this to ON_QA.

            Brian Stansberry <brian.stansberry@redhat.com> changed the Status of bug 956631 from MODIFIED to ON_QA

            RH Bugzilla Integration added a comment - Brian Stansberry <brian.stansberry@redhat.com> changed the Status of bug 956631 from MODIFIED to ON_QA

            Dimitris Andreadis <dandread@redhat.com> made a comment on bug 956631

            Brian is this merged already in ER4?

            RH Bugzilla Integration added a comment - Dimitris Andreadis <dandread@redhat.com> made a comment on bug 956631 Brian is this merged already in ER4?

            Ron Šmeral <rsmeral@redhat.com> made a comment on bug 956631

            Raising severity to high because there is a one-off for this issue (#1008277) for 6.1.0 and so this needs to be fixed in 6.2.0.

            RH Bugzilla Integration added a comment - Ron Šmeral <rsmeral@redhat.com> made a comment on bug 956631 Raising severity to high because there is a one-off for this issue (#1008277) for 6.1.0 and so this needs to be fixed in 6.2.0.

            Closing not to break release notes. I am going to create another issue for forwards.

            Jozef Hartinger added a comment - Closing not to break release notes. I am going to create another issue for forwards.

            Only the inclusion is resolved. The cross-context forwarding still does not work. See the updated test: https://github.com/weld/core/pull/372

            Ron Šmeral (Inactive) added a comment - Only the inclusion is resolved. The cross-context forwarding still does not work. See the updated test: https://github.com/weld/core/pull/372

            Jozef Hartinger <jharting@redhat.com> changed the Status of bug 956631 from NEW to MODIFIED

            RH Bugzilla Integration added a comment - Jozef Hartinger <jharting@redhat.com> changed the Status of bug 956631 from NEW to MODIFIED

              rhn-engineering-jharting Jozef Hartinger
              mkouba@redhat.com Martin Kouba
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: