Before you begin
For this task, the wsadmin scripting client must be connected to the deployment manager server.Why and when to perform this task
You can use the wsadmin AdminConfig and AdminApp objects to make changes to the WebSphere Application Server configuration. The purpose of this article is to illustrate the relationship between the commands used to change the configuration and the files used to hold configuration data. This discussion assumes that you have a network deployment installation, but the concepts are very similar for a WebSphere Application Server installation.Steps for this task
Using Jacl:
set n1 [$AdminConfig getid /Node:mynode/]where:
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 representing the WebSphere Application Server configuration |
getid | is an AdminConfig command |
Node | is the object type |
mynode | is the name of the object that will be modified |
Using Jacl:
set serv1 [$AdminConfig create Server $n1 {{name myserv}}]where:
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 representing the WebSphere Application Server configuration |
create | is an AdminConfig command |
Server | is an AdminConfig object |
n1 | evaluates to the ID of host node specified in step number 2 |
name | is an attribute |
myserv | is the value of the name attribute |
Using Jacl:
$AdminConfig modify $serv1 {{stateManagement {{initialState STOP}}}}where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminConfig | is an object representing the WebSphere Application Server configuration |
modify | is an AdminConfig command |
serv1 | evaluates to the ID of host node specified in step number 3 |
stateManagement | is an attribute |
initialState | is a nested attribute within the stateManagement attribute |
STOP | is the value of the initialState attribute |
Using Jacl:
$AdminConfig save
Note: This step only applies to network deployment installations.
A node synchronization is necessary in order to propagate configuration changes to the affected node or nodes. By default this occurs periodically, as long as the node can communicate with the deployment manager. It is possible to cause this to happen explicitly by performing the following:You can perform this action across the entire cell to every active node agent at the same time.
Using Jacl:
set Sync1 [$AdminControl completeObjectName type=NodeSync,node=myNodeName,*]
or
set dmgr [$AdminControl completeObjectName type=DeploymentManager*]
Example output:
WebSphere:platform=common,cell=myNetwork,version=5.0,name=node Sync,mbeanIdentifier=nodeSync,type=NodeSync,node=myBaseNode, process=nodeagent
or
WebSphere:platform=common,cell=myNetwork,version=5.0,name=DeploymentManager, mbeanIdentifier=DeploymentManager,type=DeploymentManager,node=myManagerNode, process=dmgrwhere:
set | is a Jacl command |
Sync1 | is a variable name |
$ | is a Jacl operator for substituting a variable name with its value |
AdminControl | is an object that enables the manipulation of MBeans running in a WebSphere server process |
completeObjectName | is an AdminControl command |
type=NodeSync,node=myNodeName | is a fragment of the object name whose complete name is returned by this command. It is used to find the matching object name which is, in this case, the SyncNode object for the node myNodeName, where myNodeName is the name of the node that you use to synchronize configuration changes. For example: type=Server, name=serv1. It can be any valid combination of domain and key properties. For example, type, name, cell, node, process, etc. |
type=DeploymentManager | is a fragment of the object name whose complete name is returned by this command. It is used to find the matching object name which is, in this case, the SyncNode object for the node myNodeName, where myNodeName is the name of the node that you use to synchronize configuration changes. For example: type=Server, name=serv1. It can be any valid combination of domain and key properties. For example, type, name, cell, node, process, etc. |
Note: This step only applies to network deployment installations.
Using Jacl:
$AdminControl invoke $Sync1 sync
or
$AdminControl invoke $dmgr syncActiveNodes
Example output:
trueYou will receive an output value of true if the synchronization completes.
or
{{node1 node2 node}}You will receive a list of nodes that are correctly synced.where:
$ | is a Jacl operator for substituting a variable name with its value |
AdminControl | is an object that enables the manipulation of MBeans running in a WebSphere server process |
invoke | is an AdminControl command |
Sync1 | evaluates to the ID of the server specified in step number 7 |
sync | is an attribute of modify objects |
dmgr | evaluates to the ID of the server specified in step number 7 |
syncActiveNodes | is an attribute of modify objects |