Skip navigation.

Configuring and Managing WebLogic Server

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

Overview of WebLogic Server Domains

The following sections describe WebLogic Server domains:


What Is a Domain?

A domain is the basic administration unit for WebLogic Server instances. A domain consists of one or more WebLogic Server instances (and their associated resources) that you manage with a single Administration Server. You can define multiple domains based on different system administrators' responsibilities, application boundaries, or geographical locations of servers. Conversely, you can use a single domain to centralize all WebLogic Server administration activities.

Each domain's configuration is stored in a separate configuration file called config.xml, which is stored on the Administration Server along with other files such as logs and security files. When you use the Administration Server to perform a configuration task, the changes you make apply only to the domain managed by that Administration Server. To manage another domain, use the Administration Server for that domain. For this reason, the servers instances, applications, and resources in one domain should be treated as being independent of servers, applications, and resources in a different domain.You cannot perform configuration or deployment tasks in multiple domains at the same time.

For more information, see

Contents of a Domain

A domain can include multiple WebLogic Server clusters and non-clustered WebLogic Server instances. A minimal domain can contain only one WebLogic Server instance, which functions both as an Administration Server, and as a Managed server—such a domain can be useful while developing applications, but is not recommended for use in a production environment. Although the scope and purpose of a domain can vary significantly, most WebLogic Server domains contain the components described in this section.

Figure 2-1 shows a production environment that contains an Administration Server, three standalone Managed Servers, and a cluster of three Managed Servers.

Figure 2-1 WebLogic Server Domain

WebLogic Server Domain


Production and Development Modes

You can configure servers in your domain to start in one of two modes, development or production. You use development mode while you are developing your applications. Development mode uses a relaxed security configuration and enables you to auto-deploy applications. You use production mode when your application is running in its final form. A production domain uses full security and may use clusters or other advanced features. For more information on the differences between development mode and production mode, refer to "Differences Between Configuration Startup Modes."

The runtime mode is a domain-wide setting. As each Managed Server starts, it refers to the mode of the Administration Server to determine its runtime mode. By default, all servers run in development mode. If you configure the domain to run in production mode, the Administration Server saves this setting to the domain's config.xml file.

BEA recommends that you set the mode when you first create a domain. For information on creating a domain that runs in production mode, see Example: Creating a Domain with Administration Server and Clustered Managed Servers.

It is possible, but not recommended, to change the mode of an existing domain. See Changing the Runtime Mode in Administration Console Online Help.


Creating a New Domain

This section discusses several ways to create a new domain. For information about restrictions for creating and using domains, see Domain Restrictions.

Server Name Considerations

Each server instance in your WebLogic environment must have a unique name, regardless of the domain or cluster in which it resides, or whether it is an Administration Server or a Managed Server. Within a domain, each server, machine, cluster, virtual host, and any other resource type must be named uniquely and must not use the same name as the domain.

For WebLogic JMS, this strict unique naming rule also applies to JMS resources, such as JMS servers and stores in multi-domain environments when using the WebLogic Messaging Bridge or the Foreign JMS Server feature for intra-domain operability. For additional naming requirements, see "JMS Resource Naming Rules for Domain Interoperability" in the Administration Console Online Help.

JTA transactions are also subject to strict unique naming rules for inter-domain transactions. For more information see "Configuring Domains for Inter-Domain Transactions" in the Administration Console Online Help.

Creating a Domain Using the Configuration Wizard

The Configuration Wizard is the easiest and recommended way to create a new WebLogic Server domain. The configuration Wizard interactively queries you about the type of domain you want to create and creates the config.xml file, start scripts, and other files used in a domain. Using the Configuration Wizard you can:

For more information, see :

Creating a Domain Using the weblogic.Server Command

If you start a WebLogic Server instance from a directory that does not contain a config.xml file, the server automatically creates a default configuration, including start scripts and the config.xml file, in the directory from which you start the server instance. You can then modify the domain configuration using the Administration Console or other system administration tools.

To create a domain using the weblogic.Server command:

  1. Open a command shell.
  2. Set the CLASSPATH to include the WebLogic Server classes. The easiest way to set your CLASSPATH is to run the setWLSEnv.cmd (Windows) or the (UNIX) script. The script is located in the WebLogic Server installation at:
  3. BEA_Home/weblogic81/server/bin

  4. Run the following command:
  5. java weblogic.Server

    When you are prompted for a username and password, enter any values you choose. You will be prompted with:

    Would you like the server to create a default configuration and boot? (y/n)

    Note: If you want to specify a name for your domain add the -Dweblogic.Domain option to the start command. For example, the command

    java -Dweblogic.Domain=Chicago weblogic.Server

    creates a domain called "Chicago".

  6. Answer Y. You will be asked to confirm the password.
  7. Enter the same password you entered in step 3. The server starts and creates a default config.xml file in the directory from which you ran the java weblogic.Server command.

The server creates a Boot Identity file (called that contains the username and password you entered in step 3. When this file is present in the domain's root directory, the server does not prompt for a username and password during startup.

Creating a Domain Using Ant Tasks

You can create a new domain configuration using Ant scripts by running the wlserver and wlconfig Ant tasks. For more information, see Using Ant Tasks to Configure a WebLogic Server Domain in the WebLogic Server Command Reference.


Administration Server

Each WebLogic Server domain must have one server instance that acts as the Administration Server. You use the Administration Server—programmatically, via the Administration Console, or using the command line—to configure all other server instances and resources in the domain.

Role of the Administration Server

Before you start the Managed Servers in a domain, start the Administration Server. When you start a standalone or clustered Managed Server, it contacts the Administration Server for its configuration information. In this way, the Administration Server operates as the central control entity for the configuration of the entire domain.

You can invoke the services of the Administration Server in the following ways:

Whichever method is used, the Administration Server for a domain must be running to modify the domain configuration.

When the Administration Server starts, it loads the config.xml for the domain. It looks for config.xml in the current directory. When you create a new domain using the Configuration Wizard, you can specify the domain location, or by default the domain is placed at:


where mydomain is a domain-specific directory, with the same name as the domain.

Each time the Administration Server starts successfully, and each time you modify the configuration, a backup configuration file is created. You can configure the number of backup copies of config.xml retained by the Administration Server. For more information, see Backing up config.xml.

What Happens If the Administration Server Fails?

The failure of an Administration Server for a domain does not affect the operation of Managed Servers in the domain. If an Administration Server for a domain becomes unavailable while the server instances it manages—clustered or otherwise—are up and running, those Managed Servers continue to run. If the domain contains clustered server instances, the load balancing and failover capabilities supported by the domain configuration remain available, even if the Administration Server fails.

If an Administration Server fails because of a hardware or software failure on its host machine, other server instances on the same machine may be similarly affected. However, the failure of an Administration Server itself does not interrupt the operation of Managed Servers in the domain.

For more information, see Recovering Failed Servers.


Managed Servers and Clustered Managed Servers

In a domain, server instances other than the Administration Server are referred to as Managed Servers. Managed Servers host the components and associated resources that constitute your applications—for example, JSPs and EJBs. When a Managed Server starts up, it connects to the domain's Administration Server to obtain configuration and deployment settings.

Note: Managed Servers in a domain can start up independently of the Administration Server if the Administration Server is unavailable. See Recovering Failed Servers for more information.

Two or more Managed Servers can be configured as a WebLogic Server cluster to increase application scalability and availability. In a WebLogic Server cluster, most resources and services are deployed to each Managed Server (as opposed to a single Managed Server,) enabling failover and load balancing. To learn which component types and services can be clustered, see What Types of Objects Can Be Clustered? in Using WebLogic Server Clusters.

You create a non-clustered Managed Server and add it to a cluster by configuring pertinent configuration parameters for the server instance and the cluster using the Administration Console or other system administration tools. Conversely, you can remove a Managed Server from a cluster by re-configuring the parameters appropriately. The key difference between clustered and non-clustered Managed Servers is support for failover and load balancing—these features are available only in a cluster of Managed Servers.

Your requirements for scalability and reliability drive the decision on whether or not to cluster Managed Servers. For example, if your application is not subject to variable loads, and potential interruptions in application service are acceptable, clustering may be unnecessary.

For more information about the benefits and capabilities of a WebLogic Server cluster, see Introduction to WebLogic Server Clustering in Using WebLogic Server Clusters. A single domain can contain multiple WebLogic Server clusters, as well as Managed Servers that are not configured as clusters.


Resources and Services

In addition to the Administration Server and Managed Servers, a domain also contains the resources and services required by Managed Servers and hosted applications deployed in the domain.

Examples of domain-level resources include:

Managed Servers in the domain host their own resources and services. You can deploy resources and services to selected Managed Servers or to a cluster. Examples of deployable resources include:


Common Domain Types

There are two basic types of domains:

Note: In production environments, deploy applications only on Managed Servers in the domain. The Administration Server should be reserved for management tasks. For more information, see Creating and Configuring Domains Using the Configuration Wizard.


Domain Restrictions

Many WebLogic Server installations consist of a single domain that includes all the Managed Servers required to host applications. Note the following restrictions for domains:


Directory Structure

This section discusses the directory structure for a domain and for server instances in a domain.

The config.xml file

The configuration of a domain is stored in the config.xml file for the domain. (You can specify another name for this file by specifying a command line option when you start the Administration server.) The config.xml file specifies the name of the domain and the configuration parameter settings for each server instance, cluster, resource, and service in the domain. The config.xml file must exist in the Server Root Directory of the Administration Server. (See Server Root Directory for an Administration Server.)

This directory also contains default script files that you can use to start the Administration Server and Managed Servers in the domain. For more information about these scripts and other methods of starting a server instance, see Starting and Stopping WebLogic Server in the Administration Console Online Help.

Domain Directory Structure

In releases of WebLogic Server prior to version 7.0, domain directories were created within the directory structure of the Weblogic Server installation. With WebLogic Server 8.1, you can set up domain directories outside the product installation directory tree, in any location on the file system that has access to the Weblogic Server installation and the JDK.

When you use the Configuration Wizard to create a domain, by default it creates the user_projects/domains directory in the BEA Home directory as a container for your domains (you can also specify a different directory anywhere on the file system). It also creates a root directory for the new domain and any other directories specified in the domain template that you select to create the domain.

The domain directory structure created by the Configuration Wizard contains:

When you start a server instance in a domain for the first time, Weblogic Server creates the following subdirectories in the domain directory:

You can create other directories within the domain directory structure, as desired.

A Server's Root Directory

All instances of WebLogic Server use a server root directory to store runtime data and to provide the context for any relative pathnames in the server's configuration. When you start a WebLogic Server instance for the first time, a subdirectory is created for each server instance under the server root directory. These subdirectories contain log files, security data, administrative data, and other files used by the server instance.

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.

The server root directory may also contain a subdirectory called applications that is used for auto-deployment of applications when a domain is running in development mode.

For example, in Figure 2-2, the server root directory is called MyServerRootDirectory. WebLogic Server instances named server-1 and server-2 each have their own subdirectory under the server root directory. The name of these subdirectories is the name of the server as defined in the domain's configuration.

Figure 2-2 Server Root Directory

Server Root Directory



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:

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:

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


Skip navigation bar  Back to Top Previous Next