Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-401

ELContextStore not cleaned up for some JSP EL lookups

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: M4
    • Fix Version/s: 1.0.0-alpha-2
    • Component/s: Injection and Lookup
    • Labels:
      None
    • Environment:
      jetty + guess sample + simple dependent bean + jsp

      Description

      Playing with the guess sample with an added dependent bean and a JSP with a simple EL expression referencing the same bean a few times results in 1 dependent bean instance being used for two expressions

      openwebbeans.properties:
      org.apache.webbeans.spi.adaptor.ELAdaptor=org.apache.webbeans.el10.EL10Adaptor
      +org.apache.webbeans.application.jsp=true

      added JSP:

      <c:out value="${dependentBean}"/>
      <c:out value="${dependentBean}"/>

      This results in only one bean instance being created, because the first bean is left in the thread-local ELContextStore for the 2nd expression.

      Our current code counts on the ELResolver lookup being driven by our own ELValueExpression, which gives us a chance to cleanup the thread-local context on the way out, but this path goes right from jetty to our ELResolverCode twice with no ValueExpression.

      This seems to always work correctly from JSF, whether deferred evaluation is used for the value or not. But this was only tested with the output mechanism in login.xhtml so it may just be good/bad luck.

        Attachments

          Activity

            People

            • Assignee:
              struberg Mark Struberg
              Reporter:
              covener Eric Covener
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified