You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Thomas (JIRA)" <ji...@apache.org> on 2016/11/03 08:56:58 UTC

[jira] [Resolved] (DBCP-462) Refactoring of PStmtKey and PoolingConnection

     [ https://issues.apache.org/jira/browse/DBCP-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Thomas resolved DBCP-462.
------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2

Thanks for the patch. It has been applied.
A 2.2 release is likely fairly soon. If you can get the patch to add the pooling in quickly, it should make it for 2.2.

> Refactoring of PStmtKey and PoolingConnection
> ---------------------------------------------
>
>                 Key: DBCP-462
>                 URL: https://issues.apache.org/jira/browse/DBCP-462
>             Project: Commons Dbcp
>          Issue Type: Improvement
>    Affects Versions: 2.1.1
>            Reporter: KeiichiFujino
>            Priority: Minor
>             Fix For: 2.2
>
>         Attachments: PStmtKey.txt, PoolingConnection.txt, TestPoolingConnection.java, TesterConnection.txt, TesterPreparedStatement.txt
>
>
> In PoolingConnection, the following methods are not defined.
> -prepareStatement(String sql, int[] columnIndexes) 
> -prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) 
> -prepareStatement(String sql, String[] columnNames) 
> -prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) 
> Therefore, when calling these methods, we can not cache statements.
> I had tried to implement these methods in PoolingConnection.
> However, because the code in the PoolingConnection#makeObject is a little complex,
> I thought that it is difficult to add new conditions.
> So, in order to more easily implement the Connection#prepareStatement that are not defined in the PoolingConnection, 
> I did a refactoring for the PStmtKey and PoolingConnection.
> If these refactoring are accepted,I have a plan to implement the following methods to PoolingConnection 
> in order to cache all of Prepared or Callable Statement.
> -prepareStatement(String sql, int[] columnIndexes) 
> -prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) 
> -prepareStatement(String sql, String[] columnNames) 
> -prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)