![]() |
![]() |
e-docs > WebLogic Server > WebLogic Server Configuration Reference > Overview of config.xml |
WebLogic Server Configuration Reference
|
The following sections provide an overview of the WebLogic ServerTM configuration file (config.xml):
About WebLogic Server Management and the config.xml File
WebLogic Server management and configuration services are based on the JavaTM Management Extensions (JMX) API from Sun Microsystems. The config.xml file is a persistent store for the managed objects that WebLogic Server creates and modifies during its executing using the BEA implementation of the JMX API. The purpose of config.xml is to store changes to managed objects so that they are available when WebLogic Server is restarted.
You should normally use the Administration Console to configure WebLogic Server's manageable objects and services and allow WebLogic Server to maintain the config.xml file. Each time you use the Administration Console or other WebLogic Server utilities to modify the config.xml file, WebLogic Server archives the older version. You can configure the number of archived files WebLogic Server keeps. For more information, refer to "WebLogic Server Archives Previous Versions of config.xml" in Configuring and Managing WebLogic Server.
Although config.xml is a well-formed XML document that you can modify using a text editor, you should think of it as a database that you would only directly update under unusual circumstances.
The config.xml file is not a formal XML document with a document type definition (DTD) that can be used to validate its contents. It is truly a repository, where each XML element contains data saved at the request of an in-memory instance of a management object in WebLogic Server. However, the objects that store their data in config.xml are defined within the WebLogic Server Management API and so it is possible to substantially document the contents of the config.xml file. In fact, the reference information in this document is extracted from Javadocs for the weblogic.management.configuration package which contains the WebLogic Server management MBeans. You can see a different view of the same information in the Javadocs and in the Administration Console online help system.
There are cases where config.xml can contain data that is not described in this document:
If you are using other BEA products with WebLogic Server or third-party applications, see the documentation accompanying the other product for additional information about config.xml elements and attributes.
There are a few instances where you might choose to edit the config.xml file directly instead of using the Administration Console. In these cases, your changes should be minimal and specific. You should not attempt to create a new WebLogic Server configuration by writing a new config.xml file from scratch.
Warning: You cannot edit config.xml while WebLogic Server is executing, since WebLogic Server rewrites the file periodically. Your changes will be lost and, depending on your platform, you could cause WebLogic Server failures.
In all cases, you should make a backup copy of your config.xml file before you make any changes to it.
Here are some situations where it is appropriate to edit config.xml:
Since config.xml is a well-formed XML file, it is possible to script certain repetitive changes to config.xml using an XML parser application such as Apache Xerces, or JDOM. Be sure to test any scripts you create thoroughly and always make a backup copy of config.xml before you make any changes to it.
Contents of the config.xml File
The config.xml file consists of a series of XML elements. The Domain element is the top-level element, and all elements in the Domain are children of the Domain element. The Domain element includes child elements, such as the Server, Cluster, and Application elements. These child elements may have children themselves.
For example, the Server element includes the child elements WebServer, SSL and Log. The Application element includes the child elements EJBComponent and WebAppComponent.
Each element has one or more configurable attributes. An attribute has a corresponding attribute in the configuration API. For example, the Server element has a ListenPort attribute, and likewise, the weblogic.management.configuration.ServerMBean class has a ListenPort attribute. Configurable attributes are readable and writable, that is, ServerMBean has getListenPort() and setListenPort() methods.
When an attribute references another element in config.xml (such as the SSL attribute of Server), the attribute's value is the value of the referenced element's Name attribute. (All config.xml elements have a Name attribute.) If an attribute references a set or list of other elements, the value of the attribute is a comma-separated list of the referenced elements' names.
All attribute values must be quoted. Boolean attributes are either "true" or "false". Attributes with numeric values are written as quoted strings of digits and symbols that can parsed into the specified destination data type. For example, integer values must not contain commas or decimal points, but may have a leading minus sign if the attribute allows a negative value.
BEA recommends that you use the Administration Console to modify or monitor a domain configuration. You can also modify the config.xml file in the following ways:
The BEA XML Editor is a simple, user-friendly tool for creating and editing XML files. The BEA XML Editor can validate XML documents against a DTD or XML Schema. There is no DTD or XML Schema for config.xml, but using the XML editor can at least ensure that you create a well-formed XML document that WebLogic Server can parse. It cannot, however, verify that you spell element and attribute names correctly and enter valid values for attributes.
See the BEA XML Editor on the BEA dev2dev Online.
Rules for Editing the config.xml File
Consider the following issues before you edit the configuration file manually.
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |