Pluto
  1. Pluto
  2. PLUTO-474

CLONE -portlet session should not be invalidated when lastAccessedTime is 0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.5
    • Fix Version/s: 1.1.5
    • Component/s: portlet container
    • Labels:
      None

      Description

      Some servlet containers do not automatically initialized the lastAccessedTime for new sessions they create. They wait until the next request occurs. For example in jetty this servlet will print out "0" the first time you access it:

      public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

      { response.getWriter().println(request.getSession(true).getLastAccessedTime()); }

      and then subsequent access print out the current time as you would expect.

      Pluto's PortletRequestImpl#getPortletSession() method does not work correctly for these servlet containers because it assumes that the session's lastAccessTime has been initialized. When that time has not been initialized it proceeds to invalidate the session since it thinks the session has exceeded the maxInactiveInterval.

      Another problem in this method is that when an httpSession has been invalidated it is still used by the cached portletSession.

      1. PLUTO-474.diff
        2 kB
        Benjamin Gould

        Issue Links

          Activity

          Benjamin Gould created issue -
          Benjamin Gould made changes -
          Field Original Value New Value
          Link This issue is a clone of PLUTO-436 [ PLUTO-436 ]
          Hide
          Benjamin Gould added a comment -

          I cloned this because I know that this problem still exists in 1.1.x, but I'm not sure about trunk. I'm not sure if cloning the issue was the right thing to do, but I guess if it wasn't I bungled it up. Anyhow, this is still a problem in 1.1.4.

          Show
          Benjamin Gould added a comment - I cloned this because I know that this problem still exists in 1.1.x, but I'm not sure about trunk. I'm not sure if cloning the issue was the right thing to do, but I guess if it wasn't I bungled it up. Anyhow, this is still a problem in 1.1.4.
          Benjamin Gould made changes -
          Affects Version/s 1.2.0 [ 12312213 ]
          Affects Version/s 1.1.5 [ 12312652 ]
          Fix Version/s 1.1.5 [ 12312652 ]
          Fix Version/s 1.2.0 [ 12312213 ]
          Hide
          Benjamin Gould added a comment -

          Here is a patch for the 1.1.x branch. It is Paul McMahan's original changes that I just tested to make sure they still work.

          Show
          Benjamin Gould added a comment - Here is a patch for the 1.1.x branch. It is Paul McMahan's original changes that I just tested to make sure they still work.
          Benjamin Gould made changes -
          Attachment PLUTO-474.diff [ 12377135 ]
          Hide
          Benjamin Gould added a comment -

          Also, I just checked the code in trunk and it looks like this did get merged from 1.2.0.

          Show
          Benjamin Gould added a comment - Also, I just checked the code in trunk and it looks like this did get merged from 1.2.0.
          Elliot Metsger made changes -
          Assignee Elliot Metsger [ emetsger ]
          Hide
          Elliot Metsger added a comment -

          Thanks Ben for scheduling this issue. Patch applied and I added a test case.

          Show
          Elliot Metsger added a comment - Thanks Ben for scheduling this issue. Patch applied and I added a test case.
          Elliot Metsger made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Elliot Metsger made changes -
          Link This issue duplicates PLUTO-435 [ PLUTO-435 ]
          Mark Thomas made changes -
          Workflow jira [ 12424999 ] Default workflow, editable Closed status [ 12565042 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12565042 ] jira [ 12585912 ]

            People

            • Assignee:
              Elliot Metsger
              Reporter:
              Benjamin Gould
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development