2017-10-19 122 views
0

我已經部署在WebLogic 2個應用程序的問題:將weblogic重定位應用

app1: target1, target2 
app2: target3 

而且分配TARGET2到APP2我執行下一次WLST命令:

connect('user', 'password', 't3://admin-address:admin-port') 
undeploy("app1", targets="target2") 
disconnect() 
readDomain('domain-dir') 
assign("AppDeployment","app2","Target","target2") 
updateDomain() 
closedomain() 

有沒有錯誤,但只從target2取消部署app1的作品。有人可以幫忙嗎?

回答

0

最終溶液是:

connect('user', 'password', 't3://<admin_server>:<admin_port>') 

# remove target from the first application 
edit() 
startEdit() 
cd('/AppDeployments/app1') 
set('Targets',jarray.array([ObjectName('com.bea:Name=target1,Type=Server')], ObjectName)) 
activate() 
exit() 

# add target to the second application 
edit() 
startEdit() 
cd('/AppDeployments/app2') 
set('Targets',jarray.array([ObjectName('com.bea:Name=target2,Type=Server'), ObjectName('com.bea:Name=target3,Type=Server')], ObjectName)) 
activate() 
exit()