shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbunt...@apache.org
Subject svn commit: r1154931 - in /shiro/trunk/support/guice/src: main/java/org/apache/shiro/guice/web/ShiroWebModule.java test/java/org/apache/shiro/guice/web/ShiroWebModuleTest.java
Date Mon, 08 Aug 2011 11:48:45 GMT
Author: jbunting
Date: Mon Aug  8 11:48:45 2011
New Revision: 1154931

URL: http://svn.apache.org/viewvc?rev=1154931&view=rev
Log:
SHIRO-313: Changing default SessionManager in Guice modules to be consistent with the rest
of Shiro.  (from DefaultWebSessionManager to ServletContainerSessionManager)

Modified:
    shiro/trunk/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java
    shiro/trunk/support/guice/src/test/java/org/apache/shiro/guice/web/ShiroWebModuleTest.java

Modified: shiro/trunk/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java
URL: http://svn.apache.org/viewvc/shiro/trunk/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java?rev=1154931&r1=1154930&r2=1154931&view=diff
==============================================================================
--- shiro/trunk/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java
(original)
+++ shiro/trunk/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java
Mon Aug  8 11:48:45 2011
@@ -39,7 +39,7 @@ import org.apache.shiro.web.filter.mgt.F
 import org.apache.shiro.web.filter.session.NoSessionCreationFilter;
 import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
 import org.apache.shiro.web.mgt.WebSecurityManager;
-import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
+import org.apache.shiro.web.session.mgt.ServletContainerSessionManager;
 
 import javax.servlet.Filter;
 import javax.servlet.ServletContext;
@@ -195,7 +195,7 @@ public abstract class ShiroWebModule ext
      */
     @Override
     protected void bindSessionManager(AnnotatedBindingBuilder<SessionManager> bind)
{
-        bind.to(DefaultWebSessionManager.class).asEagerSingleton();
+        bind.to(ServletContainerSessionManager.class).asEagerSingleton();
     }
 
     @Override

Modified: shiro/trunk/support/guice/src/test/java/org/apache/shiro/guice/web/ShiroWebModuleTest.java
URL: http://svn.apache.org/viewvc/shiro/trunk/support/guice/src/test/java/org/apache/shiro/guice/web/ShiroWebModuleTest.java?rev=1154931&r1=1154930&r2=1154931&view=diff
==============================================================================
--- shiro/trunk/support/guice/src/test/java/org/apache/shiro/guice/web/ShiroWebModuleTest.java
(original)
+++ shiro/trunk/support/guice/src/test/java/org/apache/shiro/guice/web/ShiroWebModuleTest.java
Mon Aug  8 11:48:45 2011
@@ -33,6 +33,7 @@ import org.apache.shiro.web.filter.mgt.F
 import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
 import org.apache.shiro.web.mgt.WebSecurityManager;
 import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
+import org.apache.shiro.web.session.mgt.ServletContainerSessionManager;
 import org.junit.Test;
 
 import javax.inject.Named;
@@ -71,8 +72,8 @@ public class ShiroWebModuleTest {
         assertTrue(securityManager instanceof WebSecurityManager);
         SessionManager sessionManager = injector.getInstance(SessionManager.class);
         assertNotNull(sessionManager);
-        assertTrue(sessionManager instanceof DefaultWebSessionManager);
-        assertTrue(((DefaultWebSecurityManager)securityManager).getSessionManager() instanceof
DefaultWebSessionManager);
+        assertTrue(sessionManager instanceof ServletContainerSessionManager);
+        assertTrue(((DefaultWebSecurityManager)securityManager).getSessionManager() instanceof
ServletContainerSessionManager);
     }
 
     @Test



Mime
View raw message