Details

    • Steps to Reproduce:
      Hide

      <cfdump var="#session#">
      <cflog file="session" text="Start: #session.sessionid#">

      <cfset threadname = "Test_#createUUID()#">
      <cfthread action="run" name="#threadname#">
      <cfset sleep(500)>
      <cfset session.TEST = now()>
      <cflog file="session" text="In thread: #session.sessionid#">
      </cfthread>

      =======
      On Jetty you will see the error in the thread.log file.
      On Tomcat your sessionid will change with almost every request and the sessionid will be logged into session.log

      Show
      <cfdump var="#session#"> <cflog file="session" text="Start: #session.sessionid#"> <cfset threadname = "Test_#createUUID()#"> <cfthread action="run" name="#threadname#"> <cfset sleep(500)> <cfset session.TEST = now()> <cflog file="session" text="In thread: #session.sessionid#"> </cfthread> ======= On Jetty you will see the error in the thread.log file. On Tomcat your sessionid will change with almost every request and the sessionid will be logged into session.log

      Description

      Servlet container: Tomcat

      When using J2EE sessions the value of session.sessionid will change from J2EE format in CFML format when using the session in cfthread (appname_cfide_cftoken). Because this sessionid does not corresponds with the cookie value you will lose your session and get a new one.

      Servlet container: Jetty

      When using J2EE sessions and use the session in cfthread we will get an error:

      "ERROR","web-0","03/29/2013","23:30:06","cfthread-150","No SessionManager
      java.lang.IllegalStateException: No SessionManager
      at org.eclipse.jetty.server.Request.getSession(Request.java:1244)
      at org.eclipse.jetty.server.Request.getSession(Request.java:1223)
      at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:267)
      at railo.runtime.PageContextImpl.getSession(PageContextImpl.java:1707)
      at railo.runtime.type.scope.ScopeContext.getJSessionScope(ScopeContext.java:594)
      at railo.runtime.type.scope.ScopeContext.getSessionScope(ScopeContext.java:417)
      at railo.runtime.PageContextImpl.sessionScope(PageContextImpl.java:1191)
      at railo.runtime.PageContextImpl.sessionScope(PageContextImpl.java:1186)
      at index_cfm$cf.threadCall(C:\railo-express-4.0.4.001-jre-win64\webapps\www\index.cfm:7)
      at railo.runtime.thread.ChildThreadImpl.execute(ChildThreadImpl.java:181)
      at railo.runtime.thread.ChildThreadImpl.run(ChildThreadImpl.java:130)
      "

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                dazzle1979 Bas van der Graaf
              • Votes:
                4 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: