Example: Disabling application loading in deployed targets using wsadmin
The following example uses the AdminConfig object to disable application loading in deployed targets:
- Obtain the deployment object for the application and assign it to the deployments variable, for example:
set deployments [$AdminConfig getid /Deployment:myApp/]Example output:myApp(cells/mycell/applications/myApp.ear/deployments/myApp:deployment.xml#Deployment_1)- Obtain the target mappings in the application and assign them to the targetMappings variable, for example:
set deploymentObject [$AdminConfig showAttribute $deployments deployedObject] set targetMappings [lindex [$AdminConfig showAttribute $deploymentObject targetMappings] 0]Example output:(cells/mycell/applications/ivtApp.ear/deployments/ivtApp:deployment.xml#DeploymentTargetMapping_1)- Disable the loading of the application on each deployed target, for example:
foreach tm $targetMappings { $AdminConfig modify $tm {{enable false}} } }- Save the changes with the following command:
$AdminConfig save