diff -Naur openfire_src.original/src/java/org/jivesoftware/openfire/auth/JDBCAuthProvider.java openfire_src/src/java/org/jivesoftware/openfire/auth/JDBCAuthProvider.java
--- openfire_src.original/src/java/org/jivesoftware/openfire/auth/JDBCAuthProvider.java	2008-08-28 23:43:22.000000000 -0430
+++ openfire_src/src/java/org/jivesoftware/openfire/auth/JDBCAuthProvider.java	2008-10-09 16:27:29.000000000 -0430
@@ -44,6 +44,13 @@
  * <li><tt>jdbcAuthProvider.setPasswordSQL = UPDATE user_account SET password=? WHERE username=?</tt></li>
  * </ul>
  *
+ * In order to use the configured JDBC connection provider do not use a JDBC
+ * connection string, set the following property
+ *
+ * <ul>
+ * <li><tt>jdbcAuthProvider.useConnectionProvider = true</tt></li>
+ * </ul>
+ *
  * The passwordType setting tells Openfire how the password is stored. Setting the value
  * is optional (when not set, it defaults to "plain"). The valid values are:<ul>
  *      <li>{@link PasswordType#plain plain}
@@ -61,6 +68,7 @@
     private String setPasswordSQL;
     private PasswordType passwordType;
     private boolean allowUpdate;
+    private boolean useConnectionProvider;
 
     /**
      * Constructs a new JDBC authentication provider.
@@ -74,16 +82,20 @@
         JiveGlobals.migrateProperty("jdbcAuthProvider.setPasswordSQL");
         JiveGlobals.migrateProperty("jdbcAuthProvider.allowUpdate");
 
-        // Load the JDBC driver and connection string.
-        String jdbcDriver = JiveGlobals.getProperty("jdbcProvider.driver");
-        try {
-            Class.forName(jdbcDriver).newInstance();
-        }
-        catch (Exception e) {
-            Log.error("Unable to load JDBC driver: " + jdbcDriver, e);
-            return;
+        useConnectionProvider = JiveGlobals.getBooleanProperty("jdbcAuthProvider.useConnectionProvider");
+
+        if (!useConnectionProvider) {
+            // Load the JDBC driver and connection string.
+            String jdbcDriver = JiveGlobals.getProperty("jdbcProvider.driver");
+            try {
+               Class.forName(jdbcDriver).newInstance();
+            }
+            catch (Exception e) {
+                Log.error("Unable to load JDBC driver: " + jdbcDriver, e);
+                return;
+            }
+            connectionString = JiveGlobals.getProperty("jdbcProvider.connectionString");
         }
-        connectionString = JiveGlobals.getProperty("jdbcProvider.connectionString");
 
         // Load SQL statements.
         passwordSQL = JiveGlobals.getProperty("jdbcAuthProvider.passwordSQL");
@@ -223,6 +235,12 @@
         return (passwordSQL != null && passwordType == PasswordType.plain);
     }
 
+    private Connection getConnection() throws SQLException {
+        if (useConnectionProvider)
+            return DbConnectionManager.getConnection();
+        return DriverManager.getConnection(connectionString);
+    }
+
     /**
      * Returns the value of the password field. It will be in plain text or hashed
      * format, depending on the password type.
@@ -248,7 +266,7 @@
             }
         }
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             pstmt = con.prepareStatement(passwordSQL);
             pstmt.setString(1, username);
 
@@ -287,7 +305,7 @@
             }
         }
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             pstmt = con.prepareStatement(setPasswordSQL);
             pstmt.setString(1, username);
             if (passwordType == PasswordType.md5) {
diff -Naur openfire_src.original/src/java/org/jivesoftware/openfire/group/JDBCGroupProvider.java openfire_src/src/java/org/jivesoftware/openfire/group/JDBCGroupProvider.java
--- openfire_src.original/src/java/org/jivesoftware/openfire/group/JDBCGroupProvider.java	2008-08-28 23:43:22.000000000 -0430
+++ openfire_src/src/java/org/jivesoftware/openfire/group/JDBCGroupProvider.java	2008-10-09 16:34:23.000000000 -0430
@@ -47,6 +47,13 @@
  * <li><tt>jdbcGroupProvider.loadAdminsSQL = SELECT username FORM myGroupUsers WHERE groupName=? AND isAdmin='Y'</tt></li>
  * </ul>
  *
+ * In order to use the configured JDBC connection provider do not use a JDBC
+ * connection string, set the following property
+ *
+ * <ul>
+ * <li><tt>jdbcGroupProvider.useConnectionProvider = true</tt></li>
+ * </ul>
+ *
  * @author David Snopek
  */
 public class JDBCGroupProvider implements GroupProvider {
@@ -59,6 +66,7 @@
     private String userGroupsSQL;
     private String loadMembersSQL;
     private String loadAdminsSQL;
+    private boolean useConnectionProvider;
 
     private XMPPServer server = XMPPServer.getInstance();  
 
@@ -76,16 +84,20 @@
         JiveGlobals.migrateProperty("jdbcGroupProvider.loadMembersSQL");
         JiveGlobals.migrateProperty("jdbcGroupProvider.loadAdminsSQL");
 
-        // Load the JDBC driver and connection string.
-        String jdbcDriver = JiveGlobals.getProperty("jdbcProvider.driver");
-        try {
-            Class.forName(jdbcDriver).newInstance();
-        }
-        catch (Exception e) {
-            Log.error("Unable to load JDBC driver: " + jdbcDriver, e);
-            return;
+        useConnectionProvider = JiveGlobals.getBooleanProperty("jdbcGroupProvider.useConnectionProvider");
+
+        if (!useConnectionProvider) {
+            // Load the JDBC driver and connection string.
+            String jdbcDriver = JiveGlobals.getProperty("jdbcProvider.driver");
+            try {
+                Class.forName(jdbcDriver).newInstance();
+            }
+            catch (Exception e) {
+                Log.error("Unable to load JDBC driver: " + jdbcDriver, e);
+                return;
+            }
+            connectionString = JiveGlobals.getProperty("jdbcProvider.connectionString");
         }
-        connectionString = JiveGlobals.getProperty("jdbcProvider.connectionString");
 
         // Load SQL statements
         groupCountSQL = JiveGlobals.getProperty("jdbcGroupProvider.groupCountSQL");
@@ -116,6 +128,12 @@
         throw new UnsupportedOperationException();
     }
 
+    private Connection getConnection() throws SQLException {
+        if (useConnectionProvider)
+            return DbConnectionManager.getConnection();
+        return DriverManager.getConnection(connectionString);
+    }
+
     public Group getGroup(String name) throws GroupNotFoundException {
         String description = null;
 
@@ -123,7 +141,7 @@
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             pstmt = con.prepareStatement(descriptionSQL);
             pstmt.setString(1, name);
             rs = pstmt.executeQuery();
@@ -151,7 +169,7 @@
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             if (adminsOnly) {
                 if (loadAdminsSQL == null) {
                     return members;
@@ -216,7 +234,7 @@
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             pstmt = con.prepareStatement(groupCountSQL);
             rs = pstmt.executeQuery();
             if (rs.next()) {
@@ -243,7 +261,7 @@
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             pstmt = con.prepareStatement(allGroupsSQL);
             rs = pstmt.executeQuery();
             while (rs.next()) {
@@ -265,7 +283,7 @@
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             pstmt = DbConnectionManager.createScrollablePreparedStatement(con, allGroupsSQL);
             rs = pstmt.executeQuery();
             DbConnectionManager.scrollResultSet(rs, start);
@@ -290,7 +308,7 @@
         PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {
-            con = DriverManager.getConnection(connectionString);
+            con = getConnection();
             pstmt = con.prepareStatement(userGroupsSQL);
             pstmt.setString(1, server.isLocal(user) ? user.getNode() : user.toString());
             rs = pstmt.executeQuery();
@@ -368,4 +386,4 @@
     public boolean isSearchSupported() {
         return false;
     }
-}
\ No newline at end of file
+}
diff -Naur openfire_src.original/src/java/org/jivesoftware/openfire/user/JDBCUserProvider.java openfire_src/src/java/org/jivesoftware/openfire/user/JDBCUserProvider.java
--- openfire_src.original/src/java/org/jivesoftware/openfire/user/JDBCUserProvider.java	2008-08-28 23:43:21.000000000 -0430
+++ openfire_src/src/java/org/jivesoftware/openfire/user/JDBCUserProvider.java	2008-10-09 16:26:24.000000000 -0430
@@ -52,6 +52,14 @@
  * <li><tt>jdbcUserProvider.emailField = mymailField</tt></li>
  * </ul>
  *
+ * In order to use the configured JDBC connection provider do not use a JDBC
+ * connection string, set the following property
+ *
+ * <ul>
+ * <li><tt>jdbcUserProvider.useConnectionProvider = true</tt></li>
+ * </ul>
+ *
+ *
  * @author Huw Richards huw.richards@gmail.com
  */
 public class JDBCUserProvider implements UserProvider {
@@ -65,6 +73,7 @@
 	private String usernameField;
 	private String nameField;
 	private String emailField;
+	private boolean useConnectionProvider;
 
     /**
      * Constructs a new JDBC user provider.
@@ -81,16 +90,20 @@
         JiveGlobals.migrateProperty("jdbcUserProvider.nameField");
         JiveGlobals.migrateProperty("jdbcUserProvider.emailField");
 
-        // Load the JDBC driver and connection string.
-		String jdbcDriver = JiveGlobals.getProperty("jdbcProvider.driver");
-		try {
-			Class.forName(jdbcDriver).newInstance();
-		}
-		catch (Exception e) {
-			Log.error("Unable to load JDBC driver: " + jdbcDriver, e);
-			return;
+        useConnectionProvider = JiveGlobals.getBooleanProperty("jdbcUserProvider.useConnectionProvider");
+
+            // Load the JDBC driver and connection string.
+		if (!useConnectionProvider) {
+			String jdbcDriver = JiveGlobals.getProperty("jdbcProvider.driver");
+			try {
+				Class.forName(jdbcDriver).newInstance();
+			}
+			catch (Exception e) {
+				Log.error("Unable to load JDBC driver: " + jdbcDriver, e);
+				return;
+			}
+			connectionString = JiveGlobals.getProperty("jdbcProvider.connectionString");
 		}
-		connectionString = JiveGlobals.getProperty("jdbcProvider.connectionString");
 
         // Load database statements for user data.
         loadUserSQL = JiveGlobals.getProperty("jdbcUserProvider.loadUserSQL");
@@ -113,7 +126,7 @@
 		PreparedStatement pstmt = null;
 		ResultSet rs = null;
         try {
-			con = DriverManager.getConnection(connectionString);
+			con = getConnection();
 			pstmt = con.prepareStatement(loadUserSQL);
 			pstmt.setString(1, username);
 			rs = pstmt.executeQuery();
@@ -139,7 +152,7 @@
 		PreparedStatement pstmt = null;
 		ResultSet rs = null;
         try {
-			con = DriverManager.getConnection(connectionString);
+			con = getConnection();
 			pstmt = con.prepareStatement(userCountSQL);
 			rs = pstmt.executeQuery();
 			if (rs.next()) {
@@ -155,6 +168,12 @@
 		return count;
 	}
 
+	private Connection getConnection() throws SQLException {
+		if (useConnectionProvider)
+			return DbConnectionManager.getConnection();
+		return DriverManager.getConnection(connectionString);
+	}
+
 	public Collection<User> getUsers() {
 		Collection<String> usernames = getUsernames();
 		return new UserCollection(usernames.toArray(new String[usernames.size()]));
@@ -166,7 +185,7 @@
 		PreparedStatement pstmt = null;
         ResultSet rs = null;
         try {
-			con = DriverManager.getConnection(connectionString);
+			con = getConnection();
 			pstmt = con.prepareStatement(allUsersSQL);
 			rs = pstmt.executeQuery();
 			// Set the fetch size. This will prevent some JDBC drivers from trying
@@ -192,7 +211,7 @@
 		PreparedStatement pstmt = null;
 		ResultSet rs = null;
         try {
-			con = DriverManager.getConnection(connectionString);
+			con = getConnection();
 			pstmt = DbConnectionManager.createScrollablePreparedStatement(con, allUsersSQL);
 			rs = pstmt.executeQuery();
 			DbConnectionManager.setFetchSize(rs, startIndex + numResults);
@@ -273,7 +292,7 @@
 		Statement stmt = null;
 		ResultSet rs = null;
         try {
-			con = DriverManager.getConnection(connectionString);
+			con = getConnection();
 			stmt = con.createStatement();
 			StringBuilder sql = new StringBuilder();
 			sql.append(searchSQL);
@@ -348,7 +367,7 @@
 		Statement stmt = null;
         ResultSet rs = null;
         try {
-			con = DriverManager.getConnection(connectionString);
+			con = getConnection();
 			stmt = con.createStatement();
 			StringBuilder sql = new StringBuilder();
 			sql.append(searchSQL);
