Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Set up intermediary services using scripting
Regenerate the node plug-in configuration using scripting
We can use scripting and wsadmin.sh to regenerate the node plug-in configuration. See the Start the wsadmin scripting client using wsadmin.sh article for more information.
Perform the following steps to regenerate the node plug-in configuration:
Procedure
- Identify the plug-in and assign it to the generator variable, for example:
### Jython
generator = AdminControl.completeObjectName('type=PluginCfgGenerator,*')### Jacl
set generator [$AdminControl completeObjectName type=PluginCfgGenerator,*]Additionally, you can specify the optional node parameter. In a WAS ND environment, specify the node name of the dmgr server.
- Regenerate the node plug-in for a given web server definition.
### Jython
AdminControl.invoke(generator, 'generate', " $PROFILE_ROOT/config mycell myWebServerNode myWebServerName true true")### Jacl
$AdminControl invoke $generator generate " $PROFILE_ROOT/config mycell myWebServerNode myWebServerName true true"
Example
The following application-centric examples use the generate, propagate, and propagateKeyring operations for a given web server definition:
### Jython
AdminControl.invoke(generator,'generate'," $PROFILE_ROOT/config 01Cell03 01Node03 webserver1 true") AdminControl.invoke(generator,'propagate'," $PROFILE_ROOT/config 01Cell03 01Node03 webserver1") AdminControl.invoke(generator,'propagateKeyring'," $PROFILE_ROOT/config 01Cell03 01Node03 webserver1"### Jacl
$AdminControl invoke $generator generate " $PROFILE_ROOT/config 01Cell03 01Node03 webserver1 true" $AdminControl invoke $generator propagate " $PROFILE_ROOT/config 01Cell03 01Node03 webserver1" $AdminControl invoke $generator propagateKeyring " $PROFILE_ROOT/config 01Cell03 01Node03 webserver1"The following information explains the possible parameters that the generate operation accepts:
public void generate(java.lang.String configuration_root, java.lang.String myCellName, java.lang.String myNodeName, java.lang.String myServerName, java.lang.Boolean propagate, java.lang.Boolean propagateKeyring)where:
configuration_root
is the root directory path for the configuration repository to be scanned.
myCellName
is the name of the cell in the configuration repository to restrict generation to.
myNodeName
is the name of the node in the configuration repository to restrict generation to.
myServerName
is the name of the server to restrict generation to.
propagate
is a boolean variable that specifies to propagate the configuration file.
propagateKeyring
is a boolean variable that specifies to propagate the keyring file. The following network-centric example uses the generate operation to generate the plug-in configuration file for the cell:
### Jython
AdminControl.invoke(generator,'generate'," $PROFILE_ROOT/config 01Cell03 null null plugin-cfg.xml")### Jacl
$AdminControl invoke $generator generate " $PROFILE_ROOT/config 01Cell03 null null plugin-cfg.xml"The following information explains the possible parameters that the generate operation accepts:
public void generate(java.lang.String WAS_HOME, java.lang.String configuration_root, java.lang.String myCellName, java.lang.String myNodeName, java.lang.String myServerName,java.lang.String myOutputFileName)where:
WAS_HOME
is the root directory for the application server to run the command against.
configuration_root
is the root directory path for the configuration repository to be scanned.
myCellName
is the name of the cell in the configuration repository to restrict generation to.
myNodeName
is the name of the node in the configuration repository to restrict generation to.
myServerName
is the name of the server to restrict generation to.
myOutputFileName
is the path and filename of the generated plug-in configuration file.
Use the wsadmin scripting AdminControl object for scripted administration
Commands for the AdminControl object using wsadmin.sh