Ok, finally made the time to look into this. You are correct. I
started a simple bean with a database connection, then shut down Oracle
and restarted. The original connection got
[2003-02-14 00:56:49,203][guyr.DbTester][DbTesterBean]
java.sql.SQLException: Io exception: Connection reset by peer: socket
write error
Then of course a whole stack of additional errors. The client got
this:
javax.transaction.TransactionRolledbackException: Io exception:
Connection reset by peer: socket write error; nested exception is:
I ran the client again and it ran successfully, but I see this, as you
said:
[2003-02-14 00:57:28,062][guyr.DbTester][homeDB] Pool homeDB [1/2/10]
returned object org.jboss.pool.jdbc.xa.wrapper.XAConnectionImpl@37ae22
to the pool.
So it does indeed seem to be holding onto the object for the
non-existent connection. Note that it is not really holding onto a dead
connection. The connection itself obviously doesn't exist. It is
holding the object that wrapped the connection. Not great either, but
it is a definite distinction.
This is Oracle's way of reporting the error - I'm sure every DBMS
returns a different kind of error. Will be difficult to handle in a
generic way, though I would think if the pool manager knows enough to go
get another connection, it must know the one it has is no good and so
should get rid of the object for it. I ran this test on the 2.4
codebase - I wonder if 3.2 is doing things differently. I know the
whole connection architecture is rewritten. Probably not worth going
into the 2.4 code at this late date (though I see JBoss is still
releasing 2.4 releases.)
How does WebLogic handle a database taken down (as the original appender
posited)? Obviously, simply requesting a new connection because it's
connection-testing SQL failed is not a great idea. If the database is
taken out of service for 2 hrs for maintenance, a simplistic approach
will be hammering away to no avail. Is it smart enough to try 2 or 3
times, then give up for 5 minutes and then try again?
----- Original Message -----
From: "Rod Macpherson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 12:09 AM
Subject: Re: [JBoss-user] jboss backup management: howto?
> If a dead connection is used an exception will be thrown and caught.
When
> the dead connection is discovered by the watchdog it will be replaced
with a
> new one. What happens now is that dead connections stay dead until you
> bounce the appserver. I will take the non-fool-proof solution over
that any
> day!
>
> ----- Original Message -----
> From: "Guy Rouillier" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 06, 2003 8:00 PM
> Subject: Re: [JBoss-user] jboss backup management: howto?
>
>
> >
> > ----- Original Message -----
> > From: "Rod Macpherson" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, February 06, 2003 10:37 AM
> > Subject: Re: [JBoss-user] jboss backup management: howto?
> >
> >
> > >>Noticed the same thing. WebLogic has a watch-dog that does a
SELECT *
> > FROM
> > FOO where you supply the table name (e.g., DUAL) and if it fails the
> > connection is re-established. This is a critical feature for
databases
> > that
> > tear down connections prior to backup.<<
> >
> > Unfortunately, that approach is not fool-proof. The connection can
drop
> > at any time, i.e., in the time between when the watchdog last
verified
> > it and the time when you want to use it. As far as I know, there is
no
> > way to guarantee that your next SQL will make it to the database.
> >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.NET email is sponsored by:
> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> > http://www.vasoftware.com
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user