Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2014-08-13 22:38:25 +0000
committerGreg Wilkins2014-08-13 22:38:25 +0000
commit98b654ba20d3a908311eb4f2bb9b350b1f2f390d (patch)
treeb41949b35f581b45253ca936970bf8afa8c6e17e /jetty-nosql
parentb983fab97268af05ff84f98b25e35d607cc8a686 (diff)
parent18b6a9b3d9f1bd2a693877f19541a309e30d28f9 (diff)
downloadorg.eclipse.jetty.project-98b654ba20d3a908311eb4f2bb9b350b1f2f390d.tar.gz
org.eclipse.jetty.project-98b654ba20d3a908311eb4f2bb9b350b1f2f390d.tar.xz
org.eclipse.jetty.project-98b654ba20d3a908311eb4f2bb9b350b1f2f390d.zip
Merge remote-tracking branch 'origin/master' into jetty-http2
Conflicts: jetty-distribution/pom.xml
Diffstat (limited to 'jetty-nosql')
-rw-r--r--jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java82
1 files changed, 37 insertions, 45 deletions
diff --git a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java
index c9f93fd710..606bc0dc80 100644
--- a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java
+++ b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/NoSqlSessionManager.java
@@ -176,71 +176,63 @@ public abstract class NoSqlSessionManager extends AbstractSessionManager impleme
@Override
protected boolean removeSession(String idInCluster)
{
- synchronized (this)
- {
- NoSqlSession session = _sessions.remove(idInCluster);
+ NoSqlSession session = _sessions.remove(idInCluster);
- try
- {
- if (session != null)
- {
- return remove(session);
- }
- }
- catch (Exception e)
+ try
+ {
+ if (session != null)
{
- __log.warn("Problem deleting session {}", idInCluster,e);
+ return remove(session);
}
-
- return session != null;
}
+ catch (Exception e)
+ {
+ __log.warn("Problem deleting session {}", idInCluster,e);
+ }
+
+ return session != null;
+
}
/* ------------------------------------------------------------ */
protected void expire( String idInCluster )
{
- synchronized (this)
- {
- //get the session from memory
- NoSqlSession session = _sessions.get(idInCluster);
+ //get the session from memory
+ NoSqlSession session = _sessions.get(idInCluster);
- try
- {
- if (session == null)
- {
- //we need to expire the session with its listeners, so load it
- session = loadSession(idInCluster);
- }
-
- if (session != null)
- session.timeout();
- }
- catch (Exception e)
+ try
+ {
+ if (session == null)
{
- __log.warn("Problem expiring session {}", idInCluster,e);
+ //we need to expire the session with its listeners, so load it
+ session = loadSession(idInCluster);
}
+
+ if (session != null)
+ session.timeout();
+ }
+ catch (Exception e)
+ {
+ __log.warn("Problem expiring session {}", idInCluster,e);
}
}
-
-
+
+
public void invalidateSession (String idInCluster)
{
- synchronized (this)
+ NoSqlSession session = _sessions.get(idInCluster);
+ try
{
- NoSqlSession session = _sessions.get(idInCluster);
- try
- {
- __log.debug("invalidating session {}", idInCluster);
- if (session != null)
- {
- session.invalidate();
- }
- }
- catch (Exception e)
+ __log.debug("invalidating session {}", idInCluster);
+ if (session != null)
{
- __log.warn("Problem invalidating session {}", idInCluster,e);
+ session.invalidate();
}
}
+ catch (Exception e)
+ {
+ __log.warn("Problem invalidating session {}", idInCluster,e);
+ }
}

Back to the top