ICEfaces
  1. ICEfaces
  2. ICE-3073

ICEfaces portlet instances not getting deallocated when session expires or is invalidated

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Liferay 4.3.4 + Tomcat 6.0.13 (and also JBoss 4.2.1)

      Description

      Each time a user logs into Liferay Portal and visits a portal page with an ICEfaces portlet, a session-based instance of that portlet is allocated by the servlet container. When the session expires or is invalidated, the instance should be deallocated by the servlet container but this isn't happening.

      This can be reproduced with Tomcat 6 or JBoss 4.2.1, but when JBoss is used, some extra error messages appear in the console that I think are related, but might actually be a separate bug -- I'm not sure.

      1. Copy the attached SampleAjaxPush1.war_ file to your $HOME/YourUserName/liferay/deploy folder
      2. Rename SampleAjaxPush1.war_ to SampleAjaxPush1.war
      3. Start Liferay-4.3.4-JBoss-4.2.1-Tomcat bundle
      4. Watch the JBoss console and make sure the WAR hot deploys properly
      5. Start IE7 (should be reproducible with any browser though)
      6. Login to Liferay Portal as test@liferay.com
      7. Create a new portal page named "Ajax Push"
      8. Add the "Customers" and "Bookings" portlets from under the "Samples" category
      9. Click on each customer and make sure Ajax Push is working
      10. Monitor the JBoss console and make sure there are no errors at this point
      11. Sign-out of Liferay Portal
      12. Sign back in to Liferay Portal as test@liferay.com
      13. Click on the "Ajax Push" portal page
      14. Click on one of the customers
      15. Note that in the JBoss console, there should be "Session already invalidated" error messages
      16. Note that killing IE7 browser and signing back in doesn't fix this problem
      17. Repeat steps 11-14 in order to create yet another session "instance" of these portlets
      18. Run the "jboss/bin/shutdown.bat ---shutdown" command
      19. Note that in the JBoss console, each instance of these portlets have not yet been deallocated.

      The instances actually never get deallocated unless the portal shuts down. And the default connection pool size in worker.properties is 10 so not very many sessions can get created before the server gets bogged down.

      Also note the error java.lang.IllegalStateException: getAttributeNames: Session already invalidated after all the sessions are deallocated.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16825 Fri Jun 06 15:07:44 MDT 2008 greg.dick ICE-3073 Clear the threadLocal instances in the execute() and render() methods in the code path where dispose is true.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16780 Mon Jun 02 15:11:09 MDT 2008 greg.dick ICE-3073 Clear the threadLocal instances in the execute() and render() methods in the code path where dispose is true.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16772 Fri May 30 16:37:56 MDT 2008 greg.dick ICE-3073 Added some logging in View creation and disposal. These logging messages would have helped diagnose the PortletSession bug earlier.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/context/View.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16771 Fri May 30 16:36:57 MDT 2008 greg.dick ICE-3073 Now inform SessionDispatcher of sessionDestroyed events.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/util/event/servlet/ContextEventRepeater.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16769 Fri May 30 16:35:58 MDT 2008 greg.dick ICE-3073 As a receiver of calls from ContextEventRepeater, safeguard against disposing of session assets twice.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16763 Fri May 30 15:52:26 MDT 2008 greg.dick ICE-3073 Added some logging in View creation and disposal. These logging messages would have helped diagnose the PortletSession bug earlier.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16761 Fri May 30 15:49:44 MDT 2008 greg.dick ICE-3073 Now inform SessionDispatcher of sessionDestroyed events.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/util/event/servlet/ContextEventRepeater.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #16760 Fri May 30 15:49:08 MDT 2008 greg.dick ICE-3073 As a receiver of calls from ContextEventRepeater, safeguard against disposing of session assets twice.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java

          People

          • Assignee:
            Unassigned
            Reporter:
            Neil Griffin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: