Posted on

How to create a Weblogic Domain

A Weblogic domain is the basic administrative unit of WebLogic Server. It consists of one or more WebLogic Server instances and logically related resources and services that are managed collectively as one unit.



The Administration Server provides a central point for managing the domain and providing access to the WebLogic Server administration tools.  A domain primarily includes Managed Servers which host application components and resources that are managed as part of the domain.

A domain may also include Weblogic Server Clusters, which are groups of Managed Server instances that work together to provide scalability and high availability for applications. (Clustering is discussed in detail in Chapter 9 of this book).

There are several ways to create a WebLogic domain: the recommended way is using the Fusion Middleware Configuration Wizard to create a domain based on or more domain templates.

The first step to take is to run the domain configuration script which can be found in the $MW_HOME/wlserver/common/bin

On Linux:



On Windows:


After executing the configuration script, the following screen will be your first step to complete:

oracle weblogic book oracle weblogic booksSelect “Create a new WebLogic domain” and click Next to continue. In the next step you have the option to create from scratch a new domain or use an existing template as model.

oracle weblogic book oracle weblogic books

Actually also a brand new domain uses, behind the scenes, a template. (The base template, wls.jar that ships with your WebLogic software, is located in the folder $MW_HOME/wlserver/common/templates/domains).

Since we still have not created any template click Next to continue with defaults. In the next screen, you can fill in the name and location for your domain, as shown by the following screenshot:

 oracle weblogic book oracle weblogic books

The default installation will suggest a base_domain folder under the Middleware home folder. For production environment it is recommended that you create domains outside the MW_HOME.

In the next screen you have to fill in the administrator’s username and password, as shown here:

 oracle weblogic book oracle weblogic books

Click Next to continue. In the following screen you have to configure the WLS Domain startup mode and select a JDK among the available ones (Oracle JDK or Weblogic JRockit)

oracle weblogic book oracle weblogic books

The choice between Development mode and Production mode appears obvious: you will select Development mode for faster application development and Production mode for higher performances in production.

Production Mode Vs Development Mode

Besides the evident different purpose of the two server modes there are also some important differences between them that you must be aware of:

Automatic deployment: When running Development mode the automatic deployment of an application is enabled. So it’s enough to drop an application in the domain’s autodeploy folder to get it deployed by Oracle WLS. In Production Mode, by default, this is switched off.

Stricter security policy: In Development mode there is a lower level of security: a file called, which contains the encrypted administrator username and password, is automatically generated. This does not happen in Production Mode, which uses a stricter level of security.

Debugging: In Development the debugFlag which is used to start the WebLogic Workshop Debugger is enabled, while in Production mode is disabled.

In order to enable/disable the Production mode you can set the variable PRODUCTION_MODE in the script setDomainEnv.cmd. For example, on the Windows script:


 In the next step you can optionally define the configuration of servers and Java EE resources for your servers. Since we will use next chapters’ recipes to configure every aspect of the configuration we will leave these options blank:

oracle weblogic book oracle weblogic books

The final screen will recap the selected configuration options. Click on Create to complete Domain installation.

Creating a domain using the Unix shell

On Unix-like systems, there is usually no graphical environment available. You can still run the domain creation GUI by exporting the GUI to your local desktop with an XClient, such as XVNC; however, if you don’t mind using the terminal, just give the option mode=console and you will get a text-based representation of your GUI installation.

./ mode=console