-
1. Re: Database reconnect (JB 3.2)
davidjencks Apr 24, 2003 7:18 PM (in response to sysuser1)1. I'm not sure what you mean by auto-refresh. If you can get the db server to send remote jmx notifications that it is crashing and that it is available again you might be able to write something. Meanwhile all I know how to do is to remove connections that indicate they are dead by throwing exceptions when you try to use them.
2. <!--example: this is executed each time before a connection is handed out from the pool-->
<check-valid-connection-sql>select * from dual where 1 = 2</check-valid-connection-sql>
3. no. you can write and use an ExceptionSorter that will tell jboss if an exception means the connection is dead. Look at the Oracle configs for an example. If you contribute one for Sybase I will enthusiastically commit it.
The best solution I know of is for the database to provide a jca adapter that properly implements the jca specified error notification to the app server. Anything else is a workaround. Both the checkValidConnectionSQL and the exceptionsorter are attempts to bolt such functionality onto drivers that lack it. -
2. Re: Database reconnect (JB 3.2)
samart Apr 25, 2003 6:35 PM (in response to sysuser1)unplugging my network cable from my laptop running jboss and testing this out, jboss does not seem to not have problems re-initialzing the connections.
also, i thought i had read in this forum that the connections are recycled periodically.