This following sections explain how the information that defines the configuration of a cluster is stored and maintained, and the methods you can use to accomplish configuration tasks:
Note: | Much of the information in this section also pertains to the process of configuring a WebLogic domain in which the server instances are not clustered. |
The config.xml
file is an XML document that describes the configuration of a WebLogic Server domain. config.xml
consists of a series of XML elements. The Domain element is the top-level element, and all elements in the Domain descend from the Domain element. The Domain element includes child elements, such as the Server, Cluster, and Application elements. These child elements may have children of their own. For example, the Server element includes the child elements WebServer, SSL and Log. The Application element includes the child elements EJBComponent and WebAppComponent.
Each element has one or more configurable attributes. An attribute defined in config.dtd
has a corresponding attribute in the configuration API. For example, the Server element has a ListenPort
attribute, and likewise, the weblogic.management.configuration.ServerMBean
has a ListenPort
attribute. Configurable attributes are readable and writable, that is, ServerMBean
has a getListenPort
and a setListenPort
method.
To learn more about config.xml
, see
Domain Configuration Files in Understanding Domain Configuration.
The Administration Server is the WebLogic Server instance that configures and manages the WebLogic Server instances in its domain.
A domain can include multiple WebLogic Server clusters and non-clustered WebLogic Server instances. Strictly speaking, a domain could consist of only one WebLogic Server instance—however, in that case that sole server instance would be an Administration Server, because each domain must have exactly one Administration Server.
There are a variety of ways to invoke the services of the Administration Server to accomplish configuration tasks, as described in Methods of Configuring Clusters. Whichever method is used, the Administration Server for a cluster must be running when you modify the configuration.
When the Administration Server starts, it loads the config.xml
for the domain. It looks for config.xml
in the directory:
BEA_HOME/
user_projects/domains/
<domain_name>/config
where domain_name is a domain-specific directory, with the same name as the domain.
Each time the Administration Server starts successfully, a backup configuration file named config.xml.booted
is created in the domain directory. In the unlikely event that the config.xml
file should be corrupted during the lifetime of the server instance, it is possible to revert to this previous configuration.
The following figure shows a typical production environment that contains an Administration Server and multiple WebLogic Servers instances. When you start the server instances in such a domain, the Administration Server is started first. As each additional server instance is started, it contacts the Administration Server for its configuration information. In this way, the Administration Server operates as the central control entity for the configuration of the entire domain.
The failure of an Administration Server for a domain does not affect the operation of Managed Servers in the domain. If an Administration Server for a domain becomes unavailable while the server instances it manages—clustered or otherwise—are up and running, those Managed Servers continue to run. If the domain contains clustered server instances, the load balancing and failover capabilities supported by the domain configuration remain available, even if the Administration Server fails.
Note: | If an Administration Server fails because of a hardware or software failure on its host machine, other server instances on the same machine may be similarly affected. However, the failure of an Administration Server itself does not interrupt the operation of Managed Servers in the domain. |
For instructions on re-starting an Administration Server, see “Avoiding and Recovering From Server Failure” in Managing Server Startup and Shutdown.
WebLogic Server allows you to change the configuration attributes of domain resources dynamically—while server instances are running. In most cases you do not need to restart the server instance for your changes to take effect. When an attribute is reconfigured, the new value is immediately reflected in both the current run-time value of the attribute and the persistent value stored in config.xml
.
Not all configuration changes are applied dynamically. For example, if you change a Managed Server’s ListenPort
value, the new port will not be used until the next time you start the Managed Server. The updated value is stored in config.xml
, but the runtime value is not affected.
The Administration Console validates attribute changes, checking for out-of-range errors and data type mismatch errors, and displays an error message for erroneous entries.
Once the Administration Console has been started, if another process captures the listen port assigned to the Administration Server, you should stop the process that captured the port. If you are not able to remove the process that captured the listen port, edit the config.xml
file to change the ListenPort
value.
This section is brief introduction to the application deployment process. For more information about deployment, see Deploying WebLogic Server Applications.
For instructions on how to perform common deployment tasks, see Deploy Applications.
You can deploy an application to a cluster using following methods:
The Administration Console is a graphical user interface (GUI) to the BEA Administration Service.
The weblogic.Deployer utility is a Java-based deployment tool that provides a command-line interface to the WebLogic Server deployment API.
The WebLogic Scripting Tool (WLST) is a new command-line interface that you can use to automate domain configuration tasks, including application deployment configuration and deployment operations.
These deployment tools are discussed in “Overview of Deployment Tools” in Deploying WebLogic Server Applications.
Regardless of the deployment tool you use, when you initiate the deployment process you specify the components to be deployed, and the targets to which they will be deployed—your cluster, or individual server instances within the cluster or domain.
The Administration Server for the domain manages the deployment process, communicating with the Managed Servers in the cluster throughout the process. Each Managed Server downloads components to be deployed, and initiates local deployment tasks. The deployment state is maintained in the relevant MBeans for the component being deployed. For more information, see Deployment Management API.
Note: | You must package applications before you deploy them to WebLogic Server. For more information, see the packaging topic in “Deploying the Application” in Developing Applications for WebLogic Server. |
In WebLogic Server, applications are deployed in two phases. Before starting, WebLogic Server determines the availability of the Managed Servers in the cluster.
During the first phase of deployment, application components are distributed to the target server instances, and the planned deployment is validated to ensure that the application components can be successfully deployed. During this phase, user requests to the application being deployed are not allowed.
Failures encountered during the distribution and validation process will result in the deployment being aborted on all server instances—including those upon which the validation succeeded. Files that have been staged will not be removed; however, container-side changes performed during the preparation will be reverted.
After the application components have been distributed to targets and validated, they are fully deployed on the target server instances, and the deployed application is made available to clients.
When a failure is encounted during the second phase of deployment, the server starts with one of the following behaviors:
Ideally, all Managed Servers in a cluster should be running and available during the deployment process. Deploying applications while some members of the cluster are unavailable is not recommended. Before deploying applications to a cluster, ensure, if possible, that all Managed Servers in the cluster are running and reachable by the Administration Server.
Note: | If you deploy an application to a Managed Server that is partitioned at the time of deployment—running but not reachable by the Administration Server—problems accessing the Managed Server can occur when that Managed Server rejoins the cluster. During the synchronization period, while other clustered Managed Servers re-establish communications with the previously partitioned server instance, user requests to the deployed applications and attempts to create secondary sessions on that server instance will fail. The risk of this circumstance occurring can be reduced by setting ClusterConstraintsEnabled, as described in Enforcing Cluster Constraints with Two-Phase Deployment in Deploying WebLogic Server Applications. |
Cluster membership should not change during the deployment process. After initiating deployment, do not:
Previous versions of WebLogic Server imposed these restrictions on deployment to clusters:
By default, WebLogic Server allows deployment to a partial cluster. If one or more of the Managed Servers in the cluster are unavailable, the following message may be displayed:
Unable to contact “servername”. Deployment is deferred until “servername” becomes available.
When the unreachable Managed Server becomes available, deployment to that server instance will be initiated. Until the deployment process is completed, the Managed Server may experience failures related to missing or out-of-date classes.
You can ensure that deployment is only performed if all Managed Servers in the cluster are reachable by setting ClusterConstraintsEnabled. When ClusterConstraintsEnabled is set to “true”, a deployment to a cluster succeeds only if all members of the cluster are reachable and all can deploy the specified files. See Enforcing Cluster Constraints with Two-Phase Deployment in Deploying WebLogic Server Applications.
It is possible to target a pinned service to multiple Managed Servers in a cluster. This practice is not recommended. The load-balancing capabilities and scalability of your cluster can be negatively affected by deploying a pinned service to multiple Managed Servers in a cluster. If you target a pinned service to multiple Managed Servers, the following message is printed to the server logs:
Adding server servername of cluster clustername as a target for
module modulename. This module also includes server servername that
belongs to this cluster as one of its other targets. Having multiple
individual servers a cluster as targets instead of having the entire
cluster as the target can result in non-optimal load balancing and
scalability. Hence this is not usually recommended.
There are several methods for configuring a clusters:
The Configuration Wizard is the recommended tool for creating a new domain or cluster. See “Overview of Creating a New Domain Using the Configuration Wizard” in Creating WebLogic Domains Using the Configuration Wizard. See “Customizing the Environment” for information on creating and configuring a cluster.
The Administration Console is a graphical user interface (GUI) to the BEA Administration Service. It allows you to perform a variety of domain configuration and monitoring functions.
You can write a program to modify the configuration attributes, based on the configuration application programming interface (API) provided with WebLogic Server. This method is not recommended for initial cluster implementation.
The WebLogic Scripting Tool (WLST) is a command-line scripting interface that system administrators and operators use to monitor and manage WebLogic Server instances and domains. For more information, see WebLogic Scripting Tool.
JMX is the Java EE solution for monitoring and managing resources on a network. BEA WebLogic Server provides a set of MBeans that you can use to configure, monitor, and manage WebLogic Server resources through JMX.