321307 HashSessionManager calls passivation listeners

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2206 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-08-04 08:00:44 +00:00
parent a5e1cea005
commit 4196e46c09
3 changed files with 9 additions and 12 deletions

View File

@ -9,6 +9,8 @@ jetty-7.2-SNAPSHOT
+ 320264 Removed duplicate mime.property entries + 320264 Removed duplicate mime.property entries
+ 320457 Added rfc2045 support to B64Code + 320457 Added rfc2045 support to B64Code
+ 321232 BasicAuthenticator ignores bad Authorization header. + 321232 BasicAuthenticator ignores bad Authorization header.
+ 321307 HashSessionManager calls passivation listeners.
+ JETTY-912 added per exchange timeout api + JETTY-912 added per exchange timeout api
+ JETTY-1245 Do not use direct buffers with NIO SSL + JETTY-1245 Do not use direct buffers with NIO SSL
+ JETTY-1249 Apply max idle time to all connectors + JETTY-1249 Apply max idle time to all connectors

View File

@ -607,10 +607,6 @@ public abstract class AbstractSessionManager extends AbstractLifeCycle implement
((HttpSessionListener)LazyList.get(_sessionListeners,i)).sessionCreated(event); ((HttpSessionListener)LazyList.get(_sessionListeners,i)).sessionCreated(event);
} }
} }
else
{
session.didActivate();
}
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@ -701,11 +697,6 @@ public abstract class AbstractSessionManager extends AbstractLifeCycle implement
for (int i=LazyList.size(_sessionListeners); i-->0;) for (int i=LazyList.size(_sessionListeners); i-->0;)
((HttpSessionListener)LazyList.get(_sessionListeners,i)).sessionDestroyed(event); ((HttpSessionListener)LazyList.get(_sessionListeners,i)).sessionDestroyed(event);
} }
if (!invalidate)
{
session.willPassivate();
}
} }
} }

View File

@ -95,7 +95,6 @@ public class HashSessionManager extends AbstractSessionManager
@Override @Override
public void doStop() throws Exception public void doStop() throws Exception
{ {
if (_storeDir != null) if (_storeDir != null)
saveSessions(); saveSessions();
@ -397,11 +396,13 @@ public class HashSessionManager extends AbstractSessionManager
_lazyLoad = lazyLoad; _lazyLoad = lazyLoad;
} }
/* ------------------------------------------------------------ */
public boolean isLazyLoad() public boolean isLazyLoad()
{ {
return _lazyLoad; return _lazyLoad;
} }
/* ------------------------------------------------------------ */
public void restoreSessions () throws Exception public void restoreSessions () throws Exception
{ {
if (_storeDir==null || !_storeDir.exists()) if (_storeDir==null || !_storeDir.exists())
@ -424,6 +425,7 @@ public class HashSessionManager extends AbstractSessionManager
Session session = restoreSession(in); Session session = restoreSession(in);
in.close(); in.close();
addSession(session, false); addSession(session, false);
session.didActivate();
files[i].delete(); files[i].delete();
} }
catch (Exception e) catch (Exception e)
@ -464,7 +466,9 @@ public class HashSessionManager extends AbstractSessionManager
file.delete(); file.delete();
file.createNewFile(); file.createNewFile();
FileOutputStream fos = new FileOutputStream (file); FileOutputStream fos = new FileOutputStream (file);
session.willPassivate();
session.save(fos); session.save(fos);
session.didActivate();
fos.close(); fos.close();
} }
catch (Exception e) catch (Exception e)