diff --git a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-mongodb/src/test/java/org/eclipse/jetty/ee10/session/nosql/mongodb/MongoSessionDataStoreTest.java b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-mongodb/src/test/java/org/eclipse/jetty/ee10/session/nosql/mongodb/MongoSessionDataStoreTest.java index 0bccf09cdd5..9bc5efe2df3 100644 --- a/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-mongodb/src/test/java/org/eclipse/jetty/ee10/session/nosql/mongodb/MongoSessionDataStoreTest.java +++ b/jetty-ee10/jetty-ee10-tests/jetty-ee10-test-sessions/jetty-ee10-test-sessions-mongodb/src/test/java/org/eclipse/jetty/ee10/session/nosql/mongodb/MongoSessionDataStoreTest.java @@ -164,7 +164,7 @@ public void testGoodWorkerName() throws Exception { Server server = new Server(); DefaultSessionIdManager idMgr = new DefaultSessionIdManager(server); - idMgr.setWorkerName("NODE99"); + idMgr.setWorkerName("NODE_99"); server.addBean(idMgr); //create the SessionDataStore diff --git a/jetty-integrations/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStore.java b/jetty-integrations/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStore.java index 7c66429a9a2..041658dde8c 100644 --- a/jetty-integrations/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStore.java +++ b/jetty-integrations/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStore.java @@ -157,7 +157,7 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore */ private DBObject _version1; - private final Pattern _workerNamePattern = Pattern.compile("[0-9a-zA-Z]*"); + private static final Pattern _workerNamePattern = Pattern.compile("[_0-9a-zA-Z]*"); /** * Access to MongoDB