Guy Rouillier wrote:
> I see one problem here and one issue.
>
> Problem: There is no standard, cross-vendor approach that I'm aware of to
> test to see if a database connection is still alive.
Yep! In the past I've just made a connection pool execute arbitrary
(defined as one of the pool parameters) SQL and see if it works. A bit
of a hack, but I couldn't come up with anything much better.
Another possibility is checking the status codes on any SQLExceptions
that pass through and being able to define a set of them that mean "This
connection is no more."
>
> Issue: My opinion is that we should try to standardize a solution whose
> semantics work for any connection oriented resource, not just databases.
> Something like a standardized "boolean isConnected()" method that would work
> equally well for connections to an email server or to a database server (for
> example.)
>
That'd be a good idea. Add an interface to the object pooling stuff,
like 'ConnectionObject' where we could put that?
-danch
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user