I would like to know if Jboss provides this mechanism. Here is the scenario.
1. Set up a Datasource in -ds.xml file. Non XA datasource.
2. Start Jboss Application Server.
3. For some reason Database is down.
4. When try to get a connection from Datasource, it throws exception which is fine.
5. After certain time - 10 15 mins, lets say Database is up again.
6. When you try to get a connection from datasource, does it return a valid connection or we need to restart the Datasource through MBean.
Does the point # 6 is handled by Jboss Mbean automatically or we need to take care of this.
Thanks. The problem is access to production environment. I'm thinking of automating these steps. May be i have to write a connection-checker class and add the entry to -ds.xml file. This connection-checker class will check for connection and redeploy the mbean. Other approach would be to handle it programatically in the code where you get a connection from Datasource, we can redeploy the datasource again using the Mbean.