Robert Krueger <[EMAIL PROTECTED]> writes

<SNIP>

>I've just finished implementing the following:
>
>modify the container code so that it
>- looks for an additional datasource param indicating that jdbcpool should
>be used for this data source
>- sets up the pool using additional parameters given in the data source
>properties (timeouts, maxconnections, monitor interval etc.)
>
>modify the connection manager so that it
>- checks if a connection is closed when it is taken from the pool (takes
>under 1 ms with oracle)

Can I ask how you do this?

Is it just by calling connection.isClosed() or do you do something like
execute a simple SQL statement such as "SELECT 1;" to force a round-trip
to the database?

>From my understanding of the JDBC API, the former will not be of any
practical use [one of the silliest methods in the whole Java core API,
IMHO]
I would be (pleasantly) surprised if the latter only took 1ms, but I
guess that's why buying an expensive Oracle db may be worth the
investment!

>- if it finds a closed connection that's not associated with a transaction,
>reopens it
>
>the two modifications are just a few lines of code, it works, still allows
>using standard jonas behaviour (you can choose for each datasource) and
>helps me use a very conservative, fault-tolerant setting for my project
>without any relevant performance penalty.

<SNIP>

- Jorgen

------------------------------------------------------------
| Software Technologies  ----:----  http://www.SwTech.com/ |
| ----------->  One-stop Developer Reference  <----------- |
| Technical reference for professional software developers |
------------------------------------------------------------

Reply via email to