Skip navigation.
Downloads | Product Documentation | Support

Creating Templates Using the Domain Template Builder

# 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, because these domain settings are already defined in the domain to be extended.

The following topics describe the steps you use to create an extension template:

- Create a New Extension Template
- Select a Template Domain Source for Your Extension Template
- Describe Your Extension Template
- Add or Omit Applications in Your Extension Template
- Add Files to Your Extension Template
- Add SQL Scripts to Your Extension Template
- Configuring Security Options in Your Extension Template
- Prepare Scripts and Files When Creating Extension Templates
- Review the Extension Template Settings
- Create Your Extension Template

# Create a New Extension Template

The Create a New Template window prompts you to choose the type of template you want to create: a domain template or an extension template. To create an extension template, choose Create an Extension Template.

Choose this option . . . | When you want to . . .
--- | ---
Create a Domain Template | Create a template that 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 then use this template to create a new domain. To learn more about creating a domain template, see Creating Domain Templates Using the Domain Template Builder.
Create an Extension Template | Create a template in which you define applications and services that can be used to extend an existing domain.

# Select a Template Domain Source for Your Extension Template

The Select a Template Domain Source window prompts you to choose the application template or domain directory from which you want to create an extension template.

#### To select an extension template as your extension template source:

1. Select the Select a Template tab.

A list of the extension templates available in the directory specified in the Locate Additional Templates field is displayed. Templates are organized by category. For example, the predefined extension templates provided with the product installation are listed together under the heading `BEA`.

If you need to change directories:

1. Click Browse to invoke the Select a Template Directory dialog box.
2. In the dialog box, navigate to the appropriate directory or manually enter the pathname of the directory in the Location field and click OK.

2. Select an extension template from the list.

Information about the selected template is displayed in the Description and Author fields.

3. Click Next to proceed to the next configuration window.

#### To select a domain as your extension template source:

1. Select the Select a Domain tab.
2. Navigate to the domain directory from which you want to create an extension template and select the desired domain.

Valid domain directories are indicated by a icon.

3. Click Next to proceed to the next configuration window.

# Describe Your Extension Template

The Describe the Template window prompts you to provide a description that will be displayed in the Select a Template area of the Select a Template Domain Source window.

To enter template description information, do one of the following:

- If you selected a template in the Select a Template Domain Source window, the information from the selected template is displayed here. Review the information and, if necessary, modify it to meet the needs of your extension template, as described in Describe the Template. Then click Next.
- If you selected a domain directory in the Select a Template Domain Source window, enter the information required for your extension template, as described in Describe the Template. Then click Next.

# Add or Omit Applications in Your Extension Template

The Add or Omit Applications window prompts you to:

- Review the list of applications that are currently defined in your template source
- Review the pathnames of the current and imported applications
- If necessary, change the relative directory into which applications are imported
- If necessary, omit applications from the list of files to be imported

For more information, see Add or Omit Applications.

# Add Files to Your Extension Template

By default, the Domain Template Builder includes files from the domain or extension template you specified as the source for the extension template you are creating. For example:

- If you select an existing extension template as the source for your new extension template, all files from the source template are automatically included. If the existing template has a separately defined applications directory, the applications contained in the template are listed under the Applications Root Directory in the Current Template View pane.
- If you select an existing domain as the source for your new extension template, the following files and directories are included by default:

- All files in the root directory with the following extensions: `.cmd`, `.sh`, `.xml`, `.properties`, and `.ini`.
- Any files with the`.pem` extension defined in the SSL configuration for your domain
- `bin` directory
- `lib` directory
- All files in the `security` directory that are not created automatically by the Template Builder during template creation. For example, `DefaultAuthenticatorInit.ldift` and `DefaultRoleMapperInit.ldift` are not included by default because they are created by the Template Builder during template creation.
- All files and subdirectories in the `config` directory that are not created automatically by the Template Builder during template creation. For example, `config.xml` and any JDBC and JMS resources defined in `config.xml` are not included by default because they are created by the Template Builder during template creation.

Note: The `servers` directory is not included in the template by default. If you have configured additional security data such as users, groups, or roles, through the WebLogic Server Administration Console or other online tools, it has been stored in the LDAP server and will not be included in the template. You will need to export the data first and then import it into the target domain.

You may also want to include other files from your system or network, as required by your application. The Add Files window prompts you to review, add, or remove files in the template.

#### To add files to the template you are creating:

1. To view a list of files that currently reside in your template, expand the Domain Root Directory and Applications Root Directory in the Current Template View pane.
2. To add or remove files, perform the following steps:

- In the Current Template View, select the destination directory to which you want to add a file.
- To add a file, navigate to the file within the File System View area and select Add File. You can limit the files displayed in this view by selecting a filter from the Show File Types drop-down list. For example, to display only files with the `.cmd` extension, select `*.cmd` from the drop-down list.
- To remove a file, select the file that you want to delete from the Current Template View pane, and select Remove File.

3. Repeat steps 1 and 2 for each file that you want to add or remove.
4. Click Next to proceed to the next configuration window.

# Add SQL Scripts to Your Extension Template

The Add SQL Scripts window prompts you to add SQL scripts for each database that you expect to be used with the domains that you extend using this template. You can also specify the order in which the scripts should be executed. For more information, see Add SQL Scripts.

# Configuring Security Options in Your Extension Template

Optionally, you can configure security parameters for your application—specifically, for the application resources within the domain. You can provide security for an application resource using the following security features:

- Users and groups—Classification of individuals and collections of individuals who may be granted a security role. Typically, a group is a collection of users who share a role or function within a company, such as working in the same department.
- Global security roles—Dynamically computed privileges that are used to restrict access to WebLogic resources. These privileges are granted to or withheld from users according to which roles they are assigned.

For example, to leverage individual skills, many Web development teams divide system administration responsibilities into distinct roles. A team may then assign a different level of permission to each role. Each project might give only one or two team members permission to deploy components, but allow all team members to view the WebLogic Server configuration.

WebLogic Server supports such role-based development by providing four default global roles that determine access privileges for system administration operations: Admin, Deployer, Operator, and Monitor.

Warning: Do not make the default global security roles for Administrative and Server resources more restrictive. If you eliminate any existing security roles, you risk degrading WebLogic Server operation. You can, however, make the default security roles more inclusive (for example, by adding new security roles).

The Security Configuration Options window prompts you to set security options for your application. If you choose No, the security settings in the extension template that is created match those defined in the template or domain on which it is based. If you choose Yes, you are prompted, in subsequent windows, to configure the security as described in the following table.

Task | Description
--- | ---
Configure Users, Groups, and Global Roles | Define users, groups, and global roles for authentication purposes. For instructions, see Configure Users, Groups, and Global Roles.
Assign Users to Groups | Assign users to groups. Groups allow you to manage a number of users at the same time. This is generally more efficient than managing each user individually. For instructions, see Assign Users to Groups.
Assign Groups to Groups | Designate a group as a subgroup of another group, to add further granularity to security management. For instructions, see Assign Groups to Groups.
Assign Users and Groups to Global Roles | Assign users and groups to predefined WebLogic Server global security roles. For instructions, see Assign Users and Groups to Global Roles.

# Prepare Scripts and Files When Creating Extension Templates

The Domain Template Builder automatically updates any standard scripts included in a template, such as start scripts, by replacing hard-coded values for various domain environment settings with variables. The Configuration Wizard can later replace these variables with new hard-coded values during the configuration of a new domain.

If you like, you can prepare additional files that are included with your template by manually inserting replacement variables. For more information, see Prepare Scripts and Files with Replacement Variables.

# Review the Extension Template Settings

The Review WebLogic Domain Template window allows you to review the details for your extension template before you initiate its creation.

#### To review the extension template settings:

1. Select an item in the Domain Summary pane on the left and review the associated details in the Details pane on the right. If you need to modify any information, select Previous to return to the desired configuration window.

Note: You can limit the type of information displayed in the Domain Summary window by selecting a filter from the View drop-down list

1. Click Next to proceed to the next configuration window.

# Create Your Extension Template

The Create an Extension Template window prompts you to specify the name and directory for the extension template, and launch the process that creates it.

#### To create your extension template:

1. Specify a name for the template JAR file in the Template Jar Name field by clicking within the field and modifying the string displayed there.
2. Make sure that the Template Location field contains the name of the directory in which you want the extension template to reside. If you need to change the value in this field:

1. Click Browse to invoke the Select the Template Creation Directory dialog box.
2. In the dialog box, navigate to the appropriate directory or manually enter the pathname for it in the Location field and click OK.

The template directory can be located anywhere on your system. By default, it resides in `BEA_HOME``\user_templates`, where `BEA_HOME` is the directory that contains the product installation (by default, this directory is `c:\bea` on Windows).

3. Click Create.

The Creating Template window is opened to display status messages during the template creation process. The Domain Template Builder generates a JAR file that contains only the applications and services specified in the extension template.

4. Click Done in the Creating Template window.