Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1129

check portability of context-control

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Later
    • 1.6.0
    • None
    • CdiControl
    • None
    • owb/tomee7

    Description

      ContextControl#stopContext(RequestScoped.class) also stops the session-context (at least in case of the current snapshot of tomee7) which requires the following workaround:

              contextControl.stopContext(RequestScoped.class);
              contextControl.startContext(RequestScoped.class);
              contextControl.startContext(SessionScoped.class);
      

      however, such a workaround is not portable.

      without the workaround:
      WebBeans context with scope type annotation @SessionScoped does not exist within current thread
      at org.junit.Assert.fail(Assert.java:93)
      at org.apache.deltaspike.cdise.tck.ContainerCtrlTckTest.testNewRequests(ContainerCtrlTckTest.java:321)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      see e.g. https://builds.apache.org/job/DeltaSpike_TomEE_7.0.0-M3/org.apache.deltaspike.cdictrl$deltaspike-cdictrl-openejb/166/testReport/junit/org.apache.deltaspike.cdise.tck/ContainerCtrlTckTest/testNewRequests/

      Attachments

        Issue Links

          Activity

            People

              struberg Mark Struberg
              gpetracek Gerhard Petracek
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: