[ 
https://issues.apache.org/jira/browse/DBCP-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16344361#comment-16344361
 ] 

Tamas Lokucza edited comment on DBCP-485 at 1/31/18 12:01 AM:
--------------------------------------------------------------

Hi [~garydgregory]

I am talking about this interface: 
[https://github.com/wwadge/bonecp/blob/master/bonecp/src/main/java/com/jolbox/bonecp/hooks/ConnectionHook.java]
 and this class: 
 
[https://github.com/wwadge/bonecp/blob/master/bonecp/src/main/java/com/jolbox/bonecp/hooks/AbstractConnectionHook.java]
 
 So we need that to able to put our code like logging etc..:
 - When upon getting a new connection from the JDBC driver (and prior to 
inserting into the pool).
 - When on attempting (and failing) to acquire a connection.
 - When the connection is about to be completely removed from the pool.

Can we get an idea which methods should we override in Apache DBCP code?

Regards
 Tamás


was (Author: pstomi):
Hi [~garydgregory]

I am talking about this interface: 
[https://github.com/wwadge/bonecp/blob/master/bonecp/src/main/java/com/jolbox/bonecp/hooks/ConnectionHook.java]
 and this class: 
[https://github.com/wwadge/bonecp/blob/master/bonecp/src/main/java/com/jolbox/bonecp/hooks/AbstractConnectionHook.java]
 
 So we need that to able to put our code like logging etc..:
 - Upon getting a new connection from the JDBC driver (and prior to inserting 
into the pool).
 - On attempting (and failing) to acquire a connection.
 - When the connection is about to be completely removed from the pool.

Can we get an idea which methods should we override in Apache DBCP code?

Regards
 Tamás

> Connection hook functionality
> -----------------------------
>
>                 Key: DBCP-485
>                 URL: https://issues.apache.org/jira/browse/DBCP-485
>             Project: Commons Dbcp
>          Issue Type: Wish
>    Affects Versions: 2.2.0
>            Reporter: Tamas Lokucza
>            Priority: Minor
>
> We would like to change our connection pool from BoneCP to Apache DBCP. We 
> are facing with the problem that there is no Connection Hook in Apache DBCP. 
> Methods what we are using from BoneCP Connection Hook: onMarkPossiblyBroken, 
> onAcquire, onAcquireFail, onDestroy. Is there any workaround to how we can 
> get the same functionality with DBCP?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to