InfoCenter Home > 6.6.0.2.1.3: XMLConfig - Using the tool programmaticallyThe XMLConfig class is structured so that you can use it programmatically to retrieve information as Document or Element. The import/export facility can thus be included in a Java program, as well as being operated from a command line. Creating platform-neutral configurationsFor import and partial export operations, a variable substitution operation is performed on the input XML document, allowing you to create platform-neutral XML documents. The following variables are available:
Security XML configurationsIn Version 4.0, you can enter your own custom user registry entries (key/value pairs). All user-defined keys must be delimited with a special prefix, Custom_. When you use the product GUI to add custom entries, the product adds the prefix for you. However, if you want to configure custom entries programmatically, you must add the prefix yourself. The following example sets these properties: groupsFile = c:\temp\groups.props db_URL = jdbc:db2:customDB A complete stanza for security configuration follows. The markup that corresponds to the needed property settings is shown in bold. <security-config security-cache-timeout="150" security-enabled="true"> <app-security-defaults> <realm-name>Default</realm-name> <challenge-type ssl-enabled="false"> <basic-challenge/> </challenge-type> </app-security-defaults> <auth-mechanism> <ltpa-config> <ltpa-password>{xor}B7rj9Lrj77rj7Q==</ltpa-password> <ltpa-timeout>1200000</ltpa-timeout> <custom-ur-config> <user-id>bob</user-id> <password>{xor}PTA9bg==</password> <attribute name="Custom_groupsFile" value="c:/temp/groups.props"/> <attribute name="Custom_db_URL" value="jdbc:db2:customDB"/> </custom-ur-config> </ltpa-config> </auth-mechanism> </security-config> Javadoc for the toolIt is recommended that you refer to the Javadoc for the latest programmatic use of XMLConfig, and refer to the exported XML for the sample markup for repository objects. Javadoc for the com.ibm.websphere.xmlconfig class and all of the related object classes resides in the apidocs directory: installation_root\web\apidocs\package_and_class_name See the package summary file for a list of class names, such as ApplicationServerConfig. The Javadoc is labeled by the class name preceded by the package name, com.ibm.websphere. |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|