Peter Donald wrote:
> 
> Hi,
> 
> I am just playing with some DB code and wondering if the way to test for
> stale connections is via "isClosed()". Will that actually check staleness or
> will that only check if user has called close() ?

The JdbcConnection wrapper has the actual logic to test for stale connections.
It checks first if the wrapped Connection object is closed.  Then it runs the
query "SELECT 1;" as a line test if it isn't closed.  (Note: for Oracle databases
the query is "SELECT 1 FROM DUAL").

I reallize that not all DBs are alike, so there is the ability to write your own
wrapper.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to