diff --git a/example-jetty-embedded/pom.xml b/example-jetty-embedded/pom.xml
index 021c678580b..93f8ad5ff4e 100644
--- a/example-jetty-embedded/pom.xml
+++ b/example-jetty-embedded/pom.xml
@@ -28,6 +28,11 @@
jetty-servlets
${project.version}
+
+ org.eclipse.jetty
+ jetty-rewrite
+ ${project.version}
+
org.eclipse.jetty
jetty-deploy
@@ -42,6 +47,11 @@
org.eclipse.jetty
jetty-ajp
${project.version}
+
+
+ org.eclipse.jetty.toolchain
+ jetty-test-helper
+ test
org.eclipse.jetty
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();