There reaches a point where the overhead of checking the connection to the
database is on the same order of magnitude as just opening a new connection.
If you're reading metadata and doing queries, I think you've reached that
point. You might as well just ditch connection pooling.
I think object timeouts are the way to go. Not only do they clear out
connections that may have gone stale, but with commercial RDBMS, you pay for
concurrent connections. Idle pooled connections waste money.
I was actually surprised to find out that Minerva didn't provide a timeout
for pooled objects. All of the mechanics are there, the last time an object
was used is reported and a GC thread is run periodically. All thats needed
is a stale object timeout ( there are already two, I though GCMinIdleTime
was cleaning out stale objects ), and the logic in the GC method.
Cheers
Chris Audley
Urbanfetch.com
-----Original Message-----
From: Aaron Mulder [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 14, 2000 12:03 PM
To: jBoss
Subject: Re: [jBoss-User] JDBC Connection reset by peer
That's not going to work either. For one thing, it might take
some effort to locate a table the user has select privileges on (we can't
really tell an access denied SQLException from a collection to DB lost
SQLException). But more importantly, I've seen Oracle instances that were
so bloody complex that it took minutes to load the database metadata.
Now you might argue that that represents poor database design, but it's
not up to you.
We could maybe let the user specify a table and then execute a
"select 'x' from foo where 0=1" or something. But I kind of liked the
other idea about just timing out the connections if they've been idle too
long.
Aaron
On Thu, 14 Sep 2000, Rick Horowitz wrote:
> I'm not 100% sure of the problem you're trying to solve here, but would
> it be possible to use one of the JDBC connections to read the database
> metadata, and from that create a JDBC query that could be executed to,
> for example, just read some data from one of the tables?
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]