JBoss 5.1 Disable/Enable Hot Deploy(HDScanner)

Disable Hot Deploy on JBoss 5.1 is easy, just file jbossAs/server/server-profile/deploy/hdscanner-jboss-beans.xml  remove or move to another folder.

 

Hot Deploy is disabled, you can deploy/redeploy/undeploy aplications via twiddle.sh,for example:

 

deploy:
./jbossAs/bin/twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" deploy "file:/hileWhichYouWantDeploy"

 

redeploy:
./jbossAs/bin/twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" redeploy "file:/hileWhichYouWantReDeploy"

 

undeploy:
./jbossAs/bin/twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" undeploy "file:/hileWhichYouWantUnDeploy"

 

To re-enable the Hot Deploy, just copy file hdscanner-jboss-beans.xml to folder jbossAs/server/server-profile/deploy/ and execute

 

./twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" deploy "file:/home/jbossAs5/server/server-profile/deploy/hdscanner-jboss-beans.xml"