You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by lh...@apache.org on 2009/09/10 17:02:00 UTC
svn commit: r813468 -
/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java
Author: lhazlewood
Date: Thu Sep 10 15:02:00 2009
New Revision: 813468
URL: http://svn.apache.org/viewvc?rev=813468&view=rev
Log:
improved JavaDoc a bit
Modified:
incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java
Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java?rev=813468&r1=813467&r2=813468&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java (original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/SessionListener.java Thu Sep 10 15:02:00 2009
@@ -45,10 +45,14 @@
/**
* Notification callback that occurs when the corresponding Session has expired.
* <p/>
- * Note that this method is almost never called at the exact instant that the {@code Session} expires. Almost all
+ * <b>Note</b>: this method is almost never called at the exact instant that the {@code Session} expires. Almost all
* session management systems, including Shiro's implementations, lazily validate sessions - either when they
- * are accessed or during a regular validation interval.
+ * are accessed or during a regular validation interval. It would be too resource intensive to monitor every
+ * single session instance to know the exact instant it expires.
* <p/>
+ * If you need to perform time-based logic when a session expires, it is best to write it based on the
+ * session's {@link org.apache.shiro.session.Session#getLastAccessTime() lastAccessTime} and <em>not</em> the time
+ * when this method is called.
*
* @param session the session that has expired.
*/