WebLogic 8.1 Domains

 

 


Contents

  1. Overview
  2. Create a Domain
  3. Directory Structure
  4. Server Root Directories

 


Overview

A domain consists of one or more WebLogic Server instances, managed with a single admin server.

Each domain's configuration info is stored in a file called config.xml. You cannot perform configuration or deployment tasks in multiple domains at the same time.

Domains can be started in development or production mode. The former uses a relaxed security configuration and allows one to auto-deploy applications. The latter uses full security and can use advanced features such as clusters.

 

Create a Domain

Ways to create a domain:

  • Copy an existing domain...

    cp -r old_domain new_domain

    ...and then edit config.xml, changing names and ports.

  • From a directory that does not already have a config.xml file, run:

    java weblogic.Server

    This will automatically create start scripts, a config.xml file, and the relevant directory tree

  • Use the Configuration Wizard.

  • Execute wlserver and wlconfig Ant tasks.

 


Directory Structure

Set up domain directories outside the product installation directory tree.

When you use the Configuration Wizard to create a domain, by default it creates the user_projects directory in the BEA Home directory as a container for your domains. 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 contains:

  1. A domain root directory with the same name as the domain, such as mydomain or petstore. This directory contains the following:
  2. The config.xml file for the domain
  3. Scripts you use to start server instances and establish your environment
  4. A subdirectory for storing applications for the domain, typically named applications.

If you plan to use the WebLogic Server's auto-deployment feature, available only when a domain is running in development mode, the subdirectory for applications must be named applications.

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

  1. Files containing security information.
  2. A logs directory for storing domain-level logs.
  3. A directory for each server running in the domain, for storing server logs and HTTP access logs.

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

 


Server Root Directory

All instances of WebLogic Server use a server root directory to store runtime data, such as config.xml, and to provide the context for any relative pathnames in the server's configuration. The server root directory is generally set to the WL_ROOT environment variable.

When a server instance is started for the first time, a subdirectory is created for each instance under the root directory. These subdirectories contain log files, security data, administrative data, and other files used by the server instance.

The 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.

You can specify the path for the server root directory as follows:

java -Dweblogic.RootDirectory=/PATH/MyServerRootDirectory weblogic.Server

 

For an admin server

Admin servers use use the server root directory as a repository for configuration data and security resources. To determine the root directory for an admin server, WebLogic Server does the following:

  1. If the server's startup command includes the -Dweblogic.RootDirectory=path option, then the value of path is the server root directory.

  2. If -Dweblogic.RootDirectory=path is not specified, and if the working directory (that is, the directory from which you issue the startup command) contains a config.xml file, then the working directory is the server root directory.

  3. If neither of the previous statements is true, then the server looks for a config.xml file in working-directory/config/domain-name. If it finds config.xml in this directory, then working-directory/config/domain-name is the server root directory.

    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 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:

  1. Directory in the console using:

    Server --> Configuration --> Remote Start

  2. If you did not specify a root directory in the console, then the server root directory is:
    $WL_HOME/common/nodemanager

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.

 

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:

  1. If the server's startup command includes the -Dweblogic.RootDirectory=path option, then the value of path is the server's root directory.

  2. If -Dweblogic.RootDirectory=path is not specified, then the working (current) directory is the root directory. For example, if you run the weblogic.Server command from c:\config\MyManagedServer, then c:\config\MyManagedServer is 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 sever root directory not be the same as the installation directory for the WebLogic Server software.


  Home