-
1. jboss enterprise application startup when DB is down
wdfink Mar 22, 2011 2:01 PM (in response to oourfali)1 of 1 people found this helpfulAFAIK the only way is (with hotdeploy) to touch the application, but I know that this is not a good idea because it is difficult to note whether the DB connections are up.
A flush of the ConnectionPool will not help (JB4.x) because the application is not deployed afterwards.
As this is a seldom problem we decide in this case to start the JBoss complete if the DB is up and running.
If the problem happen during the application is running it will recover the ConnectionPool automaticaly.
-
2. jboss enterprise application startup when DB is down
oourfali Mar 24, 2011 4:39 AM (in response to wdfink)Can't I add a dependency that if my data source is not reachable then my application won't try to start? And when the connection pool is up it will try to start?
-
3. jboss enterprise application startup when DB is down
wdfink Mar 24, 2011 6:35 AM (in response to oourfali)I've experimented a bit.
If the DB is not available the *-ds will not be deployed.
The EJB2 persistence jar depend on the DS and is also not deployed.
If the DB is available again --> NOTHING happen
If I touch the *-ds.xml afterwards, the DS and the EJB.jar is started.
I'm don't know whether there is an option to force that the DS check the DB-connection periodicaly
-
4. jboss enterprise application startup when DB is down
oourfali Mar 24, 2011 11:01 AM (in response to wdfink)I tried to "touch" the -ds file, but nothing happend.
The application is using JDBC to connect to the database, not through hibernate or something.
Is it supposed to work when using JDBC?
What needs to be configured in order for it to work?
-
5. jboss enterprise application startup when DB is down
wdfink Mar 24, 2011 2:02 PM (in response to oourfali)1 of 1 people found this helpfulDo you use plain JDBC with EJB or WEB application?
To restart the application the dependency must be set correct. In my case the dependency is set because the jar file with the EJB2-CMP beans contains a dependency entry within the deployment descriptor.
You must set such in your application, then the EAR/WAR will not deployed as long as the *-ds is not ready and in case of restart DS the application is also redeployed.
-
6. jboss enterprise application startup when DB is down
oourfali Mar 24, 2011 4:12 PM (in response to wdfink)I'm new in my company so still learning how everything works.
I'll check it out and see what's the right configuration.
thank you again for your help.