Creating WebLogic Configurations Using the Configuration Wizard
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Before you can run the Configuration Wizard in silent mode to create or extend a domain, as described in Starting in Silent Mode, you must first create a script in which you define the configuration settings for the domain. A sample script, based on the Basic WebLogic Server Domain template, is provided with the WebLogic Platform software in the common\templates\silent_scripts
directory of your product installation. This sample script and additional scripts, based on other domain templates, are provided and described in Sample Configuration Scripts for Silent-Mode Configuration.
To create a script, do one of the following:
Refer to the following sections for instructions on creating scripts for creating and extending domains:
When you create a script, you specify operations to be performed by the Configuration Wizard when the script is executed. The following sections describe the operations that must be defined in the script to create a new domain:
Note: The code for each operation described in this section must be terminated by a semicolon.
Select a configuration template to use as the basis of the domain you will create and configure. To select a configuration template, use the read
operation, as follows:
read template from "
template_jar_name
";
Table 4-1 describes the single read template
operation parameter for which you must specify a value.
Full pathname of the configuration template, including the name of the configuration template file. The pathname must be enclosed in quotation marks. |
In the following example, the Basic WebLogic Server Domain configuration template is specified with the absolute pathname for the template:
read template from "C:\bea\weblogic81\common\templates\domains\wls.jar";
Edit the default configuration information to create new configuration objects, edit existing values for configuration object attributes, or delete configuration objects.
Note: You can obtain information about your existing domain configuration from the config.xml
and security.xml
files in the template JAR file, or from the config.xml
in the domain itself, once it is created. For information about the config.xml
file, see WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html.
You use silent mode to create and edit any valid configuration object and its child elements, except custom security objects. For more information about valid configuration objects, see WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html.
The following table summarizes the edit operations described in the following sections.
To create a configuration object, specify the type of object you want to create, assign it to a variable, and define the Name
attribute. Then, you can set the remaining attributes (or edit the Name
attribute), as described in Setting Configuration Object Attributes.
To create a configuration object, use the create
operation, as follows:
create
object_type
"name
" asvariable
;
Table 4-3 describes the create
operation parameters for which you must specify values.
Configuration object type, as defined in WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html. |
|
Value to assign to the |
|
User-defined variable used to specify the configuration object. |
In the following example, a Server
object is created and assigned to the variable s2
, and the Name
attribute is set to server_2
:
create Server "server_2" as s2;
In the following example, a User
object is created and assigned to the variable u1
, and the Name
attribute is set to user1
:
create User "user1" as u1;
By default, the user is assigned to the group "Administrators
."
Before you can edit an existing configuration object, the Configuration Wizard must find the object in the template and assign it to a variable. To assign a configuration object to a variable, use the find
operation, as follows:
find
object_type
"name
" asvariable
;
Table 4-4 describes the find
operation parameters for which you must specify values.
Configuration object, as defined in WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html. |
|
Value of the |
|
User-defined variable used to specify the configuration object. |
In the following example, a Server
object named "myserver
" is assigned to the variable s1
:
find Server "myserver" as s1;
Some configuration object types contain child elements. Before you can edit an existing child element, the Configuration Wizard must find the element in the template and assign it to a variable. To assign a child element to a variable, use the find
operation, as follows:
find
object_type.child_element
"name.child_element_name
" asvariable
;
Table 4-5 describes the find
operation parameters for which you must specify values.
Note: Silent-mode configuration supports all child elements for the configuration object types. For a complete list of the child elements for the configuration objects, see WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html.
Configuration object, as defined in WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html. |
|
The child element of the configuration object. Silent-mode configuration supports all child elements for the configuration object types. For a complete list of the child elements for the configuration objects, see WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html. |
|
User-defined variable used to specify the child element of the configuration object. |
In the following example, a Server
object named "myserver
" with a WebServer
child element named "mywebserver
" is assigned to the variable ws1
:
find Server.WebServer "myserver.mywebserver" as ws1;
To set a configuration attribute, specify the variable and attribute name for it, as follows:
set
variable
.attribute
"value
";
Table 4-6 describes the parameters for which you must specify values.
User-defined variable used to specify the configuration object. For new configuration objects, you assign a configuration object to a variable during the creation process, as described in Creating a Configuration Object. For existing configuration objects, you assign a configuration object to a variable using the |
|
Configuration object attribute for which you want to specify a value. |
|
Value that you want to assign to the specified attribute. This parameter ( |
In the following example, the ListenAddress
and ListenPort
attributes for the Server
configuration object referenced by s2
(that is, server_2
) are set to localhost
and 7001
, respectively:
set s2.ListenAdress "localhost";
set s2.ListenPort "7001";
The JDBC Connection Pool Properties
attribute specifies the list of properties passed to the JDBC Driver, and is used when creating physical database connections.
When specifying this attribute, ensure that you provide the complete list of the properties required by the JDBC Driver being used.
Because the values that you specify for the Properties
attribute will override all values currently set, if you omit a value from the Properties
list, that property will remain undefined, resulting in unexpected results.
To assign a value to an attribute for a child element, specify the variable assigned to the child element and the name of the attribute, as follows:
set variable
.attribute
"value
";
Table 4-7 describes the parameters for which you must specify values.
User-defined variable used to specify the child element of the configuration object. For existing configuration objects, you assign a child element to a variable using the |
|
Child element attribute for which you want to specify a value. |
|
Value that you want to assign to the specified attribute. This parameter ( |
In the following example, a Server
named "myserver
" with a WebServer
child element named "mywebserver
" is assigned to the variable ws1
. Then, the LogFileName
attribute for the webserver
child element is assigned the value of c:\bea\weblogic\logs\newAccess.log
.
find Server.WebServer "myserver.mywebserver" as ws1;
set ws1.LogFileName "c:\bea\weblogic\logs\newAcess.log
";
To assign a value to an attribute for all instances of a particular type of child element, use the following format:
set
variable
.child_element
.attribute
"value"
;
Table 4-8 describes the parameters for which you must specify values.
User-defined variable used to specify the configuration object. For new configuration objects, you assign a configuration object to a variable during the creation process, as described in Creating a Configuration Object. For existing configuration objects, you assign a configuration object to a variable using the |
|
The child element of the configuration object. Silent-mode configuration supports all child elements for the configuration object types. For a complete list of the child elements for the configuration objects, see WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html. |
|
Child element attribute for which you want to specify a value. |
|
Value that you want to assign to the specified attribute. This parameter ( |
In the following example, the server named "myserver
" is assigned to the variable s1
. Then, all ThreadCount
attributes for the ExecuteQueue
child element of the server referenced by s1
are set to 25
:
find Server "myserver" as s1;
set s1.ExecuteQueue.ThreadCount "25";
When the Name
attribute of a child element instance is not defined, you cannot reference that child element individually. In this case, the only way you can assign a value to an attribute of an unnamed child element is by setting all instances of the child element attribute, as described in Setting an Attribute for All Instances of a Child Element.
You can also use the set
operation to designate an HTTP proxy server for a cluster as follows:
set
variable
.ProxyServer "unclustered_managed_server
";
Note: Only an unclustered Managed Server can be used as a proxy server.
Table 4-9 describes the parameters for which you must specify values when setting an HTTP Proxy server.
User-defined variable used to specify the For new configuration objects, you assign a configuration object to a variable during the creation process, as described in Creating a Configuration Object. For existing configuration objects, you assign a configuration object to a variable using the |
|
Configuration object attribute that specifies the proxy server. Do not change this attribute. |
|
Name of the unclustered Managed Server that you want to assign as the |
In the following example, the cluster named myCluster
is assigned to the variable mycluster.
Then, the server AnUnClusteredServer
is assigned to the attribute ProxyServer
for the cluster referenced by mycluster
.
create Cluster "myCluster" as mycluster;
set mycluster.ProxyServer "AnUnClusteredServer";
You can also use the set
operation to specify configuration options for the domain, as follows:
set
configuration_option
value;
Table 4-10 describes the parameters for which you must specify values.
Name of the configuration option to be defined. The configuration options that you can specify when creating a new domain are listed in Table 4-11. |
|
Value that you want to assign to the configuration option. This parameter ( |
In the following example, a Windows Start Menu shortcut for the domain is not created.
set CreateStartMenu "false";
Table 4-11 describes the configuration options that you can specify using the set
operation.
Whether you want to allow a domain to be updated without adding an extension template. The valid value for this option is always true, which allows you to update a domain with or without adding an extension template. |
|
The full pathname to the application directory when a separate directory is required for applications, as indicated in the specified template. If a separate application directory is not required, this setting has no effect. Note: This option can be used when you are creating a new domain and extending an existing domain. |
|
Whether you want to create a shortcut for the domain on the Windows Start menu. Valid values for this option are: |
|
The full pathname to the directory for the Java 2 SDK to be used when starting the server. |
|
Whether you want to overwrite a domain if it already exists. Ensure that you make a backup copy of an existing domain that you want to persist. The default is false. |
|
The startup mode for your domain. Valid values for this option are: For more information about choosing the start mode for your domain, see Choosing the Startup Mode. |
You can assign servers to clusters by using the assign Server
operation as follows:
assign Server "server" to Cluster "cluster";
Table 4-12 describes the assign Server
operation parameters for which you must specify a value.
In the following example, the servers named myServer1
and myServer2
are assigned to the cluster myCluster
.
assign Server "myServer1,myServer2" to Cluster "myCluster";
You can assign all the applications and services in a domain to servers and clusters by using the assign
all
operation as follows:
assign all
Applications
operation as follows:assign all Applications to Target "
server_or_clusters
"
In the following example, all applications in the domain are assigned to the targets AdminServer
and Cluster1
:
assign all Applications to Target "adminServer,cluster1";
assign all Services
operation as follows:assign all Services to Target "
server_or_clusters
";
Table 4-13 describes the single assign all
operation parameter for which you must specify a value.
If you use the assign all Services
operation, any of the following services that are defined in the config.xml
for the domain, or that you added in this script, are assigned to the target server or cluster:
You can assign individual applications and application components (such as Web applications and EJB modules) to a server or cluster using the assign Application
operation as follows:
assign Application "
application_names
" to Target "server_or_clusters
";
Table 4-14 describes the assign Application
operation parameters for which you must specify a value.
In the following example, the applications named MedRecEAR
and PhysicianEAR
are assigned to the server myServer1
.
assign Application "MedRecEAR, PhysicianEAR" to Target "myServer1";
In the following example, the application component SessionEJB
for the application MedRecEAR
is assigned to the server MedRecServer
.
assign Application "MedRecEAR.SessionEJB" to Target "MedRecServer";
You can assign an individual service to a server or cluster by name or category, as follows:
assign
service_type
"service_names
" to Target "server_or_clusters
";
Table 4-15 describes the assign
operation parameters for which you must specify a value when you are assigning individual services to servers or clusters.
Type of service to be assigned. In addition to the services listed in Assigning All Applications and Services to Servers and Clusters, you can also individually assign the following service categories: |
|
Name of the services that you want to assign to the server or cluster. You can specify multiple service names, separated by a comma. If you want to assign all services of the type specified using the |
|
Server or cluster name to which you want to target the services or services. You can specify multiple server or cluster names, separated by a comma. The target server and cluster names must be enclosed in quotation marks. |
In the following example, the service MedRecJMSServer
is assigned to the server myServer1
.
assign JMSServer "MedRecJMSServer" to Target "myServer1";
In the following example, all JMS Servers are assigned to
myServer1
.
assign JMSServer "*" to Target "myServer1";
When you are creating a new domain, you can perform the following assignments:
Note: When you create a user, it is assigned automatically to the Administrators group.
To assign users to groups, use the assign User
operation as follows:
assign User "
username"
to Group "group";
To assign groups to groups, use the assign Group operation as follows:
assign Group "
group"
to Group "group";
Table 4-16 describes the assign
operation parameters for which you must specify a value when you are assigning users and groups to groups.
In the following example, the user weblogic
is assigned to the group Monitors
and the group Deployers
is assigned as a subgroup of the group Monitors
.
assign User "weblogic" to Group "Monitors";
assign Group "Deployers" to Group "Administrators";
You can use the unassign
operation to remove assignments using the same operations as the assign
command. To do so, change assign
to unassign
and the to
operator to from
.
The following examples illustrate sample usage for the unassign
operation:
unassign Application "MedRecEAR, PhysicianEAR" from Target "myServer1";
unassign all Services from Target "adminServer,cluster1";
unassign User "weblogic" from Group "Monitors";
To delete a configuration object, use the delete
operation, as follows:
delete
variable
;
Table 4-17 describes the single delete
operation parameter for which you must specify a value.
User-defined variable used to specify the configuration object. For new configuration objects, you assign a configuration object to a variable during the creation process, as described in Creating a Configuration Object. For existing configuration objects, you assign a configuration object to a variable using the Note: You can only modify the name or configuration for an administration server. The administration server cannot be deleted. |
In the following example, the Server
configuration object referenced by s2
(that is, server_2
) is deleted:
delete s2;
To create the domain using the configuration settings that you have defined in step 2, use the write
operation, as follows:
write domain to "
domain_name"
;
Table 4-18 describes the single write
operation parameter for which you must specify a value.
In the following example, the domain is created in the C:\bea\user_projects\
directory and is named wlsDomain
:
write domain to "C:\bea\user_projects\wlsDomain";
To close the configuration template, use the close
operation, as follows:
close template;
When you have finished defining the configuration, save the script. You can name the script as desired, and pass the relative or full pathname for it to the config
command, as described in Starting in Silent Mode.
The following sections describe the steps that you must perform in the script to create a new domain.
Note: Each operation described in this section must be terminated by a semicolon.
To select a domain directory that you want to update with additional applications and services, use the read
operation, as follows:
read domain from "
domain_directory_name
";
Table 4-19 describes the single read domain
operation parameter for which you must specify a value.
Full path name to an existing domain directory that you want to update. The pathname must be enclosed in quotation marks. |
In the following example, the absolute pathname to a domain named mydomain
is specified:
read domain from "C:\bea\user_projects\domains\mydomain";
An extension template defines applications and services, such as JDBC or JMS components, and startup/shutdown classes, that can be used to extend an existing domain. Use the add
operation to add an extension template to the domain you specified using the read
domain
operation in step 1.
add template extension_template_jar_name;
Table 4-20 describes the single add template
operation parameter for which you must specify a value.
Full pathname of the extension template, including the name of the extension template file.The pathname must be enclosed in quotation marks. |
In the following example, an extension template adding a basic Web application is specified, using the absolute pathname for the template:
add template "C:\bea\weblogic81\common\templates\applications\DefaultWebApp.jar";
You can edit the default configuration information to create new configuration objects, edit existing values for configuration object attributes, delete configuration objects, and assign applications and services to servers or clusters.The operations available for these tasks are the same for extending an domain and creating a new domain. For instructions about using these operations, see the following sections:
You can also set configuration options when extending a domain, as described in Setting Configuration Options When Extending a Domain.
You can use silent mode to create and edit any valid configuration object and its child elements, except security objects. For more information about valid configuration objects, see WebLogic Server Configuration Reference at: http://download.oracle.com/docs/cd/E13222_01/wls/docs81/config_xml/index.html.
When you are extending a domain, you can use the set
operation to specify configuration options for the domain as follows:
set
configuration_option
value;
Table 4-21 describes the parameters for which you must specify values.
Name of the configuration option to be defined. The configuration options that you can specify when you are extending an existing domain are listed in Table 4-22. |
|
Value that you want to assign to the configuration option. This parameter ( |
Table 4-22 lists the configuration options that you can specify using the set
operation when you are extending an existing domain.
Update the domain opened in the read domain
operation, use the update
operation, as follows:
update domain;
Note: You must specify the add template
operation before you can update the domain.
To close the domain, use the close
operation, as follows:
close domain;
When you have finished defining the configuration, save the script. You can name the script as desired, and pass the relative or full pathname for it to the config
command, as described in Starting in Silent Mode.
The following sample scripts are provided to demonstrate the basic concepts required to create and update domains using silent-mode configuration.
The following sections provide samples scripts you can use to create a new domain from a configuration template. Topics include:
The following sample script is based on the Basic WebLogic Server Domain template. This script is provided in the common\templates\silent_scripts
directory of your product installation.
The numbers shown along the left-hand margin mark the beginning of each section of code that performs a major task within the script. For details about a particular task, see the description corresponding to the numeric callout in Table 4-23.
Listing 4-1 Sample Script for Creating a New Domain Based on the Basic WebLogic Server Domain
read template from "C:\bea\weblogic81/common/templates/domains/wls.jar";
//////////////////////////////////////////////////////////////////////////
//Find and configure the Admin Server.
/////////////////////////////////////////////////////////////////////////
find Server "myserver" as s1;
set s1.ListenAddress "";
set s1.ListenPort "7001";
set s1.SSL.Enabled "true";
set s1.SSL.ListenPort "7002";
//////////////////////////////////////////////////////////////////////////
//Create a JMSQueue.
//////////////////////////////////////////////////////////////////////////
//A JMSServer has to be created first.
create JMSServer "myJMSServer" as jmsserver;
create JMSQueue "myJMSQueue" as myq;
//required attribute
set myq.JNDIName "jms/myjmsqueue";
//required attribute
set myq.JMSServer "myJMSServer";
//optional attribute
//set myq.StoreEnabled "false";
//target "myJMSServer" to server "myserver"
assign JMSServer "myJMSServer" to target "myserver";
//////////////////////////////////////////////////////////////////////////
//Create a JDBCConnectionPool.
//////////////////////////////////////////////////////////////////////////create JDBCConnectionPool "demoPool" as mypool;
//required attribute
set mypool.DriverName "com.pointbase.jdbc.jdbcUniversalDriver";
//required attribute
set mypool.URL "jdbc:pointbase:server://localhost:9092/demo";
//required attribute
set mypool.Password "PBPUBLIC";
//optional attribute (but it's recommended you set the db user...)
set mypool.Properties "user=PBPUBLIC";
//target all JDBC connection pools to server "myserver"
assign JDBCConnectionPool "*" to target "myserver";
//////////////////////////////////////////////////////////////////////////
//target existing applications.
//////////////////////////////////////////////////////////////////////////
//target applications only when they exist in current domain template
//assign application "*" to target "myserver";
//////////////////////////////////////////////////////////////////////////
//Find the admin user and set the password, since it has not been set in the
// template.
//////////////////////////////////////////////////////////////////////////
find User "weblogic" as u1;
set u1.password "weblogic";
//////////////////////////////////////////////////////////////////////////
//Write out the domain.
//////////////////////////////////////////////////////////////////////////
set OverwriteDomain "true";
write domain to "C:\bea/user_projects/domains/wls";
//////////////////////////////////////////////////////////////////////////
//Close domain template to indicate completion of work.
//////////////////////////////////////////////////////////////////////////
close template;
The sample script based on the WebLogic Server Domain template performs the tasks defined in the following table.
Selects the Basic WebLogic Server Domain template. For more information, see Step 1: Select the Configuration Template. |
|
Configures the Administration Server. For more information, see the following relevant sections in Step 2: Edit the Configuration Information: |
|
Creates a JMS queue. For more information, see the following relevant sections in Step 2: Edit the Configuration Information: |
|
Creates a JDBC connection pool. When specifying the JDBC connection pool
Alternatively, you can assign the properties separately. For example, to define the user name, you can also specify the following command: For more information, see the following relevant sections in Step 2: Edit the Configuration Information: |
|
Optionally assigns applications that exist in the domain to |
|
Updates the password for the user Note: To review the predefined security information for a domain, view the |
|
Sets the |
|
Creates the domain in |
|
Closes the configuration template. For more information, see Step 4: Close the Configuration Template. |
The following sample script is based on the Avitek Medical Records Sample Domain template. More detailed scripts are provided in the common\templates\silent_scripts
directory of your product installation.
The numbers shown along the left-hand margin mark the beginning of each section of code that performs a major task within the script. For details about a particular task, see the description corresponding to the numeric callout in Table 4-24.
Listing 4-2 Sample Script for Creating a New Domain Based on the Avitek Medical Records Sample Domain
/* Create a new domain from a configuration template */
read template from "C:\bea\weblogic81\common\templates\domains\medrec.jar";
//medrec.jar already sets the password for the predefined user "weblogic".
//some templates do not have the password pre-set and you need to set it
create User "user1" as u1;
set u1.Password "password";
//by default "user1" is in "Administrators" group
unassign User "user1" from Group "Administrators";
assign User "user1" to Group "Deployers";
//creation of servers will trigger auto configuration
create Server "myServer1" as s1;
set s1.ListenPort "8001";
set s1.SSL.Enabled "true";
set s1.SSL.ListenPort "8002";
//find a child element and set its attributefind Server.ExecuteQueue "MedRecServer.default" as eq1;
set eq1.ThreadCount "25";
// if you do not have applications, do not do assignments for them
assign all Applications to Target "MedRecServer";
assign all Services to Target "MedRecServer, myServer1";
//JMSServer can't be assigned by "assign all Services".
assign JMSServer "*" to Target "myServer1";
set ServerStartMode "prod";
set JavaHome "C:\bea\jrockit81sp3_142_04";
set CreateStartMenu "false";
//no effect here since MedRec template does not specify app separation
set AppDir "C:\bea\user_projects\applications\myMedRec";
write domain to "C:\bea\user_projects\domains\myMedRec";
close template;
The sample script based on the Avitek Medical Records Sample Domain template performs the tasks defined in the following table.
Selects the Avitek Medical Records Sample template. For more information, see Step 1: Select the Configuration Template. |
|
Defines a user for the domain. For more information, see the following relevant sections in Step 2: Edit the Configuration Information: Note: To review the predefined security information for a domain, view the |
|
Defines and configures the server |
|
Defines and configures the child element |
|
Assigns all applications and services to |
|
Assigns all JMS servers to |
|
Sets several configuration options. For more information, see Setting Configuration Options When Creating a New Domain. |
|
Creates the domain in |
|
Closes the configuration template. For more information, see Step 4: Close the Configuration Template. |
The following sample script is based on the Basic WebLogic Portal Domain template.
The numbers shown along the left-hand margin mark the beginning of each section of code that performs a major task within the script. For details about a particular task, see the description corresponding to the numeric callout in Table 4-25.
Listing 4-3 Sample Script for Creating a New Domain Based on the Basic WebLogic Portal Domain
/* Create a new domain from a configuration template */
read template from "C:\bea\weblogic81\common\templates\domains\wlp.jar";
//some templates do not have the password pre-set and you need to set it
create User "system" as u1;
set u1.Password "password";
find User "weblogic" as u2;
set u2.Password "password";
//find server and set its attributes
find Server "portalServer" as s1;
set s1.Name "adminServer";
set s1.ListenPort "7001";
set s1.SSL.Enabled "true";
set s1.SSL.ListenPort "7002";set ServerStartMode "dev";
set JavaHome "C:\bea\jrockit81sp3_142_04";
set CreateStartMenu "false";
// if you do not have applications, do not do assignments for them
assign all Applications to Target "adminServer";
assign all Services to Target "adminServer";
assign JMSConnectionFactory "*" to Target "adminServer";
//JMSServer can't be assigned by "assign all Services".
assign JMSServer "*" to Target "adminServer";
//If you switch to use a database with an XA driver, you must uncomment the
//following lines. The portalPool JDBC connection pool must have
//SuportsLocalTransaction set to "false".
//find JDBCConnectionPool "portalPool" as portalcp;
//set portalcp.SupportsLocalTransaction "false";
write domain to "C:\bea\user_projects\domains\mywlp";
close template;
The sample script based on the Basic WebLogic Portal Domain template performs the tasks defined in the following table.
Selects the Basic WebLogic Portal Domain template. For more information, see Step 1: Select the Configuration Template. |
|
Defines users for the domain. For more information, see the following relevant sections in Step 2: Edit the Configuration Information: Note: To review the predefined security information for a domain, view the |
|
Finds and configures the server |
|
Sets several configuration options. For more information, see Setting Configuration Options When Creating a New Domain. |
|
Assigns all applications and services to |
|
Assigns all JMS connection factories and servers to |
|
Finds the |
|
Creates the domain in |
|
Closes the configuration template. For more information, see Step 4: Close the Configuration Template. |
The following sample script creates a new domain based on the Basic WebLogic Server Domain template and then updates it using the Default WebApp extension template.
The numbers shown along the left-hand margin mark the beginning of each section of code that performs a major task within the script. For details about a particular task, see the description corresponding to the numeric callout in Table 4-26.
Listing 4-4 Sample Script for Creating a New Domain and Updating It Using an Extension Template
/*Create a domain from a configuration template and update it */
read template from "C:\bea\weblogic81\common\templates\domains\wls.jar";
find User "weblogic" as admin;
set admin.Password "newPassword";
create User "user1" as u1;
set u1.Password "password";
assign User "user1" to Group "Deployers";
set ServerStartMode "dev";
set JavaHome "C:\bea\jrockit81sp3_142_04";
set CreateStartMenu "false";
write domain to "C:\bea\user_projects\domains\wls";
close template;
/* update an existing domain */
read domain from "C:\bea\user_projects\domains\wls";
//keep originals if there are duplicates from added extension template
//We do not really need this here since wls template does not have
applications.
set ReplaceDuplicates "false";
//add an extension template
add template
"C:\bea\weblogic81\common\templates\applications\DefaultWebApp.jar";
assign Application "DefaultWebApp" to Target "myserver";
update domain;
close domain;
The sample script performs the tasks defined in the following table.
Selects the Basic WebLogic Server Domain template. For more information, see Step 1: Select the Configuration Template. |
|
Defines users for the domain. For more information, see the following relevant sections in Step 2: Edit the Configuration Information: Note: To review the predefined security information for a domain, view the |
|
Sets several configuration options. For more information, see Setting Configuration Options When Creating a New Domain. |
|
Creates the domain in |
|
Closes the configuration template. For more information, see Step 4: Close the Configuration Template. |
|
Selects the domain directory to be extended. For more information, see Step 1: Select the Domain Directory. |
|
Sets the |
|
Extends the domain to support a basic Web application by importing resources from the Default WebApp extension template. For more information, see Step 2: Add the Extension Template to the Domain. |
|
Assigns the application to |
|
Updates the domain. For more information, see Step 4: Update the Domain. |
|
Closes the domain. For more information, see Step 5: Close the Domain. |
![]() ![]() |
![]() |
![]() |