Use the redeploy subcommand in remote mode to overwrite a previously–deployed application or module. You can also accomplish this task by using the --force option of the deploy subcommand. Whenever a redeployment is done, the sessions in transit at that time become invalid unless you use the keepSessions=true property of the redeploy subcommand.
You must remove a preconfigured resource before it can be updated.
Ensure that the server is running.
Remote commands require a running server.
Redeploy an application or module by using the redeploy(1) subcommand or the deploy(1) subcommand with the --force option.
Information about the options and properties of these commands is included in these help page.
This example redeploys the hello web application. In a production environment, you usually want to retain sessions. If you use the keepSessions property, active sessions of the application are retained and restored when redeployment is complete.
asadmin> redeploy --name hello --properties keepSessions=true hello.war Application deployed successfully with name hello. Command redeploy executed successfully. |
Keep Sessions is a checkbox option when you redeploy using the Administration Console. For instructions, see the Administration Console online help.
This example redeploys the hello web application, which was originally deployed from the hellodir directory. The path is retrieved from the domain.xml file.
asadmin>redeploy --name hellodir Application deployed successfully with name hellodir. Command redeploy executed successfully. |
The --force option is set to false by default. This example redeploys newApp.ear even if has been deployed or already exists.
asadmin> deploy --force=true newApp.ear Application deployed successfully with name newApp. Command deploy executed successfully. |
You can also view the full syntax and options of the subcommand by typing asadmin help redeploy at the command line.