Re: DBCP connection pool and validation query

2005-11-15 Thread Danilo Tommasina

Thanks Armin...

now I know what the problem is... I need to format my brain and reinstall it! 
I'AM SO STUPID!

the validationQuery attribute must be set on the  element and NOT on the  element. When it is correctly set, then 
it works as expected and reported by you. Sorry for making anybody loose time, however if somebody else has the same problem, then yeah, just look where you set 
the validationQuery ;)


cheers
Danilo

Armin Waibel wrote:

Hi Danilo,

Danilo Tommasina wrote:


Hi everybody,

We have following problem.:

We are using the DBCP connection factory, we've set a validation 
query, however we never see this query beeing executed.
Now we set the testOnBorrow, testOnReturn and testWhileIdle to "true", 
the query is still never logged (by p6spy).


Manually killing the database connections (MySQL), does not corrupt 
the pool, however since we do not see the validation query beeing 
executed, we have no idea if it is working as expected or not.


Do you have any hints?



Don't know what's going wrong in your environment. I setup a test using 
DBCP + maxDB + validationQuery (latest from CVS OJB_1_0_RELEASE branch) 
and it works without problems:


1131985674765|62|0|statement||select 1 from dual
1131985674828|0|0|statement||DELETE FROM EMPTY_TABLE
1131985674921|0|0|statement||SELECT A0.ID_,A0.NAME FROM EMPTY_TABLE A0 
WHERE A0.NAME = 'nothing_to_find'

1131985674953|0|0|statement||select 1 from dual
...

You only needed to set testOnBorrow="true" (other test... values can be 
false, this is the default setting in OJB). Are you sure that OJB is 
using the correct jdbc-connection-descriptor? Please set logging level 
of org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl to DEBUG 
to get info about the used jdbc-connection-descriptor.


regards,
Armin



here an extract of the repository.xml











-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DBCP connection pool and validation query

2005-11-14 Thread Armin Waibel

Hi Danilo,

Danilo Tommasina wrote:

Hi everybody,

We have following problem.:

We are using the DBCP connection factory, we've set a validation query, 
however we never see this query beeing executed.
Now we set the testOnBorrow, testOnReturn and testWhileIdle to "true", 
the query is still never logged (by p6spy).


Manually killing the database connections (MySQL), does not corrupt the 
pool, however since we do not see the validation query beeing executed, 
we have no idea if it is working as expected or not.


Do you have any hints?



Don't know what's going wrong in your environment. I setup a test using 
DBCP + maxDB + validationQuery (latest from CVS OJB_1_0_RELEASE branch) 
and it works without problems:


1131985674765|62|0|statement||select 1 from dual
1131985674828|0|0|statement||DELETE FROM EMPTY_TABLE
1131985674921|0|0|statement||SELECT A0.ID_,A0.NAME FROM EMPTY_TABLE A0 
WHERE A0.NAME = 'nothing_to_find'

1131985674953|0|0|statement||select 1 from dual
...

You only needed to set testOnBorrow="true" (other test... values can be 
false, this is the default setting in OJB). Are you sure that OJB is 
using the correct jdbc-connection-descriptor? Please set logging level 
of org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl to DEBUG 
to get info about the used jdbc-connection-descriptor.


regards,
Armin



here an extract of the repository.xml











-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DBCP connection pool and validation query

2005-11-14 Thread Danilo Tommasina

Hi everybody,

We have following problem.:

We are using the DBCP connection factory, we've set a validation query, however 
we never see this query beeing executed.
Now we set the testOnBorrow, testOnReturn and testWhileIdle to "true", the 
query is still never logged (by p6spy).

Manually killing the database connections (MySQL), does not corrupt the pool, however since we do not see the validation query beeing executed, we have no idea 
if it is working as expected or not.


Do you have any hints?

here an extract of the repository.xml











-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]