Not the "instant" it shuts down.
On Apache, in your workers.properties, for each node add the following:
Also make sure you have a status worker.
To quiesce a server (i.e. no new sessions go to it, but requests for sessions already pinned to the node still go to it) set disabled=true and save the file. Within 60 seconds Apache will pick up the change.
To stop sending requests to a server, set stopped=true and save the file.
There is work underway on a new mod_cluster that will provide a more robust feature set.
I'd thought the AS shutdown hook was supposed to stop the Tomcat connector before removing the webapps, which would remove the 404 issue. Apparently not. :(
Thank you for your response. It got me thinking, so I did a little digging. I found fail_on_status worker directive for the status worker. It should allow me to trap the 404 and 500 errors as failures, and automatically switch to another node. I'll report back results.
Can you post the solution you found for this problem? I am also facing same problem but could not reach to any conclusion.
It will be great if you provide the solution.
I am sorry, but we were not able to overcome this. So as not to waste a lot of time on it (time = money), we decided to just kill the JBoss process as opposed to allowing a graceful shutdown. This had the desired effect. There is, of course, some risk in this approach, but we deemed it justified. Normally, people should not be on the system during a scheduled outage anyway.