You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Антон Мацюк <de...@gmail.com> on 2015/03/01 22:24:39 UTC

[dbcp] dbcp, pool and SQLWarnings.

Hi!
I have a question about dbcp and pool.
Last two weeks I have examined heapdumps of Tomcat instances that is
used by my apps.
There is situation with BoneCP - it have a LOT of SQLWarnings at each
connection used by it.
With DBCP-app all is normal - there is no SQLWarnings.
Apps are not the same, so there can be difference in connections usage
or usage rate, but both apps use Sybase ASE as database, and ASE
reacts with SQLWarning at each use of setReadonly method.
I can't find if somewhere in dbcp- or pool- projects something calling
clearWarnings before or after connection have been used.
May you please point me to this place in code?
Maybe warnings cleared somewhere, maybe DBCP supress setReadonly, but
finally there is no SQLWarning's in Connections in heapdump of app
which use DBCP.
Is it a passivateObject
http://mail-archives.apache.org/mod_mbox/commons-dev/200306.mbox/%3C00cf01c33667$2358cf20$1ac8a8c0@JOACHIM%3E
?
Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [dbcp] dbcp, pool and SQLWarnings.

Posted by Phil Steitz <ph...@gmail.com>.
On 3/3/15 7:26 AM, Антон Мацюк wrote:
> I am talking about DBCP 1.4 now.

I am not familiar with the internals of BoneCP; but DBCP has been
optimized to reduce the calls to driver setXxx methods.  See
https://issues.apache.org/jira/browse/DBCP-102
https://issues.apache.org/jira/browse/DBCP-234 (not in 1.4)

You are correct below that DBCP-initiated driver setXxx and
clearWarnings calls happen in PoolableConnectionFactory's
activateObject and passivateObject methods.

Phil


>
> 2015-03-03 15:42 GMT+02:00 Phil Steitz <ph...@gmail.com>:
>>
>>
>>
>>> On Mar 1, 2015, at 2:24 PM, Антон Мацюк <de...@gmail.com> wrote:
>>>
>>> Hi!
>>> I have a question about dbcp and pool.
>>> Last two weeks I have examined heapdumps of Tomcat instances that is
>>> used by my apps.
>>> There is situation with BoneCP - it have a LOT of SQLWarnings at each
>>> connection used by it.
>>> With DBCP-app all is normal - there is no SQLWarnings.
>>> Apps are not the same, so there can be difference in connections usage
>>> or usage rate, but both apps use Sybase ASE as database, and ASE
>>> reacts with SQLWarning at each use of setReadonly method.
>>> I can't find if somewhere in dbcp- or pool- projects something calling
>>> clearWarnings before or after connection have been used.
>>> May you please point me to this place in code?
>>> Maybe warnings cleared somewhere, maybe DBCP supress setReadonly, but
>>> finally there is no SQLWarning's in Connections in heapdump of app
>>> which use DBCP.
>>> Is it a passivateObject
>>> http://mail-archives.apache.org/mod_mbox/commons-dev/200306.mbox/%3C00cf01c33667$2358cf20$1ac8a8c0@JOACHIM%3E
>>> ?
>>> Thanks.
>> Which version of DBCP?
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [dbcp] dbcp, pool and SQLWarnings.

Posted by Антон Мацюк <de...@gmail.com>.
I am talking about DBCP 1.4 now.

2015-03-03 15:42 GMT+02:00 Phil Steitz <ph...@gmail.com>:
>
>
>
>
>> On Mar 1, 2015, at 2:24 PM, Антон Мацюк <de...@gmail.com> wrote:
>>
>> Hi!
>> I have a question about dbcp and pool.
>> Last two weeks I have examined heapdumps of Tomcat instances that is
>> used by my apps.
>> There is situation with BoneCP - it have a LOT of SQLWarnings at each
>> connection used by it.
>> With DBCP-app all is normal - there is no SQLWarnings.
>> Apps are not the same, so there can be difference in connections usage
>> or usage rate, but both apps use Sybase ASE as database, and ASE
>> reacts with SQLWarning at each use of setReadonly method.
>> I can't find if somewhere in dbcp- or pool- projects something calling
>> clearWarnings before or after connection have been used.
>> May you please point me to this place in code?
>> Maybe warnings cleared somewhere, maybe DBCP supress setReadonly, but
>> finally there is no SQLWarning's in Connections in heapdump of app
>> which use DBCP.
>> Is it a passivateObject
>> http://mail-archives.apache.org/mod_mbox/commons-dev/200306.mbox/%3C00cf01c33667$2358cf20$1ac8a8c0@JOACHIM%3E
>> ?
>> Thanks.
>
> Which version of DBCP?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [dbcp] dbcp, pool and SQLWarnings.

Posted by Phil Steitz <ph...@gmail.com>.



> On Mar 1, 2015, at 2:24 PM, Антон Мацюк <de...@gmail.com> wrote:
> 
> Hi!
> I have a question about dbcp and pool.
> Last two weeks I have examined heapdumps of Tomcat instances that is
> used by my apps.
> There is situation with BoneCP - it have a LOT of SQLWarnings at each
> connection used by it.
> With DBCP-app all is normal - there is no SQLWarnings.
> Apps are not the same, so there can be difference in connections usage
> or usage rate, but both apps use Sybase ASE as database, and ASE
> reacts with SQLWarning at each use of setReadonly method.
> I can't find if somewhere in dbcp- or pool- projects something calling
> clearWarnings before or after connection have been used.
> May you please point me to this place in code?
> Maybe warnings cleared somewhere, maybe DBCP supress setReadonly, but
> finally there is no SQLWarning's in Connections in heapdump of app
> which use DBCP.
> Is it a passivateObject
> http://mail-archives.apache.org/mod_mbox/commons-dev/200306.mbox/%3C00cf01c33667$2358cf20$1ac8a8c0@JOACHIM%3E
> ?
> Thanks.

Which version of DBCP?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [dbcp] dbcp, pool and SQLWarnings.

Posted by Phil Steitz <ph...@gmail.com>.
On 3/1/15 2:24 PM, Антон Мацюк wrote:
> Hi!
> I have a question about dbcp and pool.
> Last two weeks I have examined heapdumps of Tomcat instances that is
> used by my apps.
> There is situation with BoneCP - it have a LOT of SQLWarnings at each
> connection used by it.
> With DBCP-app all is normal - there is no SQLWarnings.
> Apps are not the same, so there can be difference in connections usage
> or usage rate, but both apps use Sybase ASE as database, and ASE
> reacts with SQLWarning at each use of setReadonly method.
> I can't find if somewhere in dbcp- or pool- projects something calling
> clearWarnings before or after connection have been used.
> May you please point me to this place in code?
> Maybe warnings cleared somewhere, maybe DBCP supress setReadonly, but
> finally there is no SQLWarning's in Connections in heapdump of app
> which use DBCP.
> Is it a passivateObject
> http://mail-archives.apache.org/mod_mbox/commons-dev/200306.mbox/%3C00cf01c33667$2358cf20$1ac8a8c0@JOACHIM%3E
> ?
> Thanks.

What version of DBCP?

Phil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org