shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lhazlew...@apache.org
Subject svn commit: r796837 - in /incubator/shiro/trunk/core/src: main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java test/java/org/apache/shiro/session/mgt/DefaultSessionManagerTest.java
Date Wed, 22 Jul 2009 19:14:10 GMT
Author: lhazlewood
Date: Wed Jul 22 19:14:10 2009
New Revision: 796837

URL: http://svn.apache.org/viewvc?rev=796837&view=rev
Log:
minor logging fixes

Modified:
    incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
    incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DefaultSessionManagerTest.java

Modified: incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java?rev=796837&r1=796836&r2=796837&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
(original)
+++ incubator/shiro/trunk/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
Wed Jul 22 19:14:10 2009
@@ -211,6 +211,9 @@
     protected void validate(Session session) throws InvalidSessionException {
         try {
             doValidate(session);
+        } catch (ExpiredSessionException ese) {
+            onExpiration(session, ese);
+            throw ese;
         } catch (InvalidSessionException ise) {
             onInvalidation(session, ise);
             throw ise;
@@ -222,8 +225,8 @@
             onExpiration(session, (ExpiredSessionException) ise);
             return;
         }
-        if (log.isDebugEnabled()) {
-            log.debug("Session with id [" + session.getId() + "] is invalid.");
+        if (log.isTraceEnabled()) {
+            log.trace("Session with id [{}] is invalid.", ise.getSessionId());
         }
         onStop(session);
         notifyStop(session);
@@ -231,6 +234,9 @@
     }
 
     protected void onExpiration(Session s, ExpiredSessionException ese) {
+        if (log.isTraceEnabled()) {
+            log.trace("Session with id [{}] has expired.", ese.getSessionId());
+        }
         onExpiration(s);
         notifyExpiration(s);
         afterExpired(s);

Modified: incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DefaultSessionManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DefaultSessionManagerTest.java?rev=796837&r1=796836&r2=796837&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DefaultSessionManagerTest.java
(original)
+++ incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DefaultSessionManagerTest.java
Wed Jul 22 19:14:10 2009
@@ -81,7 +81,6 @@
         String sessionId1 = UUID.randomUUID().toString();
         final SimpleSession session1 = new SimpleSession();
         session1.setId(sessionId1);
-        System.out.println("Session id 1: " + sessionId1);
 
         final Session[] activeSession = new SimpleSession[]{session1};
         sm.setSessionFactory(new SessionFactory() {



Mime
View raw message