Switching the SecurityContextHolder strategy requires setting a system
property, or invoking SecurityContextHolder.setStrategyName(String
name)
Setting system properties is an awfully Sun way to do things. There is
no real way to do this from a simple application conifguration
perspective.
I think the obvious place for such a feature is the
HttpSessionContextIntegrationFilter, as it is where we configure the
SecurityContext itself.
I would like to add the following method...
public class HttpSessionContextIntegrationFilter implements
InitializingBean, Filter {
....
public void setSecurityContextHolderStrategyName(String strategyName) {
SecurityContextHolder.setStrategyName(strategyName);
}
....
}
So we can have this...
<bean id="httpSessionContextIntegrationFilter"
class="org.acegisecurity.context.HttpSessionContextIntegrationFilter">
<property name="securityContextHolderStrategyName"
value="MODE_INHERITABLETHREADLOCAL"/>
</bean>
Whatcha think?
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer