commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@centras.lt>
Subject Re: [DBCP] Please let us start to improve the connection pool
Date Tue, 25 Mar 2003 19:55:22 GMT
it is web aplication, isn't it ?

You can convert this application this way :
 If you use MVC, close  connection in controler,
 if it is "model 1" convert it to MVC using Filter and close connection in
filter.
 You can store connection in ThreadLocal or in request attribute.
It must be trivial to implement and you do not need workarounds.
Use "SessionWrapper" to detect legacy stuff and throw exeption, if some code
tries to put connection to session.
I am sure wokarounds will not help in production.



----- Original Message -----
From: "Mario Ivankovits" <Mario.Ivankovits@ops.co.at>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Tuesday, March 25, 2003 9:34 PM
Subject: Re: [DBCP] Please let us start to improve the connection pool


> > Not very good idea ...
> I have currently converted our application from single-connection (per
> session) to this connection pool. We do have had a clean concept for how
to
> get an connection, but maybe one of the developer has done some "mystic".
I
> just felt very comfortable with this "feature" in two ways:
> 1) Our application might not run in an "out of connection" error only due
to
> some bug
> 2) This bug is logged with its stacktrace (where the connection is
> requested) and solving is easy. How can an developer be more happy?!
>
> > It is just workaround, I do not believe it can work.
> Why not? With my patch applied have have successfully tested this.
> 1) The connection was passed back, logged and reused
> 2) The wrong program terminates with an "NullPointerException" which is
the
> consequence of my patch if the pool "abandoned" the connection.
>
> > Is  "backgound thread" used for this wokaround too ?
> No, this is done in AbandonedObjectPool.borrowObject() when the pool is
near
> the state where no more connections are available.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


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


Mime
View raw message