-
1. Re: JBoss does not reconnect after mysql-server restart
peterj Aug 18, 2009 11:48 AM (in response to wasu)Try "touching" the *-ds.xml file. That will update the last modified timestamp which will cause the app server to redeploy the datasource.
-
2. Re: JBoss does not reconnect after mysql-server restart
henk53 Sep 25, 2009 6:17 PM (in response to wasu)"PeterJ" wrote:
Try "touching" the *-ds.xml file. That will update the last modified timestamp which will cause the app server to redeploy the datasource.
Peter, is there any more automatic recovery available? I just encountered a similar problem. We have many Jboss AS instances connecting to a central DB. Because of a full disk the DB (Postgres) stopped working and after resolving the problem the DB had to be restarted.
The problem was that none of the Jboss instances were able to connect anymore after this restart and they all had to be restarted manually. This is rather tedious to say the least. Touching the *-ds.xml file reliefs this pain only a little. -
3. Re: JBoss does not reconnect after mysql-server restart
henk53 Sep 25, 2009 6:32 PM (in response to wasu)I found this other thread: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4158716
It seems that if you have valid connection checker, then basically the redeployment of the datasource would not really be needed. Sure, it might still be better to redeploy instead of waiting for every connection to have thrown an exception, but eventually the pool *should* recover automatically. Only. clearly it doesn't (or it doesn't always). The topic starter has a valid connection checker configured, so if I understand correctly those connections should have been closed and re-opened, shouldn't they? -
4. Re: JBoss does not reconnect after mysql-server restart
henk53 Oct 1, 2009 5:19 PM (in response to wasu)Anyone any ideas?
-
5. Re: JBoss does not reconnect after mysql-server restart
rajesh_nadiminti Apr 12, 2012 1:52 AM (in response to henk53)Hi
I am using Jboss5.1.0 and i configured the same *-ds.xml file as mentioned above with mysql as
DB. After restart of DB, jboss is able to connect to DB. Everything worked for me.Thanks,
Rajesh N
-
6. Re: JBoss does not reconnect after mysql-server restart
malbas May 24, 2013 1:20 PM (in response to rajesh_nadiminti)Hello. Would you mind to show configuration of your *-ds. xml file? I have configured my datasource file with suggested steps but Jboss doesnot reconnect when mysql database restart. Here is content of my -ds.xml file:
<datasources>
<local-tx-datasource><local-tx-datasource>
<jndi-name>MSSQLMWCONFIGDS</jndi-name>
<connection-url>jdbc:sqlserver://servername\ddb2:55428;databaseName=databasename;</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>user_u</user-name>
<password>user_u</password>
<autoReconnect>true</autoReconnect>
<check-valid-connection-sql>SELECT 1 FROM sysobject</check-valid-connection-sql>
<failOverReadOnly>false</failOverReadOnly>
<maxReconnects>50</maxReconnects>
<initialTimeout>15</initialTimeout>
<metadata>
<type-mapping>MS SQLSERVER2000</type-mapping>
</metadata>
</local-tx-datasource></datasources>
I am newbie to JBoos but need to make this work. Thank you all for any help.