On 7/24/15 7:54 PM, Bernd Eckenfels wrote:
> Hello Phil,
>
> Am Fri, 24 Jul 2015 16:33:41 -0700
> schrieb Phil Steitz <phil.ste...@gmail.com>:
>> DBCP does nothing special itself. It relies on JDBC drivers to open
>> and close connections.
> The question is, if it uses close(), because that would not work (at
> least for Oracle). I will check the code later...  [ with new JDBC there
> is a abort(Executor) which works and OracleConnection offers cancel()
> and abort() which works as well, but are non-standard. ] 

DBCP uses close to close connections.
>
>> DBCP itself generates very few log messages.
> It documents that it is logging the abandoned closes and usage
> stacktraces, if this means writing it to the writer it might need some
> modification to the javadoc (will check).

BasicDataSource allows you to directly set the abandoned connection
log writer.  Your code uses PoolingDataSource, which requires you to
configure the underlying object pool manually, so you need to use
the setLogWriter method of the AbandonedConfig instance you use to
configure the pool.
>
>> Do you see the abandoned object stack trace on the console
>> (System.out)?  The abandoned trace is not logged by DBCP.
> No, thats what I am missing. The sole output was pasted. I will try to
> configure a printwriter maybe that helps.
>
>> No, it will try to close the connection when the idle object evictor
>> runs.  If the close raises an exception, you should see a stack
>> trace on System.err.  You don't see that?
> I dont see it, and I also not see a blocked close() in the stacktraces.
> The statement execute is taking 20s, it should kill after 13s as it
> runs every 1s.

Try looking at a thread dump.  Another possibility is that the
evictor thread is hung waiting on a driver action.  

Phil
>
> Gruss
> Bernd
>
> ---------------------------------------------------------------------
> 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