use of org.firebirdsql.jdbc.FBSQLException in project jaybird by FirebirdSQL.
the class FBConnectionPoolDataSource method initialize.
private void initialize() throws SQLException {
synchronized (lock) {
if (internalDs != null) {
return;
}
try {
GDSType gdsType = GDSType.getType(getType());
if (gdsType == null) {
gdsType = GDSFactory.getDefaultGDSType();
}
FBManagedConnectionFactory mcf = new FBManagedConnectionFactory(gdsType, getConnectionProperties());
internalDs = (FBDataSource) mcf.createConnectionFactory();
internalDs.setLogWriter(getLogWriter());
} catch (ResourceException e) {
throw new FBSQLException(e);
}
}
}
use of org.firebirdsql.jdbc.FBSQLException in project jaybird by FirebirdSQL.
the class FBPooledConnection method getConnection.
@Override
public synchronized Connection getConnection() throws SQLException {
if (connection == null) {
FBSQLException ex = new FBSQLException("The PooledConnection has been closed", SQLStateConstants.SQL_STATE_CONNECTION_CLOSED);
fireFatalConnectionError(ex);
throw ex;
}
try {
if (handler != null) {
handler.close();
}
resetConnection(connection);
} catch (SQLException ex) {
fireFatalConnectionError(ex);
throw ex;
}
handler = createConnectionHandler(connection);
return handler.getProxy();
}
Aggregations