The best way I know to do it is to use a JNDI datasouce configured with a datasource file *-ds.xml in your deploy directory. I use the datasource descriptor below on JBoss 3.2.5 winXP & linux, and it recovers from network outages without having to restart the server. If your applicatioins are not using a JNDI enabled datasource, they probably obtain JDBC connections manually or through stand-alone connection pool. That would explain the need to re-deploy the apps individually. I suggest converting them to use a JNDI datasource, where you have many configurable options for ensuring auto-reconnect. The auto-reconnect options include setting a <check-valid-connection-sql> which will validate a connection everytime it is retrieved from the pool or using a <valid-connection-checker-class-name>. All these options can be found on starting on page 383 of the purchased AdminDevel guide.
<datasources> <local-tx-datasource> <jndi-name>OracleDS</jndi-name> <connection-url>jdbc:oracle:thin:@10.215.xxx.xxx:1521:XXXXX</connection-url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <user-name>user</user-name> <password>pass</password> <min-pool-size>2</min-pool-size> <max-pool-size>5</max-pool-size> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> </local-tx-datasource> </datasources>
note: the min and max pool size is very small for testing purposes
Hope this helps
The ExceptionSorter is supposed to figure out if your connection has gone bad or not. Can you test on 3.2.6 and give the SQLException message and its error code to me?
The best way I know to do it is to use a JNDI datasouce configured with a datasource file *-ds.xml in your deploy directory. ... The auto-reconnect options include setting a <check-valid-connection-sql> which will validate a connection everytime it is retrieved from the pool or using a <valid-connection-checker-class-name>.
Thanks a lot,
this also was my problem. But another point is, our client currently uses JBoss 3.0.8. Does he have to upgrade to use this feature? Or is this feature found in version 3.0.8 in another config-file?