The hot deployment must undeploy the application because of it's dependencies.
You can not stop XY-ds.xml before the application which depend on is undeployed.
If a deployment should be undeployed, redeploy is just a undeploy-deploy, ALL dependencies are stopped before and restarted afterwards.
Thanks Wolf for the reply.
Your comments make sense in terms of changing the ds.xml files. But I wonder how JBoss decides to do a undeploy/deploy process? I assume does it have a list of files and if any of those files are changed, then it will do a hot deployment? I am trying to find out that list of files which JBoss uses to decide on undeploy/deploy process.
With AS4 there was a configuration file where the suffixes are specified.
In AS5 I remember only the path definition and the exclusion list with regexpr here: conf/bootstrap/profile.xml
Also here are some other configuration for deployers
Thank you so much and it helps.