sonatype/nexus-oss — pull request #7 by cstamas (2013-05-23 10:29:37+00:00)
Title: [REVIEW] NEXUS-5727: Prevent multiple creation of thread.

Shiro 1.2.1 suffers from a concurrency issue that causes multiple session validation threads to be lazily created upon first request for a session. We saw this on OSO Nexus instance for example, where we had 5 such threads concurrently sweeping for stopped sessions.

This applies a workaround usable with Shiro 1.2.1. The workaround is to "preinstall" the session validating thread, so no "lazy" creation (that is not thread safe) will happen.

Issues:
https://issues.sonatype.org/browse/NEXUS-5727
https://issues.apache.org/jira/browse/SHIRO-443