Glauber Ribeiro [http://community.jboss.org/people/theglauber] created the 
discussion

"When does JBoss reopen a dead connection?"

To view the discussion, visit: http://community.jboss.org/message/569897#569897

--------------------------------------------------------------
I'm using JBoss 4.3. I have a data source defined like this:

    <min-pool-size>5</min-pool-size>
    <max-pool-size>25</max-pool-size>
    <validate-on-match>false</validate-on-match>
    <background-validation>true</background-validation>
    <idle-timeout-minutes>5</idle-timeout-minutes>
    <background-validation-minutes>1</background-validation-minutes>
    <prefill>true</prefill>
 
<min-pool-size>5</min-pool-size>
<max-pool-size>25</max-pool-size>
<validate-on-match>false</validate-on-match>
<background-validation>true</background-validation>
<idle-timeout-minutes>10</idle-timeout-minutes>
<background-validation-minutes>15</background-validation-minutes>
<prefill>true</prefill>

 
And i have the validation SQLs defined:
 
<new-connection-sql>select 1</new-connection-sql>
<check-valid-connection-sql>select 1</check-valid-connection-sql>
 
 
 
 
 
 
 
 

Here's my problem: when there is a database failure (say, just for the sake of 
argument, i reboot the database server, to cause a failure) under load (that 
is, i'm constantly feeding transactions to my application, so it is trying to 
use the database all the time), JBoss continues to feed dead database 
connections to the application, until the background validation fires, at which 
point the connections are re-opened. So i see a bunch of errors in my 
application log that say things like "SQLException: invalid operation on closed 
connection", until the background validation fires and those connections are 
re-opened.
 

I'm surprised this is happening. I thought a SQLException on a connection would 
cause JBoss to drop that connection from the pool, but instead, JBoss seems to 
be blissfully unaware that there is anything wrong with the connections, and 
keeps passing them back to the application. Why doesn't it? Is JBoss relying on 
the application re-throwing the SQLExceptions?  :-/ 

Thanks for any help, pointers, etc.

glauber
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/569897#569897]

Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to