An Oracle DBA's Guide to WebLogic Server
Like it or not, knowledge of WebLogic is now part of the DBA role. You don’t have to know a great deal to be useful with basic WebLogic setups, but the whole Fusion Middleware stack is big and complicated. Once you step beyond the basics, IMHO it is time for you to hire a full time Middle Tier Administrator.
The purpose of this article is to introduce some of the concepts of WebLogic Server, providing links to more specific articles. I think of it as the type of thing I wish I had read during my first hour of learning WebLogic Server.
- Introduction to Web Application Infrastructure
- Definition of WebLogic Components
- WebLogic Installation
- WebLogic Configuration (Create Domain)
- WebLogic Configuration (Start/Stop)
- WebLogic Configuration (AdminServer)
- WebLogic Configuration (WLST)
- Forms and Reports Services
- Application Development Framework (ADF)
- Cloud Control
Introduction to Web Application Infrastructure
When we think of the top-level view of infrastructure to support web applications, we are normally thinking about a situation like this.
The client browser connects to your systems via the internet or an intranet. Typically you would expect your SSL termination to happen at a load balancer, reverse proxy, basic web server. You would not expect your application servers or database servers to be visible to the outside world directly.
Focussing more on the infrastructure itself, you might expect a basic system to look something like the following. The diagram shows two of every element to indicate they should be made resilient in some way, as should the firewalls.
Requests come through a site firewall and are forwarded by a load balancer to a reverse proxy, which provides SSL termination and hides the real machine names and ports of the services they support. If the load balancers can provide SSL termination and reverse proxy functionality, then the separate reverse proxies are unnecessary. Requests are reverse proxied through to a more secure network, which holds the application servers, such as WebLogic Server. In turn, the application servers will contact the database servers.
Definition of WebLogic Components
All the WebLogic components are Java processes.
- A domain is a top-level definition of an environment.
- It contains all the shared configuration and resources for the managed servers within the domain.
- It must have a single AdminServer.
- It can have zero-to-many managed servers.
- Managed Servers can be clustered across multiple machines (HA).
- Can have all applications under a single domain or separate domains for different functional areas. The choice is yours.
- Provides web-based administration interface for the domain.
- Provides script-based administration using WebLogic Scripting Tool (WLST).
- Managed servers can run without it AdminServer, by using local configuration.
- When a managed server starts, it attempts to get the latest config from the AdminServer.
- Managed Server:
- The JVM that actually runs your app. (similar to OC4J)
- Applications can be deployed to one or more managed servers or to all managed servers in a cluster.
- Managed servers can be clustered to improve high availability (HA).
- Node Manager:
- Optional Java process to help control managed servers. Script-based version available, but don’t use it.
- Necessary when dealing with clusters spread across servers.
- Can use a single node manager per server. WebLogic 12c encourages domain-specific node managers.
The following diagram may help to solidify the relationships between the components.
There are many ways to organise your domains. You could use a single domain for your whole company, split based on functional areas or split on technology type. The latter may be useful when trying to minimize licensing costs.
The only major prerequisite for a basic WebLogic Server installation is a JDK, which must be installed prior to WebLogic installation. Depending on the version of WebLogic being used, you have a choice of which JDK to use.
- WebLogic 11g (JDK6 or JDK7)
- WebLogic 12c (JDK7 or JDK8)
When using JDK6, use JRockit for servers and HotSpot for desktops. The only option for JDK7 is HotSpot, which now includes all the cool things from JRockit. Always use Oracle’s JDK, not OpenJDK.
You can download the relevant version of WebLogic Server from OTN or eDelivery. I always use the generic JAR file, which supports 64-bit environments.
Before installing, you need to decide on some basic paths for the fusion middleware home, domains and applications. Assuming "ORACLE_BASE=/u01/app/oracle", you might use something like the following.
By default the installer will suggest the domains and applications should be placed in a directory called "user_projects" under the middleware home. This is not ideal as any upgrade will leave these configuration directories under an old middleware home.
This article gives an example of the installation process itself.
WebLogic Configuration (Create Domain)
I often use the Configuration Wizard to create domains as it provides a simple GUI interface. It is started using the following command.
Basic domain management is described in these articles. There are some slight differences between WebLogic versions.
- WebLogic Server 11g and 12cR1 : Create, Extend and Remove Domains
- WebLogic Server 12cR2 : Create, Extend and Remove Domains
Creation of clustered domains is described in the following articles.
I would suggest always running in "Production Mode" on servers, even if they are development servers. It means you can adopt a single approach all the way through your development, test and production environments.
WebLogic Configuration (Start/Stop)
When a domain is created it includes several scripts allowing you to start and stop components.
$WLS_HOME/server/bin/startNodeManager.sh $DOMAIN_HOME/bin/startWebLogic.sh $DOMAIN_HOME/bin/stopWebLogic.sh $DOMAIN_HOME/bin/startManagedWebLogic.sh <managedServer> $DOMAIN_HOME/bin/stopManagedWebLogic.sh <managedServer>
Examples of their use are in the installation and configuration articles linked from this article.
WebLogic Configuration (AdminServer)
Once the AdminServer of a domain is started, you have access to the web-based administration interface using the following style of URL.
The administration interface is relatively intuitive. The pages are broken down into several sections:
Change Center : This is situated at the top-left of every page. When running in production mode, no changes can be made to the configuration without first clicking the "Lock & Edit" button. Once the necessary changes are made, click the "Activate Changes" button and all modifications will be applied. If you decide not to apply the changes, you can click the "Release Configuration" button to revert all the changes. This effectively makes all changes transactional.
Domain Structure : A tree with each node representing a different feature or group of configuration options. Clicking on a particular node will make the main display pane change to be relevant to that node.
Main Pane : This the large section of the page that contains all the configuration details. It displays the top-level configuration for each node of the domain structure tree. This pane often contains many tabs and sub-tabs as well as drill-downs in some cases.
How do I... : Each screen comes with context-sensitive how-to style suggestions, which can be very useful when you are first starting to use WebLogic. If in doubt, look at the suggested links in this section.
System Status : Each page has a top-level system status display.
Clicking on the "Servers" node displays the current status of the AdminServer and all the managed servers. The "Configuration" tab allows you to create, clone or delete managed servers, while the "Control" tab allows you to start and stop them. Clicking on the managed server name allows you to drill down into the detailed configuration options.
The "Clusters" node displays basic information about clusters belonging to the domain. This screen allows you to create, clone or delete clusters. Clicking on the cluster name allows you to drill down into the detailed configuration options.
The "Machines" node displays information about node managers the domain can communicate with. This screen allows you to create, clone or delete references to node managers. Clicking on the machine name allows you to drill down into the detailed configuration options.
The "Deployments" node displays the applications that are currently deployed to the domain. This screen is the starting point to deploy, redeploy, undeploy, start or stop applications. Deployments can target individual managed servers, groups of managed servers or whole clusters. Clicking on the deployment (application) name allows you to drill down into the detailed configuration options.
The "Data Sources" node displays the data sources that are currently defined for the domain. This screen is the starting point to create, delete or reconfigure data sources. Data sources can target individual managed servers, groups of managed servers or whole clusters. Clicking on the data source name allows you to drill down into the detailed configuration options.
The "Security Realms" node is used to define authentication methods and security information available to the domain. Clicking on the realm name allows you to drill down into the detailed configuration options. Providers for a number of authentication methods, such as LDAP and Active Directory, are present.
If the domain has been extended with Fusion Middleware Runtime, you also have access to Enterprise Manager.
An example of this will be shown below.
WebLogic Configuration (WLST)
Although the administration web interface is quite useful, you quickly learn that some tasks you do very often require a lot of clicks to complete. To save time you may wish to script certain operations. Fortunately, WebLogic comes with a very powerful scripting tool called WebLogic Scripting Tool (WLST). Discussing this is beyond the scope of this article, but there are many articles on the internet about it.
Forms and Reports Services
Forms and Reports Services requires and existing WebLogic 11g installation as a prerequisite. The installation is very simple. Pick the inventory and middleware locations, then click the "Next" button a lot. You can see examples of the installation here.
- Oracle Forms and Reports 11gR2 Installation on Oracle Linux 5
- Oracle Forms and Reports 11gR2 Installation on Oracle Linux 6
The installation creates a "ClassicDomain" with Forms and Reports installed and running. The managed servers are controlled in the normal manner using the administration console.
Most of the Forms and Reports configuration can be done through Enterprise Manager.
If you’ve done Forms and Reports Services configuration on Oracle Application Server, the configuration files are all the same, but in different locations. You can read more about the configuration in this article.
Application Development Framework (ADF)
Application Development Framework (ADF) is a separate install on top of an existing WebLogic Server installation. ADF releases are separate to WebLogic Releases, but there are some dependencies so make sure you are using the correct version.
Installation is easy. Specify your middleware home and click "Next" a lot. You can see examples of the installations here.
- WebLogic Server 11g : ADF Application Development Runtime Upgrade on Oracle Linux
- WebLogic Server 12cR2 : ADF Application Development Runtime Installation on Oracle Linux
Once installed, there are extra options when you create or extend a domain.
Picking the "Oracle Enterprise Manager" option enables the Enterprise Manager URL.
Enterprise Manager is where you will find most of the performance monitoring tools.
Grid Control and now Cloud Control are built on WebLogic. Grid Control 11g required a separate WebLogic installation step, whereas the Cloud Control installation has WebLogic bundled, so it is very hands-off in comparison.
Cloud Control is a (big) ADF application, so administration from the console and Enterprise Manager is the same as any normal ADF application. Having said that, most of the time you should only have to start and stop the services.
You can see an example of installing Cloud Control and some basic management tasks here.
- Oracle Enterprise Manager Cloud Control 12c Release 3 Installation on Oracle Linux 5.9 and 6.4
- Oracle Enterprise Manager Cloud Control 12c Post-Installation Setup Tasks
For more information see:
Hope this helps. Regards Tim...