You can use the wsadmin AdminConfig and AdminApp objects to make changes to the application server configuration.
For this task, connect the wsadmin scripting client to the deployment manager server in a network deployment environment.
Using Jacl:
set n1 [$AdminConfig getid /Node:mynode/]
n1 = AdminConfig.getid('/Node:mynode/')
Element | Description |
---|---|
set | is a Jacl command |
n1 | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object that represents the WebSphere® Application Server configuration |
getid | is an AdminConfig command |
Node | is the object type |
mynode | is the name of the object to modify |
Using Jacl:
set serv1 [$AdminConfig create Server $n1 {{name myserv}}]
serv1 = AdminConfig.create('Server', n1, [['name', 'myserv']])
serv1 = AdminConfig.create('Server', n1, '[[name myserv]]')
Element | Description |
---|---|
set | is a Jacl command |
serv1 | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object that represents the WebSphere Application Server configuration |
create | is an AdminConfig command |
Server | is an AdminConfig object |
n1 | evaluates to the ID of the host node that is specified in step number 1 |
name | is an attribute |
myserv | is the value of the name attribute |
Using Jacl:
$AdminConfig modify $serv1 {{stateManagement {{initialState STOP}}}}
AdminConfig.modify(serv1, [['stateManagement', [['initialState', 'STOP']]]])
AdminConfig.modify(serv1, '[[stateManagement [[initialState STOP]]]]')
Element | Description |
---|---|
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object that represents the WebSphere Application Server configuration |
modify | is an AdminConfig command |
serv1 | evaluates to the ID of the host node that is specified in step number 2 |
stateManagement | is an attribute |
initialState | is a nested attribute within the stateManagement attribute |
STOP | is the value of the initialState attribute |
AdminConfig.save()
AdminNodeManagement.syncActiveNodes()
AdminNodeManagement.syncNode("myNode")