I have the same problem, please if anyone found a solution, share it...
You can put your database outside jboss auto-deploy path, write simple application which will monitor database availability and deploy / undeploy your application as necessairy. Monitoring application can be e.g. simple servlet and delploy/undeploy your app using JBoss Deployer MBean operations.
Maybe there is a better solution which I am not aware off. But I am sure this one would work.
Thank you for your suggestion. Probably your workaround should work. But I was wondering if there is a configurable parameter that would tell the deployer not to give up right away and continue to ping the database until it becomes available.
I found that the connection pool configuration in WebLogic has an attribute 'Connection Creation Retry Frequency'. If it is greater than 0 and if the database is unavailable when the connection pool is created, WebLogic will attempt to create connections in the pool again after the number of seconds you specify, and will continue to attempt to create the connections until it succeeds.
This sounds exactly what I am looking for. I wonder if a similar feature is available in JBoss?