Good question, Li Li.  The answer is no, this is done by the
PoolableConnectionFactory constructor.  You can see that in the
source here:
http://svn.apache.org/repos/asf/commons/proper/dbcp/branches/DBCP_1_3_x_BRANCH/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java.

Phil

On 9/28/13 10:09 PM, Li Li wrote:
> hi all
>     I am using DBCP as a connection pool using codes like
> http://svn.apache.org/repos/asf/commons/proper/dbcp/branches/DBCP_1_3_x_BRANCH/doc/ManualPoolingDriverExample.java
>
>    there is a line:  PoolableConnectionFactory
> poolableConnectionFactory = new
> PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
>
>    it creates a PoolableConnectionFactory but never use it.
>
>    do I need add this? connectionPool.setFactory(poolableConnectionFactory);
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to