diff options
author | Mark Spruiell <mes@zeroc.com> | 2008-08-20 16:35:18 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2008-08-20 16:35:18 -0700 |
commit | a6a6a3af43c2676be8eb114d4e48c5a8e61c2614 (patch) | |
tree | 75547ef5ab7909cf337ffdf3dccd6de266f3a3db /java/demo/Database/library/ConnectionPool.java | |
parent | add Glacier2 support. (diff) | |
download | ice-a6a6a3af43c2676be8eb114d4e48c5a8e61c2614.tar.bz2 ice-a6a6a3af43c2676be8eb114d4e48c5a8e61c2614.tar.xz ice-a6a6a3af43c2676be8eb114d4e48c5a8e61c2614.zip |
minor cleanup of JDBC demo
Diffstat (limited to 'java/demo/Database/library/ConnectionPool.java')
-rw-r--r-- | java/demo/Database/library/ConnectionPool.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/demo/Database/library/ConnectionPool.java b/java/demo/Database/library/ConnectionPool.java index 4e0b32f759a..dd1eff8ee61 100644 --- a/java/demo/Database/library/ConnectionPool.java +++ b/java/demo/Database/library/ConnectionPool.java @@ -21,7 +21,7 @@ class ConnectionPool _nconnections = numConnections; while(numConnections-- > 0) { - java.sql.Connection connection = java.sql.DriverManager.getConnection (url, username, password); + java.sql.Connection connection = java.sql.DriverManager.getConnection(url, username, password); connection.setAutoCommit(false); _connections.add(connection); } @@ -94,14 +94,14 @@ class ConnectionPool conn = null; } - // If the connection has been closed, or is otherwise invalid - // re-establish the connection. + // If the connection has been closed, or is otherwise invalid, + // we need to re-establish the connection. while(conn == null) { _logger.trace("ConnectionPool", "establishing new database connection"); try { - conn = java.sql.DriverManager.getConnection (_url, _username, _password); + conn = java.sql.DriverManager.getConnection(_url, _username, _password); conn.setAutoCommit(false); } catch(java.sql.SQLException e) |