407173 java.lang.IllegalStateException: null when using JDBCSessionManager

This commit is contained in:
Jan Bartel 2013-05-06 12:24:53 +10:00
parent e2c217d405
commit f10a1d709b
1 changed files with 13 additions and 10 deletions

View File

@ -294,17 +294,20 @@ public class JDBCSessionManager extends AbstractSessionManager
super.complete();
try
{
if (_dirty)
if (isValid())
{
//The session attributes have changed, write to the db, ensuring
//http passivation/activation listeners called
willPassivate();
updateSession(this);
didActivate();
}
else if ((getAccessed() - _lastSaved) >= (getSaveInterval() * 1000L))
{
updateSessionAccessTime(this);
if (_dirty)
{
//The session attributes have changed, write to the db, ensuring
//http passivation/activation listeners called
willPassivate();
updateSession(this);
didActivate();
}
else if ((getAccessed() - _lastSaved) >= (getSaveInterval() * 1000L))
{
updateSessionAccessTime(this);
}
}
}
catch (Exception e)