[英]Redeploy a web application using Wlst without starting it
I'm using Wlst with a Python script to redeploy web applications. 我使用带有Python脚本的Wlst重新部署Web应用程序。 However, if the web application is not active, I don't want it to be started.
但是,如果Web应用程序未处于活动状态,则我不希望其启动。
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. 理想情况下,我希望能够在不启用Web应用程序的情况下进行重新部署,因此不必停止它。
If this is still relevant, you may want to check out the -distributeApplication
command. 如果仍然有意义,则可能需要签出
-distributeApplication
命令。 For reference, see here: http://docs.oracle.com/cd/E13222_01/wls/docs92/config_scripting/reference.html#wp1260412 有关参考,请参见此处: http : //docs.oracle.com/cd/E13222_01/wls/docs92/config_scripting/reference.html#wp1260412
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.