One method of creating domains in WebLogic Server is to use domain and extension templates that contain the main attributes and files required for building or extending a domain. To simplify the process of creating templates, BEA provides the Domain Template Builder, a stand-alone Java application that guides you through the process of creating custom domain and extension templates. This process is illustrated in Figure 1-1.
Figure 1-1 Domain Template Builder
The Domain Template Builder is designed to be used off-line, in graphical mode only. It is not supported in console mode. Therefore, the console attached to the machine on which you are using the Domain Template Builder must support a Java-based GUI. All consoles for Windows systems support Java-based GUIs; only a subset of UNIX-based consoles support Java-based GUIs.
BEA delivers a set of predefined domain and extension templates with your product installation that you can use to create domains. This set of templates includes the base WebLogic Server domain template, and various extension templates that allow you to add product component functionality and samples to the base domain. For more information about the templates provided by BEA, see Domain Template Reference at the following URL:
After you create your domain and add new resources and applications to it, you can use the Domain Template Builder to create a custom domain template. You can also use the Domain Template Builder to customize an existing template. For example, you may want to remove applications or add SQL scripts for additional databases. To do so, select the existing domain or template as the source for your new custom template. When your custom domain templates are complete, you can start using them to create domains using the Configuration Wizard, WLST Offline, or the unpack command. For more information about these tools, see Additional Tools for Creating Templates and Domains.
About Domain and Extension Templates
When you are using the Domain Template Builder, the term template refers to a Java Archive (JAR) file that contains the files and scripts required to create or extend a domain.With the Domain Template Builder, you can create the following types of templates:
Domain template—defines the full set of resources within a domain, including infrastructure components, applications, services, security options, and general environment and operating system parameters. You can create a domain template from an existing template or from a domain. A domain template is used to create a new domain.
As part of your product distribution, BEA provides a Base WebLogic Server domain template. This template defines the core set of resources within a domain, including an Administration Server and basic configuration information, infrastructure components, and general environment and operating system options. It does not include sample applications. You use this template to create a basic WebLogic Server domain that you can then extend using an extension template that contains applications and services, or additional product component functionality.
Extension template—defines applications and services that can provide additional product component functionality, such as Apache Beehive, product sample applications, or JDBC or JMS components. This type of template can be used to extend an existing domain.
Overview of Creating Domain Templates Using the Domain Template Builder
To create a custom domain template using the Domain Template Builder, select the domain or domain template from which you want to create your new domain template. You then have the option of modifying the following:
Basic template information
Application and domain directory contents
SQL scripts for database configuration
Administration Server and user configuration
Basic security configuration, such as creating users, groups, and global roles and their assignments
Start menu entries (Windows systems only)
Customized scripts and variables
Table 1-1 summarizes the steps necessary to create a domain template using the Domain Template Builder.
Table 1-1 Steps for Creating a Domain Template Using the Domain Template Builder
Add SQL scripts for each database that you expect to be used with the domains created from this template and specify the order in which the scripts are executed.
Specify a user name and password to be used for starting the Administration Server. Optionally, you can also configure additional security features by defining users and groups and assigning them to global security roles.
Replace specific paths, filenames, and other domain environment settings with replacement variables in text files contained in the template. The Configuration Wizard later replaces the variables with exact strings to set up a specific WebLogic domain.
Specify the name and directory for the domain template, and launch the process that creates it.
Overview of Creating Extension Templates Using the Domain Template Builder
The process used to create an extension template is virtually the same as the process used to create a domain template except that you are not prompted to configure the Administration Server, assign an administrator username and password, or specify Start menu entries, since these domain settings are defined in the domain to be extended.
To create an extension template using the Domain Template Builder, you select a domain or extension template to use as the basis for your template which you can then modify to suit your needs. When creating an extension template, you have the option of modifying the following:
Basic template information, such as name and description
Application directory contents and location
Files to be included in the template
SQL scripts for database configuration
Additional security, such as creating users, groups, and global roles
Customized scripts and variables
The Domain Template Builder creates an extension template (JAR file) that can be used to extend an existing domain. Table 1-2 summarizes the steps for creating an extension template using the Domain Template Builder.
Table 1-2 Steps for Creating Extension Templates Using the Domain Template Builder
Enter a description of the template. If you selected an existing template as your source, the description for that template is displayed. Review and modify the description if necessary.
Add SQL scripts for each database that you expect to be used with the domains created from this template and specify the order in which the scripts are executed.
Replace specific paths, filenames, and other environment-specific strings with replacement variables in text files contained in the template. Later, when a specific WebLogic domain is being created, the Configuration Wizard replaces these variables with exact strings.
Enter a name and directory for the extension template, and launch the process that creates it.
Additional Tools for Creating Templates and Domains
Your product installation includes several tools for creating templates and domains: the Domain Template Builder, the pack and unpack commands, WLST Offline, and the Configuration Wizard. As described previously, you can use the Domain Template Builder to create custom domain and extension templates using a graphical user interface. The other tools are described in the following table.
Table 1-3 Additional Tools for Creating Templates and Domains
To perform the following task . . .
Use the following tools . . .
Create a template
pack—command that enables you to create a template archive (.jar) file that contains a snapshot of either an entire domain or a subset of a domain. You can use a template that contains a subset of a domain to create a Managed Server domain directory hierarchy on a remote machine. For more information, see Creating Templates and Domains Using the pack and unpack Commands at the following URL: http://download.oracle.com/docs/cd/E13179_01/common/docs100/pack/index.html
WLST Offline—command-line scripting interface used to create a new domain or update an existing domain without connecting to a running instance of WebLogic Server. The writeTemplate functionality of WLST Offline provides the same capability for creating a template as the pack command. For more information, see "Creating a Domain Template (Offline)" in WebLogic Scripting Tool at the following URL: http://download.oracle.com/docs/cd/E13222_01/wls/docs100/config_scripting/domains.html#create_template
Create a new domain or extend an existing domain
Configuration Wizard—stand-alone Java application that guides you through the process of creating or extending a domain. When creating a domain, you can choose to accept the default settings or to customize the domain to more closely match your particular environment. To customize your domain, you can add and configure Managed Servers, clusters, and machine definitions, and/or customize predefined JDBC data sources and JMS file store directories. You can also use the Configuration Wizard to extend an existing domain by adding predefined applications and services, or product component functionality. For more information, see Creating WebLogic Domains Using the Configuration Wizard at the following URL: http://download.oracle.com/docs/cd/E13179_01/common/docs100/confgwiz/index.html
WLST Offline—command-line scripting interface used to create a new domain or update an existing domain without connecting to a running instance of WebLogic Server. WLST Offline supports the same functionality as the Configuration Wizard. For more information, see WebLogic Scripting Tool at the following URL: http://download.oracle.com/docs/cd/E13222_01/wls/docs100/config_scripting/index.html
unpack—command that enables you to create a new domain by using a template compatible with your current installation. To create a Managed Server domain, use the unpack command with a Managed Server templates cannot use unpack to extend an existing domain. For more information, see Creating Domains and Templates Using the pack and unpack Commands at the following URL: http://download.oracle.com/docs/cd/E13179_01/common/docs100/pack/index.html