[
https://issues.apache.org/jira/browse/SHIRO-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Les Hazlewood resolved SHIRO-387.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0
1.2.2
Applied fix in the description to the trunk and the 1.2.x branch.
However, for the feature request, I created SHIRO-436. Because this would
introduce a new protected method, it can't be released in a point release
(Shiro 1.2.2). To maintain API binary compatibility per APR versioning
guidelines, this should be present in 1.3.0 and/or 2.0.0.
Thanks for the issue!
> EnvironmentLoader destroys wrong environment
> --------------------------------------------
>
> Key: SHIRO-387
> URL: https://issues.apache.org/jira/browse/SHIRO-387
> Project: Shiro
> Issue Type: Bug
> Components: Web
> Affects Versions: 1.2.1
> Reporter: Tuomas Kiviaho
> Fix For: 1.2.2, 1.3.0
>
>
> I've got a singleton EnvironmentLoader that is used to create multiple
> environments for multiple servlet contexts. Initialization goes all well but
> destroying is done to the last created environment and not to the one that
> resides in given servlet context.
> A simple fix/workaroud would be to change the destroyEnvironment as
> {code}
> Object environment = servletContext.getAttribute(ENVIRONMENT_ATTRIBUTE_KEY);
> LifecycleUtils.destroy(environment);
> {code}
> Instance variable reference to last initialized environment should also be
> removed to allow garbage to be collected after last environment has been
> destroyed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira