shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SHIRO-297) Setting sessionMode to native kills any SessionManager already configured
Date Wed, 04 Jan 2012 00:54:39 GMT

     [ https://issues.apache.org/jira/browse/SHIRO-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Les Hazlewood resolved SHIRO-297.
---------------------------------

    Resolution: Won't Fix

the 'sessionMode' property has been deprecated, with appropriate deprecation warnings being
displayed.  This will likely be removed entirely for Shiro 2.  

The solution to this bug is to configure the 'sessionManager' property as desired (e.g. with
a DefaultWebSessionManager' which is a native session manager) and to not set the 'sessionMode'
property.
                
> Setting sessionMode to native kills any SessionManager already configured
> -------------------------------------------------------------------------
>
>                 Key: SHIRO-297
>                 URL: https://issues.apache.org/jira/browse/SHIRO-297
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 1.1.0
>            Reporter: Jason Erickson
>             Fix For: 1.2.0
>
>
> I just got done working through an issue trying to get single sign-on working with EhCacheManager,
following some examples I found on the mailing list (except I was using Spring configuration).
 It wasn't working for me at first with this: 
> {code:xml}
> <bean id="securityManager" 
>   class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"> 
>      <property name="realm" ref="factorlabRealm" /> 
>      <property name="subjectFactory" ref="factorlabSubjectFactory" /> 
>      <property name="cacheManager" ref="ssoCacheManager" /> 
>      <property name="sessionManager" ref="sessionManager" /> 
>      <property name="sessionMode" value="native" /> 
> </bean> 
> {code}
>  
> After lots of debugging, I got it to work with this: 
>  
>  
> <bean id="securityManager" 
>   class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"> 
>     <property name="sessionMode" value="native" /> 
>     <property name="realm" ref="factorlabRealm" /> 
>     <property name="subjectFactory" ref="factorlabSubjectFactory" /> 
>     <property name="cacheManager" ref="ssoCacheManager" /> 
>     <property name="sessionManager" ref="sessionManager" /> 
> </bean> 
>  
>  
> The difference is moving the sessionMode to earlier in the property list, because the
setter for sessionMode was replacing my configured 
> sessionManager with a new DefaultWebSessionManager.   
> This seems pretty fragile.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message