If you are using deployment scanner based deployment then you can try using the deployment marker file ".skipdeploy", The ".skipdeploy" marker file disables auto-deploy of an application while present. Useful as a method of temporarily blocking the auto-deployment of exploded content, preventing the risk of incomplete content edits pushing live. Can be used with zipped content, although the scanner detects in-progress changes to zipped content and waits until completion.
At later point of time if you would like to deploy those application then juse rename the ".skipdeploy" files to ".dodeploy" file.
Thanks, but we are using the JBoss 6.2 EAP CLI for deploying wars.
We deploy using "deploy <war file> --disabled" to deploy which requires that the war file is not already deployed. As the --force option does not work together with --disabled.
To enable the war we use "deploy --name=<war file>" which enables the war.
To be able to disable the component again we have to first undeploy the war and redeploy it again with the --disabled option.
This takes time and I wonder if there is a faster way of doing this using the CLI.
Unfortunately via CLI i do not see any other better option to achieve your goal. Following is the best way to enable and to deploy an application in disabled mode.
Deploy in Disabled mode
deploy /PATH/TO/TestWebApp.war --disabled
Enable/Start an application which is already deployed (and is in STOPPED state)
The time taken by the application components to start should be almost same as when you try to deploy an application normally. This is because when you deploy an application in "disabled" mode that time only the content of the application is uploaded in the JBoss content repository, But the application is not actually started. The application startup time should be same.
Total Deploy Time = (time taken to upload the content in the repository) + (Time taken by the components/services of the application to be started)
If it is taking abnormally longer time to start the application then it should be investigated by looking at couple of thread dumps.