Commit 9b3a084b authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Javadoc changes.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10495 b35dd754-fafc-0310-a699-88a17e54d16e
parent 9fd0c986
...@@ -59,10 +59,11 @@ public class DbConnectionManager { ...@@ -59,10 +59,11 @@ public class DbConnectionManager {
/** /**
* Returns a database connection from the currently active connection * Returns a database connection from the currently active connection
* provider. (auto commit is set to true). * provider. An exception will be thrown if no connection was found.
* (auto commit is set to true).
* *
* @return a connection. * @return a connection.
* @throws SQLException if a SQL exception occurs. * @throws SQLException if a SQL exception occurs or no connection was found.
*/ */
public static Connection getConnection() throws SQLException { public static Connection getConnection() throws SQLException {
if (connectionProvider == null) { if (connectionProvider == null) {
...@@ -120,11 +121,9 @@ public class DbConnectionManager { ...@@ -120,11 +121,9 @@ public class DbConnectionManager {
} while (retryCnt <= retryMax); } while (retryCnt <= retryMax);
if (con == null) { if (con == null) {
final SQLException ex = new SQLException("ConnectionManager.getConnection() " + throw new SQLException("ConnectionManager.getConnection() " +
"failed to obtain a connection after " + retryCnt +" retries. " + "failed to obtain a connection after " + retryCnt +" retries. " +
"The exception from the last attempt is as follows: "+lastException); "The exception from the last attempt is as follows: "+lastException);
Log.error("Unable to obtain a connection from the database pool.", ex);
throw ex;
} }
// See if profiling is enabled. If yes, wrap the connection with a // See if profiling is enabled. If yes, wrap the connection with a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment