Oracle WebLogic Managed Servers Configuration

The purpose of this post is to set up Oracle WebLogic Server environment consisting of two managed servers running on separate machines within one domain. On a such prepared environment will be installed Java EE application suite. An installed Oracle WebLogic Server and appropriate JDK is here an assumption. The guide is focused on providing necessary steps to build up managed servers arrangement. This post is an extension to the “Local and remote EJB performance comparison” parts [4][5] and provides more technical aspects.

Introduction

There are two main server types: Administration Server (admin server for short) and Managed Server. Admin server, like the name suggests is to meet administration goals. This kind of server is used for resources and applications management and can also be used as a target for that management. However, in a production environment this server should be rather used only for administration tasks. The managed server should be used instead as a target for resources and application configuration. Following this approach, the admin server will be used to prepare managed servers and to deploy JEE application on managed servers. Overview of the discussed arrangement is in Figure 1. More information regarding severs definitions and purposes is in the location [1].

wls-mng-servs-suites

Figure 1: WebLogic managed servers arrangement example

Pre-requirements

  1. Installed Oracle WebLogic Server (version 12c is preferred) with existing domain (e.g. base_domain) and admin server. Installation guide is available in [2].
  2. Installed JDK 6 or compatible to run WebLogic.

Environment used in this article

  1. Windows 7 64-bit
  2. JDK 1.6.0_29 64-bit
  3. Oracle WebLogic Server Version: 12.1.2.0.0 with default base_domain and admin server

Conventions

domain_home is used to address root catalog of a WebLogic domain

1. Starting up WebLogic

1.1. Starting admin server

Execute startWebLogic.cmd (startWebLogic.sh) script located in the domain_home

1.2. Starting node manager

To run a managed server in addition to the admin server there is required working Node Manager [3].

Execute startNodeManager.cmd (startNodeManager.sh) script located in the domain_home/bin

1.3. Logging in to admin console

WebLogic admin console is by default available in the following location:
http://hostname:port/console/login/LoginForm.jsp
where hostname refers to a host on which WebLogic is running and a port is a admin server listen port (7001 is the default value).
Example URL: http://localhost:7001/console/login/LoginForm.jsp

After login there is available WebLogic administration console home page (Figure 2).

weblogic-home

Figure 2: WebLogic administration console home page

2. WebLogic machines preparation

In this part will be created two WebLogic machines in the domain to enable hosting on them managed servers.

2.1. Creating machine

In order to create machine do the following:

  1. In the administration console expand Environment node in the Domain Structure tree on the left site.
  2. Select Machines node.
  3. Create new machine by clicking on New button (see Figure 3).
    new-machine-s1

    Figure 3: Starting creation of a new machine

  4. In this step provide new machine Name (suggested value on Figure 4 is Machine-0, must me unique) and then click Next.
    new-machine-s2

    Figure 4: Providing machine name

  5. Node manager properties. Default values should work properly with default installed node manager. Change values if necessary. To end up click on Finish.

    new-machine-s3

    Figure 5: Node manager properties

  6. When the process went properly the created machine is presented on the machine list (see Figure 6).new-machine-s4

    Figure 6: Machine list after creation new instance

Presented steps guide through creation process of a one machine. To create second instance follow these steps providing different values when necessary (only machine name must be unique). In this article we assume to have two machines: Machine-0 and Machine-1.

3. WebLogic managed servers preparation

The aim is to have two separate managed servers running on separate machines (Figure 1).

3.1. Creating managed servers

In order to create managed server do the following:

  1. In the administration console expand Environment node in the Domain Structure tree on the left site.
  2. Select Servers node.
  3. Create new server by clicking on New button (see Figure 7).
    new-serv-s1

    Figure 7: Starting creation of a new server

  4. Provide server properties: name must be unique, listen address can be empty (localhost) and listen port must be also unique (e.g. 7015). In this scenario server should not belong to a cluster. (See Figure 8). To end up invoke Finish.
    new-serv-s2

    Figure 8: Server properties

  5. WebLogic server list. After successful creation of a new managed server the list of servers looks similar to the list in Figure 9.
    new-serv-s3

Figure 9: Server list after creation managed server

Presented steps guide through creation process of one managed server. To create second instance follow these steps providing different values when necessary (server name and listen port must be unique; e.g. port 7016, name Server-1). In this article we assume to have two servers: Server-0 and Server-1.

3.2. Configuring managed servers

Servers association

Now just created servers need to be associated with previously prepared machines. Let’s assign Server-0 to Machine-0 and Server-1 to Machine-1.

In order to assign server to machine do the following:

  1. Locate managed server (e.g. Server-0) on the server list [Domain Structure-> Environment-> Servers] and click on the server position to view settings.
  2. In the settings screen for the server open Configuration and then General tab. Now select appropriate machine from list to set Machine property (see Figure 10). Click Save to persist changes.
    serv-set-machine

    Figure 10: Assigning machine to managed server

Follow these steps to associate second server-machine pair.

Tunnelling

Remote EJB invocations use t3 protocol. Managed servers need to have enabled this protocol.

In order to enable tunnelling protocol do the following:

  1. Locate managed server (e.g. Server-0) on the server list [Domain Structure-> Environment-> Servers] and click on the server position to view settings.
  2. In the settings screen for the server open Protocols and then General tab. Now select enable Enable Tunneling checkbox. Click Save to persist changes.

Enable this on both Server-0 and Server-1.

Start configuration

The com.softexploration.lab.ejb.performance.monitoring.remote.suite-0.0.1-SNAPSHOT.ear application expects certain systems properties. They can be provided in the Server-1 start configuration.

  1. Locate Server-1 on the server list [Domain Structure-> Environment-> Servers] and click on the server position to view settings.
  2. In the settings screen for the server open Configuration and then Server Start tab. Now enter into Arguments area following content:
    -DcontextFactory=weblogic.jndi.WLInitialContextFactory -DproviderURL=t3://localhost:7015 -DserviceJNDIname=java:global.com.softexploration.lab.ejb.performance.monitoring.local.suite-0.0.1-SNAPSHOT.com.softexploration.lab.ejb.performance.service.impl-0.0.1-SNAPSHOT.BusinessPerformanceServiceBean!com.softexploration.lab.ejb.performance.service.BusinessPerformanceServiceRemote

    Note
    Content values depend on actual configuration values (listening port, host name, application name).

  3. Click Save to persist changes and then restart this server.

3.3. Starting managed servers

Server after creation is by default in SHUTDOWN state. When servers are assigned to machines and node manager is working then servers are ready to turning them into RUNNING state.

In order to start managed server do the following:

  1. Locate managed server (e.g. Server-0) on the server list in the Control tab [Domain Structure-> Environment-> Servers->Control] and select the server’s position checkbox. Then click on Start button (see Figure 11).
    serv-start

    Figure 11: WebLogic servers control                   

  2. The “A request has been sent to the Node Manager to start the selected servers. “ message is displayed after clicking on Start. A request to start two servers can also be sent in a one go by selecting those servers on their checkboxes.
    After few seconds refresh servers list to see server status. Servers works properly when the state attribute in the table has RUNNING value (Figure 12).
    serv-running

      Figure 12: WebLogic servers list 

4. Enterprise application installation

There are two JEE applications to install. The first one is com.softexploration.lab.ejb.performance.monitoring.local.suite-0.0.1-SNAPSHOT.ear [1] which contains business service implementation module and local monitoring module.

The second is com.softexploration.lab.ejb.performance.monitoring.remote.suite-0.0.1-SNAPSHOT.ear [2] which contains remote monitoring module performing remote calls to EJB exposed by previous application – com.softexploration.lab.ejb.performance.monitoring.local.suite-0.0.1-SNAPSHOT.ear.

In order to deploy an EAR application on the WebLogic server do the following:

  1. Locate Deployments section [Domain Structure-> Deployments] and click on Install button.
    install-1

    Figure 13: Deployments section                        

  2. Select an appropriate application to deploy (e.g. com.softexploration.lab.ejb.performance.monitoring.local.suite-0.0.1-SNAPSHOT.ear) on a file system. Click Next to continue.
    install-2

    Figure 14: Deployments section

  3. In this stage select Install this deployment as an application and then Next.
  4. Choose a managed server on which an application will be installed. For example choose Server-0 for local monitoring suite. Click Next to continue.

    install-3Figure 15: Selecting target server   

  5. In the Optional Settings section you can stay with default options. Click Finish.
  6. After successful installation is shown summary screen (Figure 16).

    install-4Figure 16: Deployments summary                      

Repeat these steps to install another application. The com.softexploration.lab.ejb.performance.monitoring.remote.suite-0.0.1-SNAPSHOT.ear should be installed on a different managed server e.g. Server-1 (step 4).

Summary

The initial reason to write this post were articles about EJB performance – “Local and remote EJB performance comparison” parts [4][5] . It was in this article an attempt to keep this text versatile enough. The presented guideline can be used for purposes other than mentioned EJB performance articles.

Resources

[1] com.softexploration.lab.ejb.performance.monitoring.local.suite-0.0.1-SNAPSHOT.ear

[2] com.softexploration.lab.ejb.performance.monitoring.remote.suite-0.0.1-SNAPSHOT.ear

References

[1] Understanding Oracle WebLogic Server Domains – http://docs.oracle.com/cd/E24329_01/web.1211/e24970/understand_domains.htm

[2] Installation Guide for Oracle WebLogic Server – http://docs.oracle.com/cd/E24329_01/doc.1211/e24492/toc.htm

[3] Configuring and Using Node Manager -http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/10-NodeMgr–4472/nodemgr.htm

[4] Local and remote EJB performance comparison – PART I

[5] Local and remote EJB performance comparison – PART II

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>