You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by cd...@apache.org on 2006/06/12 02:05:53 UTC
svn commit: r413550 -
/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
Author: cdoremus
Date: Sun Jun 11 17:05:53 2006
New Revision: 413550
URL: http://svn.apache.org/viewvc?rev=413550&view=rev
Log:
Modifed based on Jira PLUTO-242 contribution by David Garcia. Than you.
Modified:
portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java?rev=413550&r1=413549&r2=413550&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/internal/impl/PortletRequestImpl.java Sun Jun 11 17:05:53 2006
@@ -198,16 +198,30 @@
HttpSession httpSession = getHttpServletRequest().getSession(create);
if (httpSession != null) {
// HttpSession is not null does NOT mean that it is valid.
- long maxInactiveTime = httpSession.getMaxInactiveInterval() * 1000L;
- long currentInactiveTime = System.currentTimeMillis()
- - httpSession.getLastAccessedTime();
- if (currentInactiveTime > maxInactiveTime) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("The underlying HttpSession is expired and "
- + "should be invalidated.");
+//START PATCH - Jira Issue PLUTO-242 contriuted by David Garcia
+// long maxInactiveTime = httpSession.getMaxInactiveInterval() * 1000L;
+// long currentInactiveTime = System.currentTimeMillis()
+// - httpSession.getLastAccessedTime();
+// if (currentInactiveTime > maxInactiveTime) {
+// if (LOG.isDebugEnabled()) {
+// LOG.debug("The underlying HttpSession is expired and "
+// + "should be invalidated.");
+ int maxInactiveInterval = httpSession.getMaxInactiveInterval();
+ if (maxInactiveInterval >= 0) { // < 0 => Never expires.
+ long maxInactiveTime = httpSession.getMaxInactiveInterval() * 1000L;
+ long currentInactiveTime = System.currentTimeMillis()
+ - httpSession.getLastAccessedTime();
+ if (currentInactiveTime > maxInactiveTime) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("The underlying HttpSession is expired and "
+ + "should be invalidated.");
+ }
+ httpSession.invalidate();
+ httpSession = getHttpServletRequest().getSession(create);
}
- httpSession.invalidate();
- httpSession = getHttpServletRequest().getSession(create);
+// httpSession.invalidate();
+// httpSession = getHttpServletRequest().getSession(create);
+//END PATCH
}
}
if (httpSession == null) {