| Method from org.apache.commons.dbcp.PoolingDataSource Detail: |
public Connection getConnection() throws SQLException {
try {
Connection conn = (Connection)(_pool.borrowObject());
if (conn != null) {
conn = new PoolGuardConnectionWrapper(conn);
}
return conn;
} catch(SQLException e) {
throw e;
} catch(NoSuchElementException e) {
throw new SQLNestedException("Cannot get a connection, pool error " + e.getMessage(), e);
} catch(RuntimeException e) {
throw e;
} catch(Exception e) {
throw new SQLNestedException("Cannot get a connection, general error", e);
}
}
|
public Connection getConnection(String uname,
String passwd) throws SQLException {
throw new UnsupportedOperationException();
}
|
public PrintWriter getLogWriter() {
return _logWriter;
}
|
public int getLoginTimeout() {
throw new UnsupportedOperationException("Login timeout is not supported.");
}
|
public boolean isAccessToUnderlyingConnectionAllowed() {
return this.accessToUnderlyingConnectionAllowed;
}
Returns the value of the accessToUnderlyingConnectionAllowed property. |
public void setAccessToUnderlyingConnectionAllowed(boolean allow) {
this.accessToUnderlyingConnectionAllowed = allow;
}
Sets the value of the accessToUnderlyingConnectionAllowed property.
It controls if the PoolGuard allows access to the underlying connection.
(Default: false) |
public void setLogWriter(PrintWriter out) {
_logWriter = out;
}
|
public void setLoginTimeout(int seconds) {
throw new UnsupportedOperationException("Login timeout is not supported.");
}
|
public void setPool(ObjectPool pool) throws IllegalStateException, NullPointerException {
if(null != _pool) {
throw new IllegalStateException("Pool already set");
} else if(null == pool) {
throw new NullPointerException("Pool must not be null.");
} else {
_pool = pool;
}
}
|