简体   繁体   中英

Redeploy a web application using Wlst without starting it

I'm using Wlst with a Python script to redeploy web applications. However, if the web application is not active, I don't want it to be started.

At the moment, I have to check the application state before redeployment and then stop it immediately after a redeploy. My current approach looks something like:

cd("domainRuntime:/AppRuntimeStateRuntime/AppRuntimeStateRuntime")
appState = cmo.getIntendedState("mywebapp")
deploy("mywebapp", "/tmp/mywebapp", upload = "true", retireGracefully = "true")

if appState != "STATE_ACTIVE" :
    print "stopping web application because of initial state: " + webappState
    stopApplication(appName = "mywebapp", retireGracefully = "false")
#end if

Ideally I'd like to be able to redeploy without the web application ever becoming active, so I don't have to stop it.

If this is still relevant, you may want to check out the -distributeApplication command. For reference, see here: http://docs.oracle.com/cd/E13222_01/wls/docs92/config_scripting/reference.html#wp1260412

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM