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

        Hide
        Judy Guglielmin added a comment -

        as per your request

        Show
        Judy Guglielmin added a comment - as per your request
        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
        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>
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: