From 160385606c63bd83db4b9f5d063edbd64357a935 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 13 Oct 2011 13:58:25 +1100 Subject: [PATCH] 358263 - JDBCSessionIdManager add setDatasource(DataSource) method --- .../jetty/server/session/JDBCSessionIdManager.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 ad5b244d761..f9a01d68131 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 @@ -199,6 +199,16 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager } + public void setDatasource (DataSource ds) + { + _datasource = ds; + } + + public DataSource getDataSource () + { + return _datasource; + } + public String getDriverClassName() { return _driverClassName; @@ -471,6 +481,9 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager private void initializeDatabase () throws Exception { + if (_datasource != null) + return; //already set up + if (_jndiName!=null) { InitialContext ic = new InitialContext();