ICEfaces
  1. ICEfaces
  2. ICE-4785

Keep session alive when integrating with frameworks which can bypass jsf

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      non-jsf framework which does not utilize jsf request

      Description

      When using seam-remoting, the jsf lifecycle can be bypassed, so requests may not come into our framework. This can result in the session either timing out or otherwise invalidating. A utility for client and/or server side to touch or tickle the session to maintain it during these times could be used.

        Activity

        Judy Guglielmin created issue -
        Hide
        Judy Guglielmin added a comment -

        as per your request

        Show
        Judy Guglielmin added a comment - as per your request
        Judy Guglielmin made changes -
        Field Original Value New Value
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Deryk Sinotte made changes -
        Salesforce Case []
        Fix Version/s 1.8.2 [ 10190 ]
        Assignee Priority P2
        Affects Version/s 1.8.1 [ 10170 ]
        Affects Version/s 1.8.2 [ 10190 ]
        Assignee Deryk Sinotte [ deryk.sinotte ] Mark Collette [ mark.collette ]
        Hide
        Deryk Sinotte added a comment -

        Oops assigning to Mircea instead of Mark....they're very close on the list of assignees

        Show
        Deryk Sinotte added a comment - Oops assigning to Mircea instead of Mark....they're very close on the list of assignees
        Deryk Sinotte made changes -
        Assignee Mark Collette [ mark.collette ] Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19204 Tue Sep 01 08:27:22 MDT 2009 mircea.toma ICE-4785 Provide API for easy access to ICEfaces session monitor. Provide Servlet filter that updates session timeout countdown for requests outside of ICEfaces framework.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/TouchSessionFilter.java
        Hide
        Mircea Toma added a comment -

        Added API for easy access to ICEfaces session monitor so that session timeout countdown can be reset programmatically. Usage example:

        HttpServletRequest request = (HttpServletRequest) servletRequest;
        HttpSession session = request.getSession();
        if (session != null)

        { SessionDispatcher.Monitor.lookupSessionMonitor(session).touchSession(); }

        Also added utility Servlet filter that resets the session timeout countdown for the requests is configured for in web.xml file. The filter allows application developers to declare selectively requests should update the session timeout. Usage example:

        <filter>
        <filter-name>Touch Session</filter-name>
        <filter-class>com.icesoft.faces.webapp.http.servlet.TouchSessionFilter</filter-class>
        </filter>
        <filter-mapping>
        <filter-name>Touch Session</filter-name>
        <url-pattern>/seam/remoting/*</url-pattern>
        </filter-mapping>

        Show
        Mircea Toma added a comment - Added API for easy access to ICEfaces session monitor so that session timeout countdown can be reset programmatically. Usage example: HttpServletRequest request = (HttpServletRequest) servletRequest; HttpSession session = request.getSession(); if (session != null) { SessionDispatcher.Monitor.lookupSessionMonitor(session).touchSession(); } Also added utility Servlet filter that resets the session timeout countdown for the requests is configured for in web.xml file. The filter allows application developers to declare selectively requests should update the session timeout. Usage example: <filter> <filter-name>Touch Session</filter-name> <filter-class>com.icesoft.faces.webapp.http.servlet.TouchSessionFilter</filter-class> </filter> <filter-mapping> <filter-name>Touch Session</filter-name> <url-pattern>/seam/remoting/*</url-pattern> </filter-mapping>
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Affects [Documentation (User Guide, Ref. Guide, etc.)]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19231 Tue Sep 08 16:07:17 MDT 2009 mircea.toma ICE-4785 Make SessionDispatcher.Monitor serializable.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19232 Tue Sep 08 16:26:45 MDT 2009 mircea.toma ICE-4785 Add no-args constructor.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment - - edited

        SessionDispatcher.Monitor instance is put into the session so that TouchSessionFilter can access it. Because the class is not serializable it causes exceptions in app servers configured with session persistence.

        [9/8/09 13:42:02:924 MDT] 0000429e SessionContex E SESN0040E: BackedHashtable:commonSetup - problem streaming object. Exception caught while trying to serialize session data for subsequent database write. The session data may be too large to serialize. Either put less data in the session or consider configuring Session Manager for MultiRow database mode.
        [9/8/09 13:44:47:497 MDT] 0000003f SessionContex E Exception is: java.io.NotSerializableException: com.ibm.ws.webcontainer.facade.ServletContextFacade
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code))
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code))
        at java.util.HashSet.writeObject(HashSet.java(Compiled Code))
        at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
        at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java(Compiled Code))
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled Code))
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled Code))
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code))
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java(Inlined Compiled Code))
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled Code))
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled Code))

        Show
        Mircea Toma added a comment - - edited SessionDispatcher.Monitor instance is put into the session so that TouchSessionFilter can access it. Because the class is not serializable it causes exceptions in app servers configured with session persistence. [9/8/09 13:42:02:924 MDT] 0000429e SessionContex E SESN0040E: BackedHashtable:commonSetup - problem streaming object. Exception caught while trying to serialize session data for subsequent database write. The session data may be too large to serialize. Either put less data in the session or consider configuring Session Manager for MultiRow database mode. [9/8/09 13:44:47:497 MDT] 0000003f SessionContex E Exception is: java.io.NotSerializableException: com.ibm.ws.webcontainer.facade.ServletContextFacade at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Compiled Code)) at java.util.HashSet.writeObject(HashSet.java(Compiled Code)) at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code)) at java.lang.reflect.Method.invoke(Method.java(Compiled Code)) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java(Compiled Code)) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java(Inlined Compiled Code)) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled Code)) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled Code))
        Hide
        Mircea Toma added a comment -

        Make SessionDispatcher.Monitor serializable.

        Show
        Mircea Toma added a comment - Make SessionDispatcher.Monitor serializable.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2-RC1 [ 10210 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19293 Thu Sep 24 09:23:17 MDT 2009 deryk.sinotte ICE-4785: Fixed use case where initial requests to resources that didn't use a session (e.g. plain.html) would cause an NPE
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/TouchSessionFilter.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19297 Thu Sep 24 12:14:55 MDT 2009 deryk.sinotte Branching 1.8.0 for ICE-4785 patch
        Files Changed
        Commit graph ADD /icefaces/scratchpads/patches/ICE-4785/1.8.0/icefaces
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19298 Thu Sep 24 12:21:59 MDT 2009 deryk.sinotte ICE-4785: patch that backports changes to a 1.8.0 branch
        Files Changed
        Commit graph ADD /icefaces/scratchpads/patches/ICE-4785/1.8.0/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/TouchSessionFilter.java
        Commit graph MODIFY /icefaces/scratchpads/patches/ICE-4785/1.8.0/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: