Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionIdManager.java5
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionIdManager.java b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionIdManager.java
index e599b27149..18d44061c3 100644
--- a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionIdManager.java
+++ b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionIdManager.java
@@ -416,7 +416,10 @@ public class MongoSessionIdManager extends AbstractSessionIdManager
_scheduler = new ScheduledExecutorScheduler();
_ownScheduler = true;
_scheduler.start();
- }
+ }
+ else if (!_scheduler.isStarted())
+ throw new IllegalStateException("Shared scheduler not started");
+
//setup the scavenger thread
if (_scavengePeriod > 0)
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java
index 535dc5f02e..434cf9dfde 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java
@@ -992,6 +992,8 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
_ownScheduler = true;
_scheduler.start();
}
+ else if (!_scheduler.isStarted())
+ throw new IllegalStateException("Shared scheduler not started");
setScavengeInterval(getScavengeInterval());
}

Back to the top