Synchronize nodes with wsadmin
We can propagate node changes using scripting and the wsadmin tool.
There are two ways to complete this task...
- Use AdminControl.
- Use the node administration scripts in the AdminNodeManagement script library.
A node synchronization propagates configuration changes to the affected node or nodes. By default, this situation occurs periodically.
To propagate changes explicitly...
Jython...
### Set the variable for node synchronization. Sync1 = AdminControl.completeObjectName('type=NodeSync,node=myNodeName,*') ### Synchronize the node... AdminControl.invoke(Sync1, 'sync')Jacl...
### Set the variable for node synchronization. set Sync1 [$AdminControl completeObjectName type=NodeSync,node=myNodeName,*] ### Synchronize the node... $AdminControl invoke $Sync1 syncYou receive an output value of true, if the synchronization completes.
Results
When the synchronization is complete, the files that are created in the config directory for the dmgr now exist on the mynode node in the following directory:
c:/WebSphere/AppServer/config
Related tasks
Use the AdminConfig object for scripted administration
Manage nodes
Related
Node administration scripts
Commands for the AdminConfig object