Understanding Domain Configuration

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Domain Configuration Files

The following sections describe the files that WebLogic Server uses to persist the configuration of a domain:

 


Overview of Domain Configuration Files

Each domain describes its configuration in an XML document that is located in the domain’s configuration directory. At runtime, each WebLogic Server instance in a given domain creates an in-memory representation of the configuration described in this document.

The central configuration file for a domain is DOMAIN_NAME/config/config.xml. This file specifies the name of the domain and the configuration of each server instance, cluster, resource, and service in the domain. The file includes references to additional XML files that are stored in subdirectories of the DOMAIN_NAME/config directory. These included files are used to describe major subsystems of WebLogic Server.

As a performance optimization, WebLogic Server does not store most of its default values in the domain's configuration files. In some cases, this optimization prevents XML elements from being written to the configuration files. For example, if you never modify the default logging severity level for a domain while the domain is active, the config.xml file does not contain an XML element for the domain's logging configuration.

As an additional performance optimization, each Managed Server maintains a copy of the domain’s configuration files. This copy is read-only and can be updated only as part of a change management process (see Managing Configuration Changes).

Editing Configuration Documents

In most circumstances, you should not use a text editor or other non-BEA tools to modify a domain’s configuration document. Instead, use the Administration Console, WebLogic Scripting Tool (WLST), or one of the other tools described in Summary of System Administration Tools and APIs in Overview of WebLogic Server System Administration.

However, because the WebLogic Server configuration document is an XML file that conforms to a schema, it is possible to modify them using XSLT or an XML parser application such as Apache Xerces or JDOM. Be sure to test any scripts that you create thoroughly and always make a backup copy of each configuration file before you make any changes to it.

The schemas that define a domain’s configuration document are in the following locations:

For a reference guide to the configuration schemas, see:

WARNING: Do not edit configuration files for a domain that is currently running. Because WebLogic Server rewrites the files periodically, your changes will be lost. Depending on your platform, you also could cause WebLogic Server failures.

Security Credentials in Configuration Files

Security credentials for domain security and the embedded LDAP server are stored in the config.xml file in encrypted form. If you create your config.xml file with a text editor or other non-BEA tool, you need to locate these credentials, encrypt them, and copy the encrypted credential into your config.xml file.

For information about WebLogic Server’s encryption utility, see encrypt in the WebLogic Server Command Reference. Once you have encrypted the credentials, include the encrypted values in your config.xml file in elements as in Listing 3-1:

Listing 3-1 Configuring Encrypted Credentials
<security-configuration>
   <credential-encrypted>{3DES}encypted-value-here</credential-encrypted>
</security-configuration>
<embedded-ldap>
   <credential-encrypted>{3DES}encypted-value-here</credential-encrypted>
</embedded-ldap>

Configuration File Archiving

You can configure WebLogic Server to make backup copies of the configuration files. This facilitates recovery in cases where configuration changes need to be reversed or the unlikely case that configuration files become corrupted. When the Administration Server starts up, it saves a JAR file named config-booted.jar that contains the configuration files. When you make changes to the configuration files, the old files are saved in the configArchive directory under the domain directory, in a JAR file with a sequentially-numbered name like config-1.jar.

For information on archiving configuration files, see Archive Configuration Files in Administration Console Online Help. If you want to use WLST to configure WebLogic Server to make backup copies, set the ConfigBackupEnabled attribute in DomainMBean to true and the ArchiveConfigurationCount attribute to the number of configuration archive files that you want to retain.

 


Domain Directory Contents

By default, WebLogic Server creates domain directories under the BEA_HOME/user_projects/domains directory. This section describes the contents of the domain directory and its subfolders. In this section, domain-name, deployment-name, and server-name represent names that you define when you create a domain.

Individual applications in a domain might create additional files and directories in the domain directory.

If you have not yet created a domain, you can see an example of an existing domain directory by looking in WL_HOME/examples/domains/wl_server where WL_HOME is the directory in which you installed WebLogic Server.

domain-name

The name of this directory is the name of the domain.

autodeploy

This directory provides a quick way to deploy applications in a development server. When the WebLogic Server instance is running in development mode, it automatically deploys any applications or modules that you place in this directory.

The files you place in this directory can be Java EE applications, such as:

bin

This directory contains scripts that are used in the process of starting and stopping the Administration Server and the Managed Servers in the domain. These scripts are generally provided as .sh files for UNIX and .cmd files for Windows. The bin directory can optionally contain other scripts of domain-wide interest, such as scripts to start and stop database management systems, full-text search engine processes, etc. For more information, see Managing Server Startup and Shutdown.

config

This directory contains the current configuration and deployment state of the domain. The central domain configuration file, config.xml, resides in this directory.

config/configCache

Contains data that is used to optimize performance when validating changes in the domain’s configuration documents. This data is internal to WebLogic Server and does not need to be backed up.

config/diagnostics

This directory contains system modules for instrumentation in the WebLogic Diagnostic Framework. For more information, see Configuring and Using the WebLogic Diagnostic Framework.

config/jdbc

This directory contains system modules for JDBC: global JDBC modules that can be configured directly from JMX (as opposed to JSR-88). For more information, see Database Connectivity (JDBC).

config/jms

This directory contains system modules for JMS: global JMS modules that can be configured directly from JMX (as opposed to JSR-88). For more information, see Messaging (JMS).

config/lib

This directory is not used in the current release of WebLogic Server.

config/nodemanager

This directory holds configuration information for connection to the Node Manager. For more information, see Using Node Manager to Control Servers in Managing Server Startup and Shutdown.

config/security

This directory contains system modules for the security framework. It contains one security provider configuration extension for each kind of security provider in the domain’s current realm. For more information, see Understanding WebLogic Security.

config/startup

This directory contains system modules that contain startup plans. Startup plans are used to generate shell scripts that can be used as part of server startup.

configArchive

This directory contains a set of JAR files that save the domain’s configuration state. Just before pending changes to the configuration are activated, the domain’s existing configuration state, consisting of the config.xml file and the other related configuration files, is saved in a versioned JAR file with a name like config.jar#1, config.jar#2, etc.

The maximum number of versioned JAR files to be kept is specified by the archiveConfigurationCount attribute of DomainMBean. Once this maximum number is reached, the oldest conversion archive is deleted before a new one is created.

console-ext

This directory contains extensions to the Administration Console, which enable you to add content to the WebLogic Server Administration Console, replace content, and change the logos, styles and colors without modifying the files that are installed with WebLogic Server. For example, you can add content that provides custom monitoring and management facilities for your applications. See Extending the Administration Console.

init-info

This directory contains files used for WebLogic domain provisioning. You should not modify any files in this directory.

lib

Any JAR files you put in this directory are added to the system classpath of each server instance in the domain when the server’s Java virtual machine starts.

pending

This directory contains domain configuration files representing configuration changes that have been requested, but not yet activated. Once the configuration changes have been activated, the configuration files are deleted from this directory. For more information, see Managing Configuration Changes.

security

This directory holds those security-related files that are the same for every WebLogic Server instance in the domain:

This directory also holds security-related files that are only needed by the domain’s Administration Server:

For more information, see Understanding WebLogic Security.

servers

This directory contains one subdirectory for each WebLogic Server instance in the domain. The subdirectories contain data that is specific to each server instance.

servers/server-name

This directory is the server directory for the WebLogic Server instance with the same name as the directory.

servers/server-name/bin

This directory holds executable or shell files that can be or must be different for each server. The server environment script (setServerEnv.sh or setServerEnv.cmd) is an example of a file that resides here because it can differ from one WebLogic Server instance to the next, for example, depending on whether the server instance has its own startup plan.

servers/server-name/cache

This directory holds directories and files that contain cached data. By “cached” here we mean that the data is a copy, possibly in a processed form (compiled, translated, or reformatted), of other data.

servers/server-name/cache/EJBCompilerCache

This directory is a cache for compiled EJBs.

servers/server-name/data

This directory holds files that maintain persistent per-server state used to run the WebLogic Server instance, other than security state, as opposed to temporary, cached or historical information. Files in this directory are important data that must be retained as the WebLogic Server instance is brought up, is brought down, crashes, restarts, or is upgraded to a new version.

servers/server-name/data/ldap

This directory holds the embedded LDAP database. The runtime security state for the WebLogic Server instance is persisted in this directory.

servers/server-name/data/store

This directory holds WebLogic persistent stores. For each persistent store, there is a subdirectory that holds the files that represent the persistent store. The name of the subdirectory is the name of the persistent store. By convention there is one store named default.

servers/server-name/logs

This directory holds logs and diagnostic information. This information is historical in nature. It is not crucial to the operation of the server, and can be deleted (while the WebLogic Server instance is down, at least) without affecting proper operation. However, the information can be quite useful for debugging or auditing purposes and should not be deleted without good reason.

servers/server-name/logs/diagnostic_images

This directory holds information created by the Server Image Capture component of the WebLogic Diagnostic Framework. For more information, see Configuring and Using the WebLogic Diagnostic Framework.

servers/server-name/logs/jmsServers

This directory contains one subdirectory for each JMS server in the WebLogic Server instance. Each such subdirectory contains the logs for that JMS server. The name of the subdirectory is the name of the JMS server.

servers/server-name/logs/connector

This directory is the default base directory for connector module (JCA ResourceAdapter) logs.

servers/server-name/security

This directory holds security-related files that can be or must be different for each WebLogic Server instance. The file boot.properties is an example of a file that resides here because it can differ from one server to the next. This directory also maintains files related to SSL keys.

servers/server-name/tmp

This directory holds temporary directories and files that are created while a server instance is running. For example, a JMS paging directory is automatically created here unless another location is specified. Files in this directory must be left alone while the server is running, but may be freely deleted when the server instance is shut down.

tmp

This directory stores temporary files used in the change management process. You should not modify any files in this directory.

user_staged_config

By default, configuration information is automatically copied from the Administration Server to each Managed Server. If instead you prefer to stage configuration changes manually, you can use this directory as an alternative to the config directory.

 


A Server’s Root Directory

All instances of WebLogic Server use a root directory to store their working copy of the domain’s configuration files, to store runtime data, and to provide the context for any relative pathnames in the server’s configuration. An Administration Server always uses the domain directory as its root directory. A Managed Server can use the domain directory but can also use any other directory that you define.

For example, if you start a Managed Server on a computer that does not share a file system with the computer that hosts the Administration Server, the Managed Server will create its own root directory. The server will copy data from the domain directory to this root directory and will write runtime data in this directory.

You can specify the path and name of the server root directory for each server instance. You can specify a common server root directory for multiple server instances hosted on a single computer or you can specify a different server root directory for each server. A domain may have one or more server root directories.

Specifying a Server Root Directory

You can specify the path for the server root directory by one of the following means:

If you do not use one of the above means to specify a server root directory, the path and name of the server root directory depend on whether a server instance is a Managed Server or the Administration Server and whether or not you use Node Manager to start the server instance. These variations are discussed in the next sections.

Server Root Directory for an Administration Server

An Administration Server uses its server root directory as a repository for the domain’s configuration data (such as config.xml) and security resources (such as the default, embedded LDAP server).

To determine the root directory for an Administration Server, WebLogic Server does the following:

If WebLogic Server cannot find a config.xml file, then it offers to create one. You can use this method to create a new domain. For more information, see Using the weblogic.Server Command Line to Create a Domain in the WebLogic Server Command Reference.

Server Root Directory for a Managed Server Started with Node Manager

If you use the Node Manager to start a Managed Server, the root directory is located on the computer that hosts the Node Manager process. To determine the location of the server’s root directory, WebLogic Server does the following:

The server root directory for a Managed Server started with Node Manager directory contains a subdirectory for each Managed Server instance. The name of the subdirectory is the name of the server as defined in the domain configuration.

Server Root Directory for a Managed Server Not Started with Node Manager

If you do not use the Node Manager to start a Managed Server (and therefore use the java weblogic.Server command or a script that calls that command), WebLogic Server does the following to determine the root directory:

To make it easier to maintain your domain configurations and applications across upgrades of WebLogic Server software, it is recommended that the server root directory not be the same as the installation directory for the WebLogic Server software.


  Back to Top       Previous  Next