In JBoss data source how can I give multiple connection strings for database fail over in which I want .
There will be two Mysql db with same tables say DB1 and DB2.
Follow this documentation. Jboss has configuration setting. https://community.jboss.org/wiki/JBossJCADatabaseFailover
Additionally, if you are NOT using JNDI and plain JDBC call I hav another solution - Say you are making a jdbc call then you will need to get a DB connection, if the DB is down then you will get Database connection exception, in the try catch block, if you encounter connection exception, create a connection in catch block itself for the second database :-)