I just realized that you want to check the jdbc connection for validity
every time one is requested by the app...I thought originally that you
were trying to just validate connections when you opened them to the db.
Also, did not realize it could take minutes to open a db connection to a
large db. Given all this, I agree timeout seems like a good approach.
Am I wrong, or is there no value in doing a user spec'd query on a
connection before handing the connection to the user app? That would: a)
waste db resources b) not obviate the need to catch exceptions in the
user's app anyway, so what's the gain?
Rick
Aaron Mulder wrote:
>
> 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]