A WebLogic domain is an important administrative feature for a WebLogic Server administrator to understand because it defines the administrative boundaries of a WebLogic Server's environment. All applications that are deployed to WebLogic Server are deployed and managed in the context of a WebLogic domain. A WebLogic domain is composed of one or more WebLogic Servers, where one server is configured as the administration server and all additional servers in the same domain are configured as managed servers , which can exist independently or in the context of one or more WebLogic clusters. A WebLogic cluster is essentially two or more managed servers that share their resources to provide scalability and high-availability solutions for applications. WebLogic clusters are discussed in more detail in Chapter 25, "Implementing Highly Available and Scalable Solutions Using the WebLogic Cluster." The types of WebLogic Server instances that constitute a WebLogic domain are shown in Figure 24.1. Figure 24.1. This WebLogic domain contains an administration server, two independent managed servers, and a WebLogic cluster.
If a WebLogic domain contains a standalone administration server, that WebLogic Server instance will function as an administration server as well as a managed server. This is a common configuration for developers who require their own WebLogic development environment, or for anyone who is becoming familiar with WebLogic Server because this is the easiest WebLogic domain configuration to implement. WebLogic administrators have the option to manage their entire WebLogic Server environment as a single domain. Alternatively, administrators can opt to define multiple mutually exclusive domains based on different administration/monitoring, business, or technical criteria. Scenarios in which it may be necessary to define multiple domains include the following:
Having multiple mutually exclusive WebLogic domains does not imply that applications in those domains cannot communicate with each other. It just defines independent administration environments for a select number of WebLogic Server instances. If you decide to create multiple domains to manage your WebLogic environment, you should keep the following caveats in mind:
The Relationship Between Administration and Managed ServersThe role of the administration server is to run the administration service for the entire domain, providing a central control for configuring, managing, and monitoring all aspects of a WebLogic domain, including
The configuration information for the entire WebLogic domain is maintained by the administration server in a configuration repository, which currently exists as an XML file named config.xml . The config.xml file is, by default, located in the root of the directory from which the administration server is launched, and can be viewed using a Web browser or any XML editor. The config.xml file is discussed in detail in the next section. The role of a managed server is to execute the applications that are deployed to its WebLogic domain and make available their status to the administration server. Upon startup, managed servers
The configuration settings that are received by a managed server from an administration server include the config.xml and the SerializedSystemIni.dat files. Upon receiving these files, a managed server always caches them to its root directory on the local file system. You also have the option to manually copy these files from the administration server's root directory to the managed server's root directory. By default, the directory from which an administration or managed server is launched is considered its respective root directory. Without the presence of these files, you cannot start a managed server. By default, the encrypted boot.properties file, which enables WebLogic Server to start up while bypassing the startup prompt for username and password, is not automatically copied from the administration server to any managed server. If you want to use this file in the startup of your managed servers, you will need to manually copy the file from the root directory of the administration server to the root directory of your managed server. After the initial startup and shutdown of a managed server, if the administration server becomes unavailable before a managed server is started, these cached configuration files are used to start the managed server. However, the managed server cannot persist any changes of its state or even be managed or monitored until its designated administration server is available again. Managed servers that are started in this manner are in Managed Server Independence ( MSI ) mode. When an administration server is started, it queries its running-managed-servers.xml file to identify the managed servers that were registered with it so that they can be notified to reregister with the administration service. Tip If a managed server runs on the same machine as its administration server, the cached configuration files will be located in the same root directory of the administration server. If these files are not located in a directory from which the managed server is started, you can explicitly specify the location of the configuration files by using the -Dweblogic.RootDirectory= path startup option. It is only at startup that managed servers have a slight dependency on the availability of an administration server. When they are operational, the only consequence for shutting down an administration server is that the administration service will not be running, which has no effect on the execution of an application on the managed servers. Note When the administration service is not running, no changes can be made to the WebLogic domain's configuration. The relationship between the administration and managed servers is summarized in Figure 24.2. Figure 24.2. The relationship between the administration and managed servers in a WebLogic domain.
Tip To ensure the administration service does not present a point of failure or impede the performance for an application in a domain, BEA recommends you use a dedicated WebLogic Server instance within a domain as an administration server, with all applications deployed on the domain member managed servers. Administering a WebLogic Domain from an Infrastructure PerspectiveThe management of a WebLogic domain is, in essence, a collective management effort of all the subsystems (resources and services) of WebLogic Servers that constitute a domain. The management capabilities (configuration and monitoring) of these subsystems as well as the applications they support are represented within WebLogic Server as MBeans (managed beans), which are implemented as Java classes in compliance with the Java Management Extension (JMX) specification as defined by Sun. The WebLogic administration service institutes management of subsystems such as the Web and EJB containers, JDBC, JMS, SNMP, and JTA, through their respective MBeans. Each WebLogic Server subsystem has a set of attributes that can be configured and monitored, with some subsystems providing additional management capabilities through administration methods. The role of an MBean is to provide an administration interface to these attributes and methods of a WebLogic Server subsystem, decoupling the subsystem from its management interface. As shown in Figure 24.3, one or more MBeans can be associated with each WebLogic subsystem, and can include the following elements: Figure 24.3. The elements of a WebLogic Server MBean.
The following three types of MBeans are used to manage a WebLogic domain:
Note The interface types for Runtime MBeans are located in the weblogic.management.runtime package. Because the administration server can also behave as a managed server, it also hosts the Configuration MBeans and Runtime MBeans that pertain to its own resources and applications. The system administration tools provided with WebLogic Server ”the Administration Console and weblogic.Admin utility ”provide an interface to the administration service, allowing you to manage a WebLogic domain without requiring any knowledge of the JMX API. However, knowledge of the WebLogic MBean interfaces is required to use the weblogic.Admin utility to interface with the administration service. The Administration Console is the preferred Administration tool, allowing you to manage and view the attributes of Administration and Runtime MBeans through a graphical interface (such as a Web browser). The Administration Console can manage only one WebLogic domain at a time; therefore, multiple WebLogic domains require their own instance of the Administration Console. From the Administration Console, you can also determine the MBean attribute you are working with by clicking the question mark next to an attribute field. However, the Administration Console enables you to manage and view only the attributes of Configuration MBeans. Alternatively, the weblogic.Admin tool enables you to manage and retrieve the attributes of Administration and Configuration MBeans, as well as invoke the methods of Runtime MBeans through the CREATE , DELETE , GET , SET , and INVOKE commands. Note For the syntax and usage of the weblogic.Admin commands, refer to the MBean Management Command Reference in the WebLogic Server Administration Guide. Both the Administration Console and the weblogic.Admin tools should provide you with the initial administration and monitoring capabilities you need for your environment. However, if you have administration requirements that are not satisfied by these tools, you can either write your own JMX extensions to the Administration Console, or you can purchase a suitable WebLogic Server administration tool provided by one of BEA's solution partners , which are listed on the BEA Web site. |