When a service depends on a resource that can not be discovered at when the service is coming up, the service should log a warning, sleep for a bit and try again, indefinetly, until the missing resource is found.
For example, all gateways depend on a listerner, if the gateway comes up before that listener the current implementation pretty much dies. We should simply put the gateway in a holding pattern.
Similarly, if during execution the JMS provider (ftp server, or any other dependency) goes off line, we should not die, but simply log, sleep and retry.
A nice to have would be that after an n number of retries we send a notification to a place where JBossON can pick it up and notify someone of a problem,
This behavior should be easy to implement, and should take care of the current race condition we experience.