478239 Remove pointless synchronize in infinispan scavenging

This commit is contained in:
Jan Bartel 2015-09-24 08:37:35 +10:00
parent 8c21871cf0
commit 6f953b2677
1 changed files with 4 additions and 7 deletions

View File

@ -654,14 +654,11 @@ public class InfinispanSessionManager extends AbstractSessionManager
long now = System.currentTimeMillis();
LOG.info("SessionManager for context {} scavenging at {} ", getContextPath(getContext()), now);
synchronized (_sessions)
for (Map.Entry<String, Session> entry:_sessions.entrySet())
{
for (Map.Entry<String, Session> entry:_sessions.entrySet())
{
long expiry = entry.getValue().getExpiry();
if (expiry > 0 && expiry < now)
candidateIds.add(entry.getKey());
}
long expiry = entry.getValue().getExpiry();
if (expiry > 0 && expiry < now)
candidateIds.add(entry.getKey());
}
for (String candidateId:candidateIds)