Are you sure that's what is happening? Because from what i remember, in JBoss-4.2.x there should not be this deployment ordering issue. Can you please post the console logs including the exception stacktrace? And also the piece of code which tries to access this datasource?
Importantly where (which exact folder) have you placed the war file for deployment? I hope you have placed it in "deploy" and not in deploy/jboss-web.deployer
While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.
I do not have complete access to the box since I am only a developer and have to rely on Unix administrators. The issue looks like a shutdown error during a restart not a start up error. It happened during what I thought was a start up after a configuration change so I thought it was a start up error.
The console has the following entries:
08:11:01,949 INFO [Server] Runtime shutdown hook called, forceHalt: true
08:11:01,949 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
08:11:01,950 INFO [TomcatDeployer] undeploy, ctxPath=/servlets, warUrl=.../tmp/deploy/tmp35064servlets-exp.war/
08:11:02,387 INFO [Server] Shutting down the server, blockingShutdown: false
08:11:02,388 INFO [Server] Server exit(0) called
Here is the application log. Note the times. The application is getting errors at 08:11:02,067 which is after the shutdown of the application, 08:11:01,950, but before the shut down of the server, 08:11:02,387.
08:11:02,067 [JDBCConnectionFactory.getContext 408] INFO - database=WOL
08:11:02,068 [JDBCConnectionFactory.logError 314] ERROR - WOL: javax.naming.NameNotFoundException: WOLPool not bound
The JDBCConnectionFactory.getContext is used for all database connections and uses a Context without properties.
We use the RMI port to send a shutdown.
shutdown.sh --shutdown --user=xxxxxxxx --password=xxxxxxxx --server=jnp://localhost:1099/
We have had problems with that. Sometimes it throws an error and some times it hangs and needs to be killed so we added a kill to the process. I do not know the source of the -15 signal but did not come up with that myself.
kill -15 `cat $JBOSS_HOME/bin/jboss.pid`