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.
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.)
----- Original Message -----
From: "danch (Dan Christopherson)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 12:10 PM
Subject: Re: [JBoss-user] Strange Behavior When DataSource goes down.
> In this case, no query has been executed.
>
> What I'd change:
> 1. In the pools, object factory create methods should throw an exception
> when they can't create an object - this way we can tell pool exhaustion
> from inability to create a pooled resource.
> 2. The pools should have an ability to test connections to determine if
> they're still good (configurable, of course). This is for those whose
> database thwacks them on the head after some period of time (and no
> ability to turn that behavior off)
>
> others?
>
> -danch
>
>
> David Jencks wrote:
>
> > Well, I kind of agree, however I don't know how to distinguish between
the
> > db crashing and executing a query whose first results are available in 3
> > hours...and you're willing to wait. I think if the driver can
distinguish
> > and throw an exception, you get to see the exception. Otherwise, what
do
> > you do? Some kind of time awareness such as jini leases would be nice,
> > however there certainly isn't any support for them in jdbc. Any ideas?
> >
> > david jencks
> >
> > On 2001.06.28 15:32:20 -0400 Richard Kasperowski wrote:
> >
> >>David Jencks wrote:
> >>
> >>
> >>>Hi,
> >>>I find it hard to understand what you want.
> >>>
> >>>jboss does try out connections from configured datasources on startup,
> >>>
> >>and
> >>
> >>>hangs if they can't connect.
> >>>
> >>>I don't see how this is a severe problem: if your datasource isn't
> >>>
> >>working,
> >>
> >>>neither will your app.
> >>>
> >>
> >>When a datasource becomes unavailable after startup, it might be
> >>desirable for the application to tell the user, "sorry, the database is
> >>unavailable."? A user might find that more satisfactory than being
> >>denied service.
> >>
>
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user