[DBCP] removeAbandoned and removeAbandonedTimeout feature

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[DBCP] removeAbandoned and removeAbandonedTimeout feature

Pramodh Peddi
All,

 

The feature (provided by removeAbandoned and removeAbandonedTimeout)
used to work when I used Tomcat's JNDI to create the DataSource. Now, I
started using BasicDataSourceFactory.createDataSource(Properties) to
create the DataSource. Ever since I made this change, this feature
stopped working for me. One more difference is, the application is not
in the context of Tomcat now, it's a standalone application. Not sure if
this makes a difference as the tool is claimed to work both in and out
of Tomcat.

 

I realize this feature is deprecated in 1.2 and might be removed in the
future releases. I am not really sure why this feature is deprecated as
I (and hoping others) found this a very very very useful feature. Even
official dbcp documentation
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example
s-howto.html) advices to use this to close poorly managed connections.
Is there any replacement for this set of parameters? If this feature is
gone (and if nothing replaces this), I do not think there is any way for
the dbcp tool to close an open connection, if not closed by the
program/application.

 

Any input will be greatly appreciated,

 

Thanks,

 

Pramodh.

Reply | Threaded
Open this post in threaded view
|

Re: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Dirk Verbeeck
Please post a junit test showing the problem with the "abandoned"
feature and the factory.

FYI: Tomcat calls BasicDataSourceFactory.getObjectInstance(...) and this
method calls BasicDataSourceFactory.createDataSource(...) so there isn't
a large difference in initialization code.

The reason why abandoned* methods are deprecated are explained in the
wiki: http://wiki.apache.org/jakarta-commons/DBCP

-- Dirk

Pramodh Peddi wrote:

> All,
>
>  
>
> The feature (provided by removeAbandoned and removeAbandonedTimeout)
> used to work when I used Tomcat's JNDI to create the DataSource. Now, I
> started using BasicDataSourceFactory.createDataSource(Properties) to
> create the DataSource. Ever since I made this change, this feature
> stopped working for me. One more difference is, the application is not
> in the context of Tomcat now, it's a standalone application. Not sure if
> this makes a difference as the tool is claimed to work both in and out
> of Tomcat.
>
>  
>
> I realize this feature is deprecated in 1.2 and might be removed in the
> future releases. I am not really sure why this feature is deprecated as
> I (and hoping others) found this a very very very useful feature. Even
> official dbcp documentation
> (http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example
> s-howto.html) advices to use this to close poorly managed connections.
> Is there any replacement for this set of parameters? If this feature is
> gone (and if nothing replaces this), I do not think there is any way for
> the dbcp tool to close an open connection, if not closed by the
> program/application.
>
>  
>
> Any input will be greatly appreciated,
>
>  
>
> Thanks,
>
>  
>
> Pramodh.
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Pramodh Peddi
In reply to this post by Pramodh Peddi
Hi Dirk/All,

I posted the junit test, which I found to have problems related to
*abandon* methods. The only thing to do is define a query in
testDoDBPerformanceAnalysis to suit your database.

I am also finding the problem of initialSize (all the initial
connections become active). When I put initialSize to 12, getNumActive
returns 13 when I open a connection. The test should show/reveal this
problem too. Please let me know if you do not understand the junit
tests.

Thanks,

Pramodh.

-----Original Message-----
From: Dirk Verbeeck [mailto:[hidden email]]
Sent: Monday, June 27, 2005 2:20 AM
To: Jakarta Commons Users List
Subject: Re: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Please post a junit test showing the problem with the "abandoned"
feature and the factory.

FYI: Tomcat calls BasicDataSourceFactory.getObjectInstance(...) and this

method calls BasicDataSourceFactory.createDataSource(...) so there isn't

a large difference in initialization code.

The reason why abandoned* methods are deprecated are explained in the
wiki: http://wiki.apache.org/jakarta-commons/DBCP

-- Dirk

Pramodh Peddi wrote:
> All,
>
>  
>
> The feature (provided by removeAbandoned and removeAbandonedTimeout)
> used to work when I used Tomcat's JNDI to create the DataSource. Now,
I
> started using BasicDataSourceFactory.createDataSource(Properties) to
> create the DataSource. Ever since I made this change, this feature
> stopped working for me. One more difference is, the application is not
> in the context of Tomcat now, it's a standalone application. Not sure
if
> this makes a difference as the tool is claimed to work both in and out
> of Tomcat.
>
>  
>
> I realize this feature is deprecated in 1.2 and might be removed in
the
> future releases. I am not really sure why this feature is deprecated
as
> I (and hoping others) found this a very very very useful feature. Even
> official dbcp documentation
>
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example
> s-howto.html) advices to use this to close poorly managed connections.
> Is there any replacement for this set of parameters? If this feature
is
> gone (and if nothing replaces this), I do not think there is any way
for

> the dbcp tool to close an open connection, if not closed by the
> program/application.
>
>  
>
> Any input will be greatly appreciated,
>
>  
>
> Thanks,
>
>  
>
> Pramodh.
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Dirk Verbeeck
There was no attachment to the mail, mayby it was removed by the mailing
list software. Please mail it with the code inline or mail the file to
me directly.

Thanks
Dirk

Pramodh Peddi wrote:

> Hi Dirk/All,
>
> I posted the junit test, which I found to have problems related to
> *abandon* methods. The only thing to do is define a query in
> testDoDBPerformanceAnalysis to suit your database.
>
> I am also finding the problem of initialSize (all the initial
> connections become active). When I put initialSize to 12, getNumActive
> returns 13 when I open a connection. The test should show/reveal this
> problem too. Please let me know if you do not understand the junit
> tests.
>
> Thanks,
>
> Pramodh.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Pramodh Peddi
In reply to this post by Pramodh Peddi
Hey Dirk,

Just want to let you know that yesterday I sent you the junit test just
to your email @ [hidden email]. Hope you received it. Let me
know if you have not received it or if you can't run the junit test.

 

Thanks for the help.

 

Pramodh.

 

-----Original Message-----
From: Dirk Verbeeck [mailto:[hidden email]]
Sent: Tuesday, June 28, 2005 2:17 AM
To: Jakarta Commons Users List
Subject: Re: [DBCP] removeAbandoned and removeAbandonedTimeout feature

 

There was no attachment to the mail, mayby it was removed by the mailing


list software. Please mail it with the code inline or mail the file to

me directly.

 

Thanks

Dirk

 

Pramodh Peddi wrote:

> Hi Dirk/All,

>

> I posted the junit test, which I found to have problems related to

> *abandon* methods. The only thing to do is define a query in

> testDoDBPerformanceAnalysis to suit your database.

>

> I am also finding the problem of initialSize (all the initial

> connections become active). When I put initialSize to 12, getNumActive

> returns 13 when I open a connection. The test should show/reveal this

> problem too. Please let me know if you do not understand the junit

> tests.

>

> Thanks,

>

> Pramodh.

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Dirk Verbeeck
Hi Pramodh,

Received, compiled and ran the test. But can't reproduce your problem.
What version of the DBCP/pool libraries are you using?

-- Dirk

Pramodh Peddi wrote:

> Hey Dirk,
>
> Just want to let you know that yesterday I sent you the junit test just
> to your email @ [hidden email]. Hope you received it. Let me
> know if you have not received it or if you can't run the junit test.
>
>  
>
> Thanks for the help.
>
>  
>
> Pramodh.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [DBCP] removeAbandoned and removeAbandonedTimeout feature

Pramodh Peddi
In reply to this post by Pramodh Peddi
I am using commons-dbcp-1.2. I used to use version 1.1 before, which did
not support initialSize parameter and that's one of the main reasons I
moved to version 1.2. And now that I think, wondering if shifting to 1.2
made *abandoned* stopped it from working (please note that *abandoned*
thing not working is one of the two problems I am encountering, along
with initialSize thing) as it REALLY worked before.

 

Pramodh.

 

-----Original Message-----
From: Dirk Verbeeck [mailto:[hidden email]]
Sent: Thursday, June 30, 2005 2:07 AM
To: Jakarta Commons Users List
Subject: Re: [DBCP] removeAbandoned and removeAbandonedTimeout feature

 

Hi Pramodh,

 

Received, compiled and ran the test. But can't reproduce your problem.

What version of the DBCP/pool libraries are you using?

 

-- Dirk

 

Pramodh Peddi wrote:

> Hey Dirk,

>

> Just want to let you know that yesterday I sent you the junit test
just

> to your email @ [hidden email]. Hope you received it. Let me

> know if you have not received it or if you can't run the junit test.

>

>  

>

> Thanks for the help.

>

>  

>

> Pramodh.

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]