Search code examples
javasessionwebspherewebsphere-portal

Is it possible to have a session timeout specific to a single JSR-168 portlet application


I have JSR-168 Portlet deployed inside IBM Portal Server v6.0 and we are having some issues with the portlet reaching the maximum amount of in-memory sessions defined in the WebSphere console for the Portal Server.

As a result we need to tweak the session-timeout setttings. My question is where should I tweak the settings. i.e. In a JSR-168 Portlet are you allowed to have the following and will it work...

<session-config>
   <session-timeout>30</session-timeout>
</session-config>

I am confused about this because I'm not sure it makes sense to have a session-timeout on an individual Portlet. A portlet is just a widget on a web page and if that portlet has a session timeout does that mean that the rest of the page times out?

Or is it not possible to have a session-timeout just for one portlet and hence the Portlet inherits the session timeout settings defined for the Portal Server in WebSphere? And effectively making the session timeout a parameter applicable to all pages/portlets on the Portal Server?

thanks


Solution

  • A portlet and especially a JSR Portlet is more then a widget on the page. Based on J2EE spec it is a full application on the server side and WebSphere Application server generates a server side Session object per application. WebSphere Portal differentiates between the Portlet sessions and the Portal main session. While the Portlet session is kept alive for full activity of the user the Portlet sessions may be invalidated because they are no longer of use. So the timeout of a Portlet session does not impact the Portal session, but on logout or timeout of the Portal session all associated Portlet sessions are invalidated.