Weblogic's connection pooling lets you specify the SQL statement that you
want to test with. In Oracle you would typically test a connection with
"select dummy from dual". I think you need to allow the test SQL statement
to be configured for each pool. If an exception is raised when it is
executed you can assume the connection is bad.
Hal
-----Original Message-----
From: Johan Compagner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 10:23 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Database pooling code
Do you just test the isClosed() method?
My plan was to execute a small sql code that has a very little overhead
and alway's returns normal for every db if the connection is still good.
But i don't know what kind of sql statement works for every db.
johan
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Matthias Bauer
> Sent: Wednesday, March 07, 2001 4:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Database pooling code
>
>
> Database pooling works pretty well for me. But there are some
> pitfalls, when a
> connection times out or the database server is restarted. As the
> framework does
> not check if a connection is still valid before returning it to
> the application
> you will run into an exception when trying to use a connection
> which has timed
> out or was closed due to some other reason on the server side.
>
> I know there was some discussion going on about this on the list
> in the past.
> There were some pros and cons about whether the framework should check the
> validity of a connection before returning it to the application.
> I patched the
> struts code in order to do this check and always return a valid connection
> (requires the jdbc driver Connection.isClosed() method to work
> correctly - some
> have a bug in their implementation). If you are interested in
> this little patch,
> please let me know.
>
> --- Matthias
>
>
> I patched
>
> Jim Richards wrote:
> >
> > Has anyone got the database pooling code/DataSource to work or
> specifically
> > had it fail?
> >
> > I've been having problems (documented previously) and I've read
> about a few others
> > who can't seem to get the pooling to work as well, and I want
> to get an idea
> > of specifically where the problem might lie in order to fix it.
> >
> > ----
> > You are the simulacrum of my dreams
> > and the signifier of my desires
> >
> > Mr Grumpy ... come and visit his home!
> > http://www.cyber4.org/members/grumpy/index.html
>