Designing a Domain

A WebLogic domain consists of an Administration Server together with any number of Managed Servers. The Administration Server allows you to configure all Managed Servers and resources within the domain. Every Managed Server needs to contact the Administration Server during startup so that it can obtain its configuration. For this reason, the Administration Server always should be started before any Managed Servers. The default startup script for a Managed Server takes the URL of the Administration Server as another command-line argument. For instance, you could start a Managed Server manually as follows:

startManagedWeblogic server-name http://localhost:7001

Even though the Administration Server is critical for administering all domain resources, it is possible in certain cases to start a Managed Server in the absence of the Administration Server.

Subsets of the Managed Servers within a domain may be placed in a cluster. Thus, a domain can consist of an Administration Server, any number of Managed Servers, and multiple clusters of these Managed Servers.

WebLogic allows you to create a domain that consists of a standalone Administration Server. Typically, this configuration will be used only in development environments. In this case, your applications will be deployed (and targeted) to the single WebLogic Server instance effectively, you are hosting applications on the Administration Server.

In general, you should deploy your applications to Managed Servers only, and leave the Administration Server to focus on the management tasks. In a typical production environment, the Administration Server will reside on a different physical machine for improved security and failover. You should take special care to ensure the availability of the Administration Server because a domain cannot be managed without it. Later, we shall see how to back up the domain's configuration data, and how to use the backup to restore the Administration Server on a different machine while still retaining control of the Managed Servers.

Managed Servers within a domain are assigned to machines. A machine (in WebLogic terminology) is a logical entity within a domain that represents the physical machine that hosts a Managed Server in the domain. A machine may have more than one WebLogic instance installed and running. The machine definition allows the Administration Server to connect to the Node Manager and use it to monitor, start, stop, and restart Managed Servers that belong to the domain. In addition, a WebLogic cluster uses the machine definitions to determine locality information and decide how best to replicate session data on separate hardware.

Figure 13-1 illustrates all of these concepts via a diagram of a WebLogic domain with multiple Managed Servers.

Figure 13-1. A domain

figs/wblgc_1301.gif

The figure shows a WebLogic domain consisting of a single Administration Server running on Machine A, and multiple Managed Servers running on machines M1-M3. Machine M3 hosts more than one Managed Server, both part of the same domain. The domain also includes a WebLogic cluster, whose members are the Managed Servers Server1 and Server2. Each machine running a Managed Server hosts a single Node Manager that monitors the health of all of the servers on the machine and controls restarting of failed servers. Finally, network channels control the various aspects of communication between all servers and machines. This includes the listen addresses, port numbers, protocols, and NICs for each server in the domain.

A domain additionally can define a number of J2EE resources. For instance, the JDBC connection pool and JMS servers are components made available to applications within a domain. A WebLogic installation can define multiple domains, but there are certain restrictions as well. Because a domain "owns" the resources and services configured for it, domain resources cannot be shared across domains. For instance, multiple domains cannot share a resource such as a JDBC connection pool. Instead, you need to define a connection pool for each domain. A WebLogic cluster is a domain resource as well. Hence, a cluster cannot contain Managed Servers straddling different domains; they must all belong to the same domain. This means that application failover within a cluster can occur only among the Managed Servers in the same domain.

When you're setting up multiple domains, it is important that you are aware of these restrictions and keep all of these aspects in mind. A domain is a WebLogic administrative unit, a mechanism for describing your WebLogic environment. This includes the Managed Servers, the machine configuration, the network resources, and the services needed by the applications. There are no hard and fast rules for how you set up a domain, but a good design eases administration, considers the security requirements of your applications, and provides for performance and scalability. A domain should be designed to ease your management tasks while providing the required configuration of machines and level of service. Therefore, you might need to create multiple domains depending on the geographical location of your servers, or depending on the boundaries of your application.

Introduction

Web Applications

Managing the Web Server

Using JNDI and RMI

JDBC

Transactions

J2EE Connectors

JMS

JavaMail

Using EJBs

Using CMP and EJB QL

Packaging and Deployment

Managing Domains

Clustering

Performance, Monitoring, and Tuning

SSL

Security

XML

Web Services

JMX

Logging and Internationalization

SNMP



WebLogic. The Definitive Guide
WebLogic: The Definitive Guide
ISBN: 059600432X
EAN: 2147483647
Year: 2003
Pages: 187

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net