InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.0: About user assistance >
6.6.0.2: Command line administration >
6.6.0.2.1: XMLConfig command line interface for XML configuration >
6.6.0.2.1.1: XMLConfig - Command syntax

6.6.0.2.1.1: XMLConfig - Command syntax

This section describes the command line syntax for the XMLConfig tool.

Because setting the class path appropriately is vital to the tool's success, the product contains an XMLConfig.bat (Windows NT) or XMLConfig.sh (*IX) file for starting the tool. The file is located in the bin directory of the product installation root, uses the com.ibm.websphere.xmlconfig.XMLConfig class, and has the following command-line syntax:

{ ( -import xml_data_file ) ||
[ ( -export xml_output_file [-partial xml_data_file] )
-adminNodeName primary_node_name
[-nameServiceHost host_name [ -nameServicePort port_number ]]
[-traceString trace_spec [-traceFile file_name]]
[-generatePluginCfg true | false]
[-substitute "key1=value1[;key2=value2;[...]]"]
}

Supported arguments include:

-adminNodeName
Required argument that specifies the node containing the administrative server to which you are connecting. The value of this argument must match the node name given in the topology tree on the Topology tab of the WebSphere Administrative Console.
-import || -export || -export -partial
Required argument that specifies the operation to perform: an import or export. Unless you also specify the parameter -partial, the export is treated as a full export.
-nameServiceHost, -nameServicePort
Optional arguments that specify the host name of the machine that contains the naming service, and the port through which to communicate with the naming service. The default value of -nameServicePort is 900.
-traceString
Optional argument that specifies the internal code to trace. For more information, see the traceString section of the trace help.
-generatePluginCfg
Generate the plug-in configuration if necessary.
-substitute
Optional argument that specifies the variables to be substituted (for example, -substitute "NODE_NAME=admin_node;APP_SERVER=default_server").

In the input XML file, each key should appear as $key$ for substitution. This argument substitutes any occurrence of $NODE_NAME$ with admin_node and $APP_SERVER$ with default_server in the input XML file.

If the substitution string contains semicolons, use $semiColon$ to separate it from the ";" delimiter. On UNIX platforms, be sure to add an escape character to each dollar sign ($) within the substitution string (for example, \$semiColon\$).

-runatserver
Optional argument that imports files from machine A to machine B with XMLConfig. This option is performed through a session bean.

The use of the -runatserver option is not required, in which case the XMLConfig.sh file and the programs it invokes behaves as they did before the new option is applied. If -runatserver is specified as a command line option, the XMLConfig file streams the XML data file to a session bean, which runs the XML file using methods in the XMLConfig file to do the import at the server. The XMLConfig file is used on both the administrative client and the administrative server sides in this scenario. The session bean is configured with TX_BEAN_MANAGED which forces the entire XML file import to be done with one transaction.

You can issue the following command to apply the -runatserver option in XMLConfig (WebSphere Application Server Advanced Edition):

[-runatserver {yes|no}[-timeout <# seconds>] [-retry ]] , in which: 

  • -runatserver is only valid when -import is also specified as a command line argument.
  • -timeout is only valid when -runatserver is specified. If -timeout is specified, it must be followed by an integer specifying the maximum number of seconds allowed for this operation. If the operation is not completed within that time period, a rollback is attempted.
  • -retry is only valid when -runatserver is specified. If -retry is specified, it must be followed by an integer specifying the maximum number of times to retry this operation before returning fails.
  • -retry and -timeout are independent of each other. If they are omitted, a default value is used.

The following examples demonstrate correct syntax. Node1 is the name by which the node that contains the administrative server is administered.

Import operation:
XMLConfig -adminNodeName Node1 -import import.xml
Full export operation:
XMLConfig -adminNodeName Node1 -export export.xml
Partial export operation:
XMLConfig -adminNodeName Node1 -export export.xml -partial imput.xml
Go to previous article: XMLConfig command line interface for XML configuration Go to next article: XMLConfig - Example of a full export

 

 
Go to previous article: XMLConfig command line interface for XML configuration Go to next article: XMLConfig - Example of a full export