Exploring the intricacies of Oracle WebLogic Server 12c is a comprehensive journey starting with its installation, understanding the various management tools at your disposal, and diving into the administration of this robust platform. With Oracle WebLogic Server 12c's pivotal role in developing and deploying enterprise-level web applications, gaining a solid grasp on how to effectively manage this server is paramount. The highlight of this introduction rests on familiarizing oneself with the trio of management tools that are crucial for daily operations: the Administration Console, the Node Manager utility, and the WebLogic Scripting Tool (WLST). Each tool has its unique capabilities, from seamless server management to script-based configuration, enhancing the administrative experience. This tutorial doesn't just stop at tool introduction; it extends into applying these tools through practical scenarios using sample Oracle WebLogic Server 12c applications, setting a practical foundation for readers. To fully appreciate the depth of WebLogic Server 12c administration, an understanding of the server's product set, including Oracle WebLogic Server Standard Edition (SE), Enterprise Edition (EE), and the Oracle WebLogic Suite, is essential. Moreover, this guide aims to decode the critical terminology and architectural concepts pivotal for managing WebLogic Server 12c efficiently. The journey through WebLogic Server's administration is made comprehensive with discussions on server instances, domains, and the pivotal role of the Administration Server, preparing readers to manage and deploy applications with confidence. Breaking down these elements offers a pathway to mastering WebLogic Server 12c's administration, aiming to equip administrators and developers with the knowledge needed to manage complex environments effectively.
Question | Answer |
---|---|
Form Name | Weblogic Server Tutorial |
Form Length | 50 pages |
Fillable? | No |
Fillable fields | 0 |
Avg. time to fill out | 12 min 30 sec |
Other names | weblogic 12c tutorial pdf, weblogic pdf, indd, WebLogic |
CHAPTER
1
Installing Oracle WebLogic
Server 12c and Using the
Management Tools
2 Oracle WebLogic Server 12c Administration Handbook
The introduction to this book provided a quick outline of the Java Enterprise Edition (Java EE) and the nature of web applications for which you use Oracle WebLogic Server 12c. Since the primary goal of this book is for you to understand how to administer Oracle WebLogic
Server 12c, let’s begin by discussing key administration topics such as installing and upgrading Oracle WebLogic Server and becoming familiar with the administration tools you use day in and day out to manage the server. There are three major administrative tools that are going to be your
Oracle WebLogic Server: An Overview
Before you learn how to install, upgrade, and manage Oracle WebLogic Server, let’s quickly review the set of Oracle WebLogic Server 12c products. Following that is a brief summary of key terminology that will help you understand the components of an Oracle WebLogic Server 12c domain, a collection of Oracle WebLogic Server instances and related resources and services that are managed together as a single unit.
Oracle WebLogic Server 12c Product Set
Oracle WebLogic Server 12c is a component of Oracle Fusion Middleware 12c, which consists of several Oracle products that span business intelligence, collaboration tools, content management, and integration services. The underlying application server supporting these middleware applications is Oracle WebLogic Server 12c. Products such as Oracle SOA Suite and Oracle Fusion applications rely on Oracle WebLogic Server 12c to run their code.
Oracle offers three distinct products as part of the Oracle WebLogic Server 12c application family:
■■ Oracle WebLogic Server Standard Edition (SE)
■■ Oracle WebLogic Server Enterprise Edition (EE)
■■ Oracle WebLogic Suite
Oracle WebLogic Server Standard Edition
The Oracle WebLogic Server Standard Edition (SE) is a
Chapter 1: Installing Oracle WebLogic Server 12c and Using the Management Tools 3
Oracle WebLogic Server Enterprise Edition
Oracle WebLogic Server EE is the core application server designed for
Oracle WebLogic Suite
Oracle WebLogic Suite integrates the core WebLogic Server application server within the Oracle WebLogic Suite Java Infrastructure. The Oracle WebLogic Suite offers support for dynamic scale- out applications with features such as
■■ Oracle WebLogic Server EE
■■ Oracle Coherence (provides
This book deals exclusively with the Oracle WebLogic Server EE 12c product. (I refer to it simply as WebLogic Server in the rest of the book.) You manage WebLogic Server essentially the same way regardless of the operating system it is running on. This book uses examples run on a Windows installation of WebLogic Server; however, where necessary or relevant, certain tasks or commands are also shown for
Note
WebLogic Server uses a configured pool of JDBC connections to interact with databases. You can use any RDBMS that supports a JDBC
Terminology
Before we delve into the administration of WebLogic Server, I want to make sure you clearly understand the key terminology you’re going to encounter throughout the book. Some of the WebLogic Server terms and definitions are obvious, but others aren’t, such as the concept of a machine, for example.
WebLogic Server Instance
A WebLogic Server instance is a Java Virtual Machine (JVM) process that runs the Java code. The instance is the actively working component, receiving client requests and sending them on to the appropriate components, and sending the processed requests back to the originating clients. The server instance manages the resources necessary for applications, such as the JTA and JDBC services, to function. In each domain (to be explained in the following section), one instance serves as the Administration Server, which is your primary means of managing the domain. The rest of the WebLogic Server instances in a domain are called Managed Servers. If you have a domain with just one WebLogic Server instance, as is the case in a development environment, the single server instance functions as both the Administration Server and the Managed Server. Note that the terms WebLogic Server and WebLogic instance are often used interchangeably.
4 Oracle WebLogic Server 12c Administration Handbook
WebLogic Server Domain
A domain is a set of WebLogic Server instances (managed servers) that you manage with the Administration Server, which itself is nothing but another WebLogic Server instance, albeit a special one. Any configuration changes you make to a domain will apply to all members of that domain. Domains offer you ease of
A domain offers you the administrative ease you need to manage your WebLogic environment. A domain encompasses the Admin Server, Managed Servers (including those configured into WebLogic clusters), machines (servers), and all the services necessary to run your applications. The fact that a domain includes all the configuration data for the servers, deployments, and the physical network makes it easy to configure and manage complex, geographically dispersed WebLogic Server deployments. A domain lets you simultaneously deploy applications across multiple WebLogic Server instances located on heterogeneous servers and various networks, with different physical and network descriptions. Administering a domain makes it possible for you to configure high availability with the help of multiple WebLogic Server instances and administer various services spread across heterogeneous host servers.
The first step in using Oracle WebLogic Server to deploy applications is to create a domain. As mentioned earlier, a domain can just consist of a single Admin Server, with no Managed Servers at all, as is common in a development environment. A production cluster ranges over several physical machines to provide high availability and failover protection, but you can also configure a cluster on a single server for testing and development purposes. WebLogic Server stores the configuration information for a domain in the config.xml file, which is stored on the machine where the Admin Server runs and serves as the domain’s configuration file. The domain also contains security settings, log files, and startup scripts for the Admin and Managed Servers that belong to that domain. The WebLogic Configuration Wizard and the WebLogic Domain Wizard offer you extremely easy ways to create domains, as well as the servers and clusters that belong to that domain.
Note
Each Managed Server contains a local copy of its domain configuration. Upon startup, it synchronizes its configuration with the Admin Server. Similarly, when you make domain configuration changes on the Admin Server, those changes are propagated to the Managed Server’s configuration.
Administration Server
A server is an instance of WebLogic Server that runs in its own JVM, and the Administration (or Admin) Server is a special instance of WebLogic Server designed for managing the domain rather than running applications. There is a
You can deploy applications on the Admin Server, but unless you’re operating in a purely developmental environment, use the Admin Server strictly for performing management tasks, not for deploying any applications. Although you can deploy applications on the Admin Server in a
Chapter 1: Installing Oracle WebLogic Server 12c and Using the Management Tools 5
development environment, it’s a best practice not to do so in a production environment. For one thing, you don’t want application work to compete with administrative work in a production environment. You also want to firewall the Admin Server separately so external clients can’t access it.
The Admin Server is critical to the functioning of a WebLogic Server domain because it manages the domain configuration, including the servers that are part of the domain, as well as all the applications and services you deploy to the various servers. Apart from this management of the domain configuration information, the Admin Server has all of the functionality of a Managed Server; in fact, an Admin Server runs the same code and is managed internally the same way as a Managed Server. The Admin Server hosts the Administration Console, which is a web application front end used for configuring, monitoring, and managing a domain. You can access the Administration Console with any supported browser that can access the Admin Server. All WebLogic system administration tools and APIs interact with the Admin Server. If you install the optional Node Manager service, the Admin Server communicates with the Node Manager service on each machine to talk to the Managed Servers running on that machine.
Managed Server
Managed Servers are the workhorses of WebLogic Server. Any additional servers you create after the creation of the default Admin Server are Managed Servers. The Managed Server contacts the Admin Server upon startup, to get its configuration and deployment settings. For this reason, you should always start the Admin Server before you start a Managed Server. Once a Managed Server starts running, it operates completely independently from the Admin Server.
Although you can deploy a Java EE application to the Admin Server itself, the recommended approach is to deploy applications to the Managed Servers. In a production environment, it’s common to run multiple Managed Servers as part of a cluster. A Managed Server hosts your Java EE applications, as well as all related resources and services such as Java Database Connectivity (JDBC) connection pools and data sources, Java Transaction API (JTA) transaction services, and Java Messaging Service (JMS) connection factories that are necessary to support application deployments. On startup, a Managed Server contacts the Admin Server to retrieve any configuration changes since the Managed Server was last shut down. A Managed Server can continue to run, however, and it’s even possible to start it in the absence of an Admin Server. Chapter 2 shows how you can start a Managed Server without a running Admin Server, in the special Managed Server Independence (MSI) mode. The MSI mode is enabled by default, and it allows the Managed Server to start using its locally cached configuration without having to contact the Admin Server for this information.
WebLogic Server Cluster
A WebLogic Server cluster is a group of WebLogic Server instances consisting of multiple Managed Servers that run simultaneously. The multiple Managed Servers work together to provide replication services for one another, and the Admin Server isn’t generally a part of any cluster. Most production deployments use clusters to increase reliability and scalability through load distribution and high availability. To achieve the high availability capability, you deploy resources and services in a homogeneous fashion on each of the Managed Servers that are part of a cluster. Clusters host applications that respond to HTTP requests that are routed to the cluster through a hardware load balancer. You can also set up load balancing on a WebLogic Server instance or a
6 Oracle WebLogic Server 12c Administration Handbook
Note
The simplest domain will consist of just one
A WebLogic Server domain can consist of multiple Managed Servers that either are or are not part of a cluster, or it can consist of multiple
How does one design a domain? Once you satisfy the simple requirement that you must
install the same version of WebLogic Server for all the Managed Server instances in a cluster, it’s easy to design a cluster. Although a WebLogic Server cluster can run entirely on a single machine, to take advantage of the high availability features, a cluster’s member servers are typically installed on two or more physical machines. To increase a cluster’s capacity, you can either add more Managed Server instances to the existing cluster architecture, or you can add more physical machines to the cluster, with the additional machines hosting new Managed Server instances, of course. Managed Servers can serve as backups for services such as JTA and JMS that another Managed Server in the same cluster hosts.
There’s really no hard and fast rule for organizing your domains; one way to organize domains is to create separate domains to handle different types of work. For example, you can have one domain dedicated to online shopping and another to support your internal
It’s sometimes easy to get confused as to how a cluster relates to a domain. Just remember that a domain is simply a set of WebLogic Server instances, some of which may be clustered and some not, and that a domain can contain multiple clusters.
Coherence Cluster
A domain may also include Coherence Clusters, which are groups of cluster nodes that share a group address to facilitate communication among the nodes. In addition, a WebLogic Server domain may also include a Managed Coherence Cluster, which is any WebLogic Managed Server assigned to a Coherence Cluster.
Chapter 1: Installing Oracle WebLogic Server 12c and Using the Management Tools 7
Machine
A machine in the WebLogic Server context is the logical representation of the computer that hosts one or more WebLogic Server instances (servers). The Admin Server uses the machine definitions that you create to start remote servers through the Node Managers that run on those servers. A machine could be a physical or virtual server that hosts an Admin or Managed Server that belongs to a domain. You’ll see later in the book that you must define a machine first if you want the Admin Server to use the Node Manager service to monitor, start, and stop the Managed Servers running on a server. In a sense, a machine in a WebLogic Server environment is more or less equivalent to an instance of a Node Manager, and this is essentially the concept that a machine represents. WebLogic clusters make use of the machines you define in order to decide the optimal way to replicate session data on a different server that is part of a cluster.
Network Channels
Network channels are an optional feature that allows you to separate different classes of network traffic. You can make use of separate network channels to separate server and client traffic and direct it to different listening ports or addresses. If you need to allow both secure and nonsecure traffic on the same server, you can create multiple channels to support the diverse traffic with different security protocols. You can also use network channels to manage quality of service by using weighted,
Node Manager
The Node Manager is an optional process that runs on a machine and manages the availability of all servers that run on that machine. Node Managers help you remotely start, stop, suspend, and restart Managed Servers. The Node Manager works with the Admin Server using a secure channel and lets you manage the availability, as well as monitor the health, of all Managed Servers in a single domain. The Managed Servers that the Node Manager controls can be independent servers or they can be members of a cluster. The Node Manager monitors remote Managed Servers and is capable of automatically restarting them when they fail. It also kills Managed Servers that exhibit unstable behavior. It is recommended that you install a Node Manager service on each machine that hosts a Managed Server. Managing the servers with Node Manager is actually a key requirement for configuring automatic server migration in a cluster following a server failure, as explained in Chapter 7. In Chapter 2, I explain how you can use Node Manager and the WebLogic Scripting Tool (WLST) together to perform various administrative tasks.
Virtual Host
A virtual host relies on the Domain Name System (DNS) to map hostnames to the IP address of a single server or a cluster of servers. By doing so, multiple domain names can be hosted on your server wherein different web applications can be assigned to different virtual hosts, effectively sharing all resources and being differentiated only by their hostnames.
Work Manager
A Work Manager helps you manage the WebLogic Server instance workload, specifically by letting you prioritize work execution, which you do by defining request classes and constraints. You can configure a Work Manager at the domain level (using a global Work Manager) or at the application or module level.
8 Oracle WebLogic Server 12c Administration Handbook
Services
Following are some of the main services used in a WebLogic environment:
■■ JDBC (Java Database Connectivity) enables Java programs to handle database connections established through connection pools.
■■ JMS (Java Messaging Service) is a standard API that enables applications to communicate through enterprise messaging systems.
■■ JTA (Java Transaction API) specifies standard Java interfaces between transaction managers and the parties in a distributed transaction system.
Tip
You can create Jolt Connection Pools to enable your applications to connect to Oracle Tuxedo domains. Jolt clients will then manage requests from your applications to the Oracle Tuxedo Services.
Deployment
When you want to make a Java EE application or a
Note
Oracle WebLogic Server 12c fully supports Oracle Real Application Clusters (RAC). Chapter 4 shows you how to configure data sources to connect to Oracle RAC database services.
Security Realm
You use security realms to protect WebLogic Server resources. A security realm is simply a logical container for your users, groups, roles, security policies, and security providers. It’s the security realm that authenticates users and determines which resources they can access. WebLogic Server uses a default security realm named myrealm. In the default security realm, the Admin Server stores the domain security data in an LDAP server, but you can also choose an RDBMS store for this instead. The Managed Servers replicate this LDAP server, and when the Admin Server fails, it can use their copy of the LDAP server for providing security services to the deployed applications.
When you create a domain, the username/password credentials you provide are used by the Configuration Wizard to seed the security realm myrealm. The username you provide will be the initial administrative user in myrealm. When you start WebLogic Server, it uses the default security realm to authenticate usernames. You can configure the server to use other security realms, but you must always specify one of them as the default security realm.
If these simple definitions of the key WebLogic Server terminology don’t satisfy your curiosity, not to
Chapter 1: Installing Oracle WebLogic Server 12c and Using the Management Tools 9
Important WebLogic Server Concepts
In order to fully comprehend how WebLogic Server works and to get the best performance out of it, it’s important to understand several concepts. The most significant concepts are discussed in the following section.
Execute Threads and Queues
Understanding the internal architecture of Oracle WebLogic Server is important, particularly in terms of knowing how the server performs its work of satisfying user requests. When a client sends a request to WebLogic Server, the actual work to satisfy that request is performed by a Java thread called an execute thread. A user can submit work to WebLogic Server using an HTTP- based request to the servlet engine or a request for Remote Method Invocation (RMI) access to objects such as Enterprise JavaBeans (EJBs). When a server process starts, it binds itself to a port and assigns a listen thread to the port to listen for incoming requests. Once the request makes a connection, the server passes control of that connection to the socket muxer. The socket muxer reads requests off the socket and places the work requests into the
Oracle WebLogic Server uses socket muxers, which are software modules, to read incoming requests on the server. Muxers read messages from the network, bundle them into a package of work, and queue them to the Work Manager, which then finds a thread on which to execute the work and makes sure the response gets back to the same socket from which the request came.
There are two types of
You can tell if you’re using a native muxer or a Java muxer by looking at the messages that
involve the execute thread. If you’re using the native muxer, the server error messages will refer to it as weblogic.socket.EPollSocketMuxer, whereas if you’re using the Java muxer, you’ll see weblogic.socket.SocketMuxer instead. Note that the EPollSockerMuxer is associated only with a JRockit JVM operating on a Linux server. You’ll see the word poll in the case of a native muxer because it uses a polling mechanism to query a socket for data. Native muxers are seen as providing superior performance, especially when scaling up to large user bases, because they implement a nonblocking thread model. When administering WebLogic Server instances, you’ll frequently encounter the