You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Apache's connection pool implementation "Apache Commons DBCP" (commons-dbcp2). In their connection pool (SharedPoolDataSource) I have to set a ConnectionPoolDataSource and I want to use com.impossibl.postgres.jdbc.PGConnectionPoolDataSource - because I really like that PGPooledConnection removes connections from the pool after a fatal SQLException.
Now I use a lot of code that creates a ResultSet and in the end not only the ResultSet is closed but also the Statement that ResultSet.getStatement() returns and the connection that this statement's method getConnection() returns:
Therefore it would be great if you could add a ResultSetDelegator to PGPooledConnection (in addition to PGPooledConnectionDelegator and PGStatementDelegator, PGCallableStatementDelegator, PGPreparedStatementDelegator) and the ResultSetDelegator returns the statement delegator on a call to getStatement() or - as I have seen in the Oracle code - the Statements get a member variable "wrapper" and PGResultSet.getStatement() returns the "wrapper" if it is not null (if it is null the Statement is returned).
The text was updated successfully, but these errors were encountered:
I use Apache's connection pool implementation "Apache Commons DBCP" (commons-dbcp2). In their connection pool (SharedPoolDataSource) I have to set a ConnectionPoolDataSource and I want to use com.impossibl.postgres.jdbc.PGConnectionPoolDataSource - because I really like that PGPooledConnection removes connections from the pool after a fatal SQLException.
Now I use a lot of code that creates a ResultSet and in the end not only the ResultSet is closed but also the Statement that ResultSet.getStatement() returns and the connection that this statement's method getConnection() returns:
Connection connection = datasource.getConnection();
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery();
... (use the resultSet)
resultSet.getStatement().getConnection().close();
Therefore it would be great if you could add a ResultSetDelegator to PGPooledConnection (in addition to PGPooledConnectionDelegator and PGStatementDelegator, PGCallableStatementDelegator, PGPreparedStatementDelegator) and the ResultSetDelegator returns the statement delegator on a call to getStatement() or - as I have seen in the Oracle code - the Statements get a member variable "wrapper" and PGResultSet.getStatement() returns the "wrapper" if it is not null (if it is null the Statement is returned).
The text was updated successfully, but these errors were encountered: