Disable application loading in deployed targets using wsadmin
Using Jacl
### Obtain the deployment object for the application and assign to xdeployments set xdeployments [$AdminConfig getid /Deployment:appname/] ### Obtain the target mappings in the application and assign to targetMappings set deploymentObject [$AdminConfig showAttribute $xdeployments deployedObject] set targetMappings [lindex [$AdminConfig showAttribute $deploymentObject targetMappings] 0] ### Disable the loading of the application on each deployed target... foreach tm $targetMappings { $AdminConfig modify $tm {{enable false}} } $AdminConfig save
Using Jython
### Obtain the deployment object for the application and assign to xdeployments xdeployments = AdminConfig.getid("/Deployment:appname/") ### Obtain the target mappings in the application and assign to targetMappings deploymentObject = AdminConfig.showAttribute(xdeployments, 'deployedObject') targetMappings = AdminConfig.showAttribute(deploymentObject, 'targetMappings') targetMappings = targetMappings[1:len(targetMappings)-1].split(" ") print targetMappings ### Disable the loading of the application on each deployed target... for targetMapping in targetMappings... AdminConfig.modify(targetMapping, [["enable", "false"]]) AdminConfig.save()