Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2014-08-13 03:47:30 +0000
committerJan Bartel2014-08-13 03:47:30 +0000
commita183219ac82a3aaaf22e3a7940204eae7a743a63 (patch)
tree47d7d86e7e8984e8ccd8ffc46e83bf21a99bdb12 /jetty-nosql
parentaedfb662b6aad6f1157edab7f5a08850b0745645 (diff)
downloadorg.eclipse.jetty.project-a183219ac82a3aaaf22e3a7940204eae7a743a63.tar.gz
org.eclipse.jetty.project-a183219ac82a3aaaf22e3a7940204eae7a743a63.tar.xz
org.eclipse.jetty.project-a183219ac82a3aaaf22e3a7940204eae7a743a63.zip
441479 Jetty hangs due to deadlocks in session manager
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