Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

D80149GC11 sg1 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 340

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
o n
Oracle WebLogic Server 12c:
an
Administration
s eฺ
I
) h a id
x u
o m e t G Guide – Volume 1
ฺm Student
n
ro ฺc tud
se is S
r u z@ se th
n eฺc to u
z (re
Cru
e ne
R

D80149GC11
Edition 1.1
February 2014
D85487
Authors Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Bill Bell Disclaimer

Elio Bonazzi This document contains proprietary information and is protected by copyright and
TJ Palazzolo other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
Steve Friedberg in any way. Except where your use constitutes "fair use" under copyright law, you
may not use, share, download, upload, copy, print, display, perform, reproduce,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

publish, license, post, transmit, or distribute this document in whole or in part without
Technical Contributors the express authorization of Oracle.
and Reviewers
The information contained in this document is subject to change without notice. If you
Mark Lindros find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
Will Lyons warranted to be error-free.
Serge Moiseev
Restricted Rights Notice
Matthew Slingsby
Angelika Krupp If this documentation is delivered to the United States Government or anyone using
n s e
ce
the documentation on behalf of the United States Government, the following notice is
Kevin Tate applicable:
li
Takyiu Liu
r a ble
fe
U.S. GOVERNMENT RIGHTS

s
Jenny Wongtangswad The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or
Juan Quezada
tr a n
disclose these training materials are restricted by the terms of the applicable Oracle

n-
license agreement and/or the applicable U.S. Government contract.

no
Radek Felcman

a
Trademark Notice

s eฺ
Matt Heimer
Saskia Nehls
) ha id
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names

Juan Adauco Quezada x u


may be trademarks of their respective owners.

ฺm nt G
co m d e
o ฺ tu
Editors
ser i s S
z@ se th
Aju Kumar
Malavika Jinka r u
ฺc to u
e n e
Graphic(r
z
ru Bopaiah
e C
Seema
n
Re Publishers
Giri Venugopal
Jayanthy Keshavamurthy
Contents
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1 Course Overview
Objectives 1-2
Target Audience 1-3
Introductions 1-4
Course Schedule 1-5
Course Practices 1-7
n s e
Classroom Guidelines 1-8
lice
For More Information 1-9
r a ble
Related Training 1-10
n sfe
- tra
2 WebLogic Server: Overview
no n
a
s eฺ
a
Objectives 2-2
Distributed Systems 2-3
x ) h uid
m ฺm nt G
Java Platform Enterprise Edition 2-4
ฺ co u d e
o t
Oracle WebLogic Server 2-5
JVM 2-7
ser i s S
r u z@ se th
(Possible) System Architecture 2-8

n e ฺc to u
WebLogic Server Domain 2-9

z( re
Administration Server 2-10

C r uManaged Servers 2-11

e ne Node Manager 2-12


R Machines and Clusters 2-13
WebLogic Server Application Services 2-14
WebLogic Server Application: Example 2-15
WebLogic Server Administrative Tools 2-16
WebLogic Server Administration Console 2-18
WLST 2-19
WLDF 2-22
WLDF Monitoring Dashboard 2-23
Enterprise Manager Cloud Control 2-24
Quiz 2-25
Summary 2-27

iii
3 Installing and Patching WebLogic Server
Objectives 3-2
Determining Supported System Configurations 3-3
Ensuring Your System Meets Requirements 3-4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

When Not All FMW Is the Same Version 3-5


WebLogic Server Installers 3-6
Generic Installers 3-7
What Is Oracle Coherence? 3-9
FMW Installation Flow 3-10
WebLogic Server Installation Modes 3-11
Installing WebLogic Server on Linux (Graphical Mode) 3-12
n s e
Installation Problems 3-18
lice
ble
Sample Installation Directory Structure 3-19
Uninstalling WebLogic Server 3-20
fer a
a n s
tr
Applying Patches by Using OPatch 3-21
n-
no
Quiz 3-22
Summary 3-24 a
s eฺ
) ha id
Practice 3-1 Overview: Installing WebLogic Server 3-25
x
ฺm nt G
Practice 3-2 Overview: Patching WebLogic Server 3-26u
co m d e
o ฺ tu
4 Creating Domains
s er i s S
Objectives 4-2
u @ e th
zQuestions
ฺ r
c o us 4-3
e
Domain Planning
n Address and
VirtualeIP
r t Virtual Host Name 4-6
(
zDomain Mode: Development 4-7
C r u
ene
Domain Mode: Production 4-8
R Domain Creation Tools 4-9
Domains Are Created from Templates 4-10
Creating Domains 4-11
Where to Place the Domain 4-12
Creating a Domain with the Configuration Wizard 4-13
Admin Server Listen Address 4-20
Creating a Domain with the Configuration Wizard 4-21
Domain File Structure 4-29
Creating a Domain to Support FMW Components 4-30
The Domain on Other Hardware 4-32
Creating the Domain Archive: Pack 4-33
Using the Domain Archive: Unpack 4-34

iv
Quiz 4-35
Summary 4-37
Practice 4-1 Overview: Creating a New Domain 4-38
Practice 4-2 Overview: Copying a Domain to a New Machine 4-39
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

5 Starting Servers
Objectives 5-2
WebLogic Server Life Cycle 5-3
Starting WebLogic Server with a Script 5-5
Creating a Boot Identity File 5-6
Stopping WebLogic Server 5-7
n s e
Suspend and Resume 5-8
lice
ble
Customizing Standard Scripts 5-9
WebLogic Server Options 5-10
fer a
a n s
tr
Changing the JVM 5-12
n-
no
JVM Options 5-13
Modifying the CLASSPATH 5-14 a
s eฺ
WebLogic Server Startup Issues 5-17
) ha id
Failed Admin Server 5-18 x
ฺm nt G u
co m d e
ฺ u
Restarting a Failed Admin Server: Same Machine 5-19
o
er i s S t
s
Restarting a Failed Admin Server: Different Machine 5-20

u z@ se th
Restarting a Failed Managed Server: Same Machine 5-21
r
e ฺc to u
Restarting a Failed Managed Server: Different Machine 5-22
n
z( re
Quiz 5-23

C r uSummary 5-25

ne
Practice 5-1 Overview: Starting and Stopping Servers 5-26
R e
6 Using the Administration Console
Objectives 6-2
Accessing the Administration Console 6-3
Administration Console Login 6-4
Basic Navigation 6-5
Tabular Data 6-6
Customizing a Table 6-7
Admin Console Preferences 6-8
Advanced Console Options 6-10
Administration Console Change Center 6-12
Admin Console: Creating Domain Resources 6-13
Creating a Resource Example: New Server 6-14
Modifying a Resource Example: Server 6-17
Admin Console: Monitoring Domain Resources 6-19

v
Admin Console: Controlling Domain Resources 6-20
Enterprise Manager Cloud Control 6-21
Quiz 6-23
Summary 6-25
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Practice 6-1 Overview: Using the Administration Console for Configuration 6-26

7 Configuring JDBC
Objectives 7-2
JDBC: Overview 7-3
WebLogic JDBC Drivers 7-4
Global Transactions: Overview 7-5
n s e
Two-Phase Commit 7-6
lice
ble
JDBC Data Source 7-7
Java Naming and Directory Interface (JNDI) 7-9
fer a
a n s
tr
JNDI Duties of an Administrator 7-10
n-
no
Deployment of a Data Source 7-11
Targeting of a Data Source 7-12 a
s eฺ
Types of Data Sources 7-13
) ha id
x
ฺm nt G
Creating a Generic Data Source 7-14 u
co m d e
ฺ u
Non-XA Driver Transaction Options 7-17
o
er i s S t
s
Creating a Generic Data Source 7-18

u z@ se th
Connection Pool Configuration 7-21
r
e ฺc to u
Connection Properties 7-23
n
z( re
Testing a Generic Data Source 7-24

C r uOracle Real Application Clusters: Overview 7-25

ne
GridLink Data Source for RAC 7-26
R e GridLink , FCF, and ONS 7-27
GridLink and Services 7-28
GridLink and Single Client Access Name (SCAN) 7-29
Creating a GridLink Data Source 7-30
Common Data Source Problems 7-36
Basic Connection Pool Tuning 7-40
Quiz 7-43
Summary 7-45
Practice 7-1 Overview: Configuring a JDBC Data Source 7-46

8 Monitoring a Domain
Objectives 8-2
WebLogic Server Logs 8-3
WebLogic Server Log Locations 8-5
Log Message Severity Levels 8-6

vi
Understanding Log File Entries 8-8
Accessing the Logs from the Admin Console 8-9
Configuring Server Logging 8-11
Error Messages Reference 8-14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Log Filters 8-15


Creating a Log Filter 8-16
Applying a Log Filter 8-19
Subsystem Debugging 8-20
Debug Scopes 8-21
Debug Scopes: Examples 8-22
Admin Console: Monitoring Domain Resources 8-23
n s e
Monitoring the Domain 8-24
lice
ble
Monitoring All Servers 8-25
Monitoring Server Health 8-26
fer a
a n s
tr
Monitoring Server Performance 8-27
n-
no
Monitoring Data Source Health 8-28
a
s eฺ
Example Data Source Performance Attributes 8-29

) ha
JMX, MBeans, Managing, and Monitoring 8-30
id
Monitoring Dashboard 8-31 x
ฺm nt G u
co m d e
ฺ u
Monitoring Dashboard Interface 8-32
o
er i s S t
s
Views 8-33

u z@ se th
Built-in Views 8-34
r
e ฺc to u
Creating a Custom View 8-35
n
z( re
Anatomy of a Chart 8-36

C r uCurrent or Historical Data 8-37

ne
Quiz 8-38
R e Summary 8-40
Practice 8-1 Overview: Working with WebLogic Server Logs 8-41
Practice 8-2 Overview: Monitoring WebLogic Server 8-42

9 Node Manager
Objectives 9-2
Node Manager 9-3
Two Types of Node Manager 9-5
Node Manager Architecture: Per Machine 9-6
Node Manager Architecture: Per Domain 9-7
How Node Manager Starts a Managed Server 9-8
How Node Manager Can Help Shut Down a Managed Server 9-9
Configuration Wizard and Node Manager 9-10
Configuring the Java-Based Node Manager 9-12
Configuring Server Start and Health Monitoring Parameters 9-13

vii
Configuring the Java-Based Node Manager 9-15
Other Node Manager Properties 9-17
Node Manager Files 9-18
Enrolling Node Manager with a Domain 9-21
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

When Not to Use nmEnroll() 9-22


Reminder: Pack 9-23
Reminder: Unpack 9-24
Controlling Servers Through Node Manager 9-25
Node Manager: Best Practices 9-26
Quiz 9-28
Summary 9-30
n s e
Practice 9-1 Overview: Configuring and Using Node Manager 9-31
lice
r a ble
10 Deploying Applications
n sfe
Objectives 10-2
- tr a
no
Deploying Applications to WebLogic Server 10-3 n
a
s eฺ
Software Life Cycle and WebLogic Server 10-4
Java EE Deployments 10-5
) ha id
x
ฺm nt G
WebLogic Server Deployments 10-6 u
co m d e
ฺ u
Other Deployments 10-7
o
er i s S t
s
Deployment Terms 10-9

u z@ se th
Deployment Descriptors 10-12
r
e ฺc to u
Deployment Plans 10-13
n
z( re
Exploded Versus Archived Applications 10-14

C r u
Autodeploy 10-15

ne
Server Staging Mode 10-16
R e WebLogic Server Deployment Tools 10-17
Starting and Stopping an Application 10-19
Deploying an Application 10-21
Undeploying an Application 10-26
Redeploying an Application 10-28
Monitoring Deployed Applications: Admin Console 10-30
Monitoring Information Available from the Admin Console 10-31
Monitoring Deployed Applications: Monitoring Dashboard 10-32
Application Errors 10-33
Application Testing 10-34
Performance Testing Methodology 10-35
Load and Stress Testing 10-36
Load Testing Tools 10-37
The Grinder 10-38
The Grinder Architecture 10-39

viii
The Grinder Proxy 10-40
Agent Properties 10-41
The Grinder Console 10-42
Finding Bottlenecks 10-43
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Correcting Bottlenecks 10-44


Quiz 10-46
Summary 10-48
Practice 10-1 Overview: Deploying an Application 10-49
Practice 10-2 Overview: Load Testing an Application 10-50

11 Network Channels and Virtual Hosts


n s e
Objectives 11-2
lice
ble
Default WebLogic Networking 11-3
Additional Networking Scenarios 11-5
fer a
a n s
tr
Dedicating Network Interfaces to Specific Servers 11-6
n-
no
Using Multiple Ports on a Single Server 11-7
a
s eฺ
Isolating Administrative Communication 11-8
Isolating Cluster Communication 11-9
) ha id
Network Channel 11-10 x
ฺm nt G u
co m d e
ฺ u
Channel Selection 11-11
o
er i s S t
s
Creating a Channel 11-12

u z@ se th
Channel Network Settings 11-15
r
e ฺc to u
Monitoring Channels 11-16
n
z( re
Administration Port 11-17

C r u
Configure the Domain’s Administration Port 11-18

ne
Server Override of the Administration Port 11-19
R e Server Standby Mode 11-20
Virtual Host 11-21
Create a Virtual Host 11-22
Configure a Virtual Host 11-23
Configure a Virtual Host in DNS or the hosts File 11-24
Deploy to a Virtual Host 11-25
Run the Application Using the Virtual Host 11-26
Quiz 11-27
Summary 11-29
Practice 11-1 Overview: Configuring a Network Channel 11-30
Practice 11-2 Overview: Configuring the Administration Port 11-31
Practice 11-3 Overview: Creating a Virtual Host 11-32

ix
12 Clusters
Objectives 12-2
Cluster: Review 12-3
Benefits of Clustering 12-5
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Basic (Single-Tier) Cluster Architecture 12-6


Multi-Tier Cluster Architecture 12-7
Architecture Advantages and Disadvantages 12-8
Cluster Communication 12-10
Creating a Cluster: Configuration Wizard 12-12
Creating a Cluster: Administration Console 12-13
Adding Servers to the Cluster: Administration Console 12-14
n s e
Server Templates and Dynamic Clusters 12-15
lice
ble
Creating a Dynamic Cluster 12-17
Editing the New Dynamic Cluster 12-21
fer a
a n s
tr
Editing the New Server Template 12-22
n-
no
Dynamic Server Calculated Attributes 12-23
a
s eฺ
Dynamic Server Calculated Attributes: Example 12-25

) ha id
Comparing Configured and Dynamic Clusters 12-26
x
ฺm nt G
Creating a Server Template 12-27 u
co m d e
ฺ u
Server Templates and Configured Servers 12-29
o
er i s S t
s
Quiz 12-30
Summary 12-32
r u z@ se th
e ฺc to u
Practice 12-1 Overview: Configuring a Cluster 12-33
n
z( re
Practice 12-2 Overview: Configuring a Dynamic Cluster 12-34

r u
C13 Clusters
e ne
R Objectives 13-2
A Cluster Proxy for a Web Application Cluster 13-3
Proxy Plug-Ins 13-4
Oracle HTTP Server (OHS) 13-5
Installing and Configuring OHS (Part of Oracle Web Tier): Overview 13-7
Configuring OHS as the Cluster Proxy 13-8
httpd.conf and mod_wl_ohs.conf 13-9
mod_wl_ohs.conf 13-10
Some Plug-in Parameters 13-11
Starting and Stopping OHS 13-13
Verifying that OHS Is Running 13-15
Successful Access of OHS Splash Page 13-16
Failover: Detecting Failures and the Dynamic Server List 13-17
HTTP Session Failover 13-19
Configuring Web Application Session Failover: weblogic.xml 13-20

x
In-Memory Session Replication 13-23
In-Memory Replication: Example 13-24
Configuring In-Memory Replication 13-27
Machines 13-28
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Secondary Server and Replication Groups 13-29


Replication Groups: Example 13-30
Configuring Replication Groups 13-31
File Session Persistence 13-32
Configuring File Persistence 13-33
JDBC Session Persistence 13-34
JDBC Session Persistence Architecture 13-35
n s e
Configuring JDBC Session Persistence 13-36
lice
ble
JDBC Persistent Table Configuration 13-37
Configuring a Hardware Load Balancer 13-39
fer a
a n s
tr
Hardware Load Balancer Session Persistence 13-40
n-
no
Passive Cookie Persistence and the WebLogic Server Session Cookie 13-41
Quiz 13-42 a
s eฺ
Summary 13-43
) ha id
x
ฺm nt G u
Practice 13-1 Overview: Installing OHS (Optional) 13-44

co m d e
ฺ u
Practice 13-2 Overview: Configuring a Cluster Proxy 13-45
o
er i s S t
s
Practice 13-3 Overview: Configuring Replication Groups 13-46

r u z@ se th
14 Clusters
e c ou
ฺ14-2
r e n t
(
Objectives

r uzReview: Cluster Communication 14-3


C
ene
How Multicast Works 14-4
R How Unicast Works 14-5
Unicast Versus Multicast 14-6
Configure Multicast 14-7
Configure Unicast 14-10
Replication Channel 14-11
Configure Replication Channels: Servers 14-12
Configure Replication Channels: Cluster 14-15
Configure Replication Channels 14-16
Planning for a Cluster 14-17
Managing a Cluster 14-21
Troubleshooting a Cluster 14-22
Monitoring a Cluster: Admin Console 14-23
WebLogic Server and OHS Logs 14-24
Common OHS to WLS Connectivity Issues 14-25
Multicast Communication Issues 14-27

xi
Cluster Member Uniformity 14-28
Session Failover Issues 14-29
Quiz 14-30
Summary 14-31
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Practice 14-1 Overview: Configuring a Replication Channel 14-32

15 Transactions
Objectives 15-2
Transactions and ACID 15-3
Global Transactions, 2PC, and XA 15-5
WebLogic Server as a Transaction Manager 15-6
n s e
Transaction States when Committing 15-7
lice
ble
Transaction States when Rolling Back 15-8
Java Transaction API (JTA) 15-9
fer a
a n s
tr
Configuring Transactions 15-10
n-
no
JTA Configuration Options 15-11
WebLogic Extension of JTA 15-14 a
s eฺ
JDBC Reminder 15-15
) ha id
x
ฺm nt G
Logging Last Resource and Performance 15-16u
co m d e
ฺ u
LLR: Example 15-17
o
er i s S t
s
Transaction Log (TLog) 15-18

u z@ se th
Configuring the Default Store 15-19
r
e ฺc to u
Configuring a JDBC Transaction Log 15-20
n
z( re
Comparing File Store to JDBC Store 15-21

C r u
Monitoring Transactions 15-22

ne
Viewing Transaction Statistics for a Resource 15-24
R e Forcing a Commit or Rollback 15-26
Troubleshooting Transactions 15-29
Quiz 15-31
Summary 15-33
Practice 15-1 Overview: Configuring Transaction Persistence 15-34

16 WebLogic Server Security


Objectives 16-2
Some Security Terms 16-3
Some Security Terms: Graphically 16-4
WebLogic Server Security Realm 16-5
What the Providers Do 16-6
Security Stores 16-9
Default Security Store Implementation 16-10
Default Security Configuration 16-11

xii
Security Customization Approaches 16-12
Authentication Providers 16-13
Available Authentication Providers 16-14
Lightweight Directory Access Protocol (LDAP) 16-16
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

LDAP Structure 16-17


LDAP Search Operations 16-18
LDAP Query Basics 16-19
LDAP Authentication Providers 16-20
Available LDAP Authentication Providers 16-21
Creating a New LDAP Authentication Provider 16-22
Configuring the LDAP Provider: Connection 16-23
n s e
Configuring the LDAP Provider: Users 16-24
lice
ble
Configuring the LDAP Provider: Groups 16-25
Configuring the LDAP Provider: Subgroups 16-27
fer a
a n s
tr
Configuring the LDAP Provider: Dynamic Groups 16-28
n-
no
LDAP Failover 16-29
LDAP Caching 16-30 a
s eฺ
) h
Multiple Authentication Providers 16-31a id
Control Flags 16-32 x
ฺm nt G u
co m d e
ฺ u
Administration Groups 16-34
o
er i s S t
s
Troubleshooting Authentication 16-35

u z@ se th
Auditing Provider 16-36
r
e ฺc to u
Security Audit Events 16-37
n
z(re
Configuring the Auditing Provider 16-38

C r u
Security Realm Debug Flags 16-39

ne
Common LDAP Issues 16-40
R e Quiz 16-41
Summary 16-44
Practice 16-1 Overview: Configuring an Authentication Provider 16-45

17 Backing Up a Domain and Upgrading WebLogic Server


Objectives 17-2
Backup and Recovery 17-3
Backup Solution 17-4
Types of Backups 17-6
When to Back Up 17-8
Limitations and Restrictions for Online Backups 17-9
Performing Full Offline Backup 17-10
Performing Full Online Backup 17-12
Impact of Administration Server Failure 17-14
Automatically Backing Up a Domain Configuration 17-15

xiii
Recovery Operations 17-16
Directories to Restore 17-19
Recovery After Disaster 17-20
Recovery of Homes 17-21
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Recovery of a Managed Server 17-22


Recovery of the Administration Server 17-23
Restarting the Administration Server on a New Computer 17-24
Managed Server Independence 17-26
Upgrading WebLogic Server 11g to 12c 17-27
Run the Reconfiguration Wizard 17-30
Upgrade the Managed Server Domains 17-31
n s e
Upgrading WebLogic Server 11g to 12c 17-32
lice
ble
Quiz 17-33
Summary 17-34
fer a
a n s
tr
Practice 17-1 Overview: Backing Up and Restoring a Domain 17-35
n-
a no
ha s eฺ
x ) uid
m ฺm nt G
ฺ co u d e
o
er i s S t
s
r u z@ se th
n e ฺc to u
z(re
C r u
e ne
R

xiv
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Course Overview

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this course, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Install WebLogic Server


• Create and configure basic WebLogic Server resources
• Start and stop WebLogic Server
• Monitor WebLogic Server resources
• Configure, start, and use Node Manager to remotely start n s e
lice
ble
WebLogic Server
fer a
• Deploy Java Enterprise Edition applications to WebLogic
n s
Server
n- tra
a no
• Replace WebLogic Server’s default authentication provider
with an external LDAP product ha s eฺ
)
x domain ui d
m ฺ
• Back up and restore a WebLogicm n t G
ฺ co ude
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 1 - 2


Target Audience

This course is for administrators who will be responsible for


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

administering Oracle WebLogic Server 12c.


Prerequisite skills include:
• Some system administration experience
• Basic knowledge of UNIX commands and navigation

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
If you are concerned about whether your experience fulfills the course prerequisites, ask the
C
ne
instructor.
R e

Oracle WebLogic Server 12c: Administration I 1 - 3


Introductions

Introduce yourself and tell us about your:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Company and role


• Experience with WebLogic Server
• Experience with other Oracle products

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 1 - 4


Course Schedule
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Day Lesson

1 AM 1. Course Overview
2. WebLogic Server: Overview
3. Installing and Patching WebLogic Server
PM 4. Creating Domains
5. Starting Servers
n s e
lice
ble
2 AM 6. Using the Administration Console
7. Configuring JDBC
fer a
a n s
- tr
PM 8. Monitoring a Domain
9. Node Manager
no n
s eฺ a
3 AM 9. Node Manager (continued)
) h a id
x u
10. Deploying Applications

m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (remight vary depending upon the instructor and the students in the class. The
ru will provide updates.
The schedule
C
n e
instructor
Re

Oracle WebLogic Server 12c: Administration I 1 - 5


Course Schedule
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Day Lesson

3 PM 11. Network Channels and Virtual Hosts


12. Clusters: Overview, Creation, and Configuration
4 AM 12. Clusters: Overview, Creation, and Configuration (continued)
13. Clusters: Proxies and Sessions
PM 14. Clusters: Communication, Planning, and Troubleshooting
n s e
15. Transactions
lice
5 AM 16. WebLogic Server Security
r a ble
n sfe
PM 17. Backing Up a Domain and Upgrading WebLogic Server
n - tra
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
Cru
e ne
R

Oracle WebLogic Server 12c: Administration I 1 - 6


Course Practices

• Topics will be reinforced with hands-on exercises.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Many exercises include a scripted solution to aid the


students who fall behind.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Any practice that is required by a later practice has a scripted solution.
C
e ne
R

Oracle WebLogic Server 12c: Administration I 1 - 7


Classroom Guidelines

• The instructor starts each session at the scheduled time.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Ensure that cell phones are silent.


• When you ask questions, be respectful of the topic at hand
and the interest of other students.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
We hope that these guidelines help the class proceed smoothly and enable you to get the
C
ne
maximum benefit from the course.
R e

Oracle WebLogic Server 12c: Administration I 1 - 8


For More Information

Topic Website
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Oracle University http://oracle.com/education


Oracle Learning Library http://oracle.com/oll
Product Documentation http://www.oracle.com/technetwork/documentation
Product Downloads http://www.oracle.com/technetwork/indexes/downloads

n s e
ce
Product Articles http://www.oracle.com/technetwork/articles
li
ble
Product Support http://oracle.com/support

fer a
s
Product Forums http://forums.oracle.com
a n tr
Product Tutorials/Demos http://www.oracle.com/technetwork/tutorials
n -
Sample Code
a no
http://www.oracle.com/technetwork/indexes/samplecode

h a s eฺ
WebLogic Blog
x ) u
http://blogs.oracle.com/weblogicserver
id
m ฺm nt G
o e
WebLogic on Facebook http://www.facebook.com/oracleweblogic

o ฺ c tu d
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

e n e
z (rand
r u
This course the instructor attempt to address any questions that you might ask, but after
Ccomplete the course, Oracle provides a variety of channels for developers and
e n e
you
R administrators to access additional information.

Oracle WebLogic Server 12c: Administration I 1 - 9


Related Training
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Course
Oracle WebLogic Server 12c: Administration II

Oracle WebLogic Server 12c: JMS Administration

Oracle WebLogic Server 12c: Troubleshooting Workshop


n s e
Oracle WebLogic Server 12c: Performance Tuning
lice
ble
Workshop
fer a
Oracle WebLogic Server 12c: Enterprise Manager
n s
Management Pack
n - tra
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re can provide additional information about the availability and contents of the
ru listed above.
Your instructor
C
ene
courses
R

Oracle WebLogic Server 12c: Administration I 1 - 10


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WebLogic Server: Overview

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Define the WebLogic Server terms: domain, server, and


cluster
• Describe the difference between the administration server
and managed servers
• List WebLogic Server tools
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 2 - 2


Distributed Systems

• Distributed systems divide their work across similar


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

modules.
• As demand increases, more modules can be added to the
system. This makes the system more scalable.
• The failure of a single module has less impact on the
overall system, which makes the system more available.
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The main goal of a distributed system is to better manage the complexity and resulting cost of
C
neScalability is how well a system can adapt to increased demands. When a distributed
providing highly available and scalable systems.
R e
system’s capacity is reached, new equipment can be added fairly easily. These new modules
should handle the increased demand. Distributed systems have the added advantage of
lowering the initial costs of a new system, because additional equipment can be purchased as
needed.
Availability is a measure of a system’s ability to process client requests without downtime.
High availability requires that a system is up and running as close to 24/7/365 as possible.
This is achieved by using load balancing and failover techniques.

Oracle WebLogic Server 12c: Administration I 2 - 3


Java Platform Enterprise Edition

• Java Platform Enterprise Edition (Java EE) is the Java


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

standard for distributed, enterprise computing.


• The Java EE platform consists of:
– A Java Virtual Machine (JVM)
– Java Platform Standard Edition (Java SE)
– A Java EE application server
n s e
– Java EE Application Programming Interfaces (APIs)
lice
r a ble
n sfe
Java
- tra
Application
SE/EE
no n
APIs a
Server
h a s eฺ
x )
Java Virtual Machine u id
m ฺm nt G Back-end
e
Clients
ฺ co
Hardware
u d Systems
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r
The JVMu zis a software machine that converts compiled Java code into the machine code of
theC
e n e platform on which the virtual machine runs. Because Java source code is compiled into
R the code that runs on the virtual machine, that compiled code is portable.
Java Platform Standard Edition (SE) is a platform for developing portable, object-oriented
applications. It includes a compiler, a debugger, and a JVM. It also includes thousands of
already created classes (templates for kinds of objects) to make development easier. Java
Platform Enterprise Edition is built on top of Java Platform Standard Edition.
An application server is software that handles application operations from the end user to the
back-end business processes and databases. A Java EE application server complies with all
the Java EE standards. It contains two main parts:
• The Web Container that processes Java web application components like Servlets and
JSPs
• The EJB Container that processes the Java system components called an Enterprise
JavaBeans
Java EE Application Programming Interfaces (APIs) define standards and provide callable
code that can perform many server-side tasks from controlling transactions (Java Transaction
API or JTA) to managing resources (Java Management Extensions or JMX).

Oracle WebLogic Server 12c: Administration I 2 - 4


Oracle WebLogic Server

Oracle WebLogic Server (WLS):


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Is a Java EE application server hosting Java EE


applications (WLS 12c implements Java EE 6.0)
• Provides clustering for load balancing and high availability
• Offers an extensible security realm for authentication,
authorization, and so on
n s e
• Runs the “Java components” of Oracle Fusion Middleware lice
(FMW). These include Oracle SOA Suite, Oracle Servicer a ble
n sfe
tra
Bus, Oracle WebCenter Suite, and some Oracle Identity
Management components. o n-
a ฺ by the Oracle
– “System components” of FMW aresmanaged
n
a ide server. Examples
) h (OPMN)
x
Process Manager and Notification u
m nand
mฺ(OHS)
are Oracle HTTP Server t G Oracle Web Cache.
o ude
o ฺ c
ser is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Oracle WebLogic Server is a scalable, enterprise-ready, Java Enterprise Edition application
C
ne
server. WebLogic Server enables enterprises to deploy mission-critical applications in a
R e robust, secure, highly available, and scalable environment. These features enable enterprises
to configure clusters of WebLogic Server instances to balance workload, provide extra
capacity, and failover in case of hardware or other failures.
Extensive security features protect access to services and keep enterprise data secure.
Oracle Fusion Middleware is a collection of standards-based products that spans a range of
tools and services: from Java EE, to integration services, business intelligence, and
collaboration. Fusion Middleware products are organized into two general categories: Java
components and system components. Java components generally are deployed to WebLogic
Server as one or more Java Enterprise Edition applications and a set of resources. System
components are not deployed as Java applications. Instead, a system component is managed
by the OPMN server. OHS and Oracle Web Cache are examples of system components.

Oracle WebLogic Server 12c: Administration I 2 - 5


Some of the Fusion Middleware Java Components include:
• Oracle SOA Suite is a set of infrastructure components for designing, deploying, and
managing service-oriented architecture applications. SOA Suite components run on top of
WebLogic Server.
• Oracle Service Bus is an Enterprise Service Bus (ESB) that provides the infrastructure for
service discovery, service provisioning and deployment, and governance. This service-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

infrastructure software adheres to the SOA principles of building coarse-grained, loosely


coupled, and standards-based services.
• Oracle WebCenter Suite is an integrated set of components used for creating social
applications, web portals, collaborative communities, and composite applications.
• Oracle Identity Management is an enterprise identity management system that manages
user access privileges within the resources of an enterprise. Some of its components run

e
on WebLogic Server, for example, Oracle Directory Integration Platform. This is a Java EE
n s
ce
application that enables you to synchronize data between different repositories and Oracle
li
ble
Internet Directory.

fer a
a n s
n- tr
a no
ha s eฺ
x ) uid
m ฺm nt G
ฺ co u d e
o
er i s S t
s
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 2 - 6


JVM

• WebLogic Server, as Java code itself, runs within a JVM.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The JVM and its settings can significantly affect WebLogic


Server performance.
– For example, the memory available to WebLogic Server and
its applications is contained within the memory assigned to
the JVM.
n s e
• The JVMs available from Oracle are:
lice
– Oracle JRockit JVM
r a ble
– Oracle Hotspot JVM
n sfe
r starts. a
• n-tJVM
JVM configuration options are set when the
no
s a usedฺ
a
– This can be done by updating the scripts to
e
start WebLogic Server. x) h uid
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r
The JVMuzis a “virtual computer” that executes the bytecodes in compiled Java class files on a
e C machine. How you tune your JVM affects the performance of WebLogic Server and
n
physical
R e the applications on it. Use only production JVMs on which WebLogic Server has been
certified. Check the documentation for the latest list of JVMs and operating systems. The
current release of WebLogic Server supports only those JVMs that are Java Platform
Standard Edition 1.6 and higher.
Tuning the JVM to achieve optimal application performance is one of the most critical aspects
of WebLogic Server performance. A poorly tuned JVM can result in slow transactions, long
latencies, system freezes, and even system crashes. Ideally, tuning should occur as part of
the system startup, by employing various combinations of the startup options.

Oracle WebLogic Server 12c: Administration I 2 - 7


(Possible) System Architecture

Machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Cluster
WebLogic
Server
Back-end
Systems
e

Machine
s
and
Load WebLogic
ce n
i
Databases
l
ble
Balancer Server
Web
fer a
a n s
tr
Clients
WebLogic
n -
Server
a no
h a s eฺ
Firewall
x )
Machine
u id
m ฺm nt G Company Network
o
ฺc tud e
ro
e is S
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
A possible system architecture might contain:
C
e ne • Clients using the World Wide Web to access your applications
R • A firewall (hardware or software designed to prevent unauthorized access to or from a
private network by using filtering or blocking ports)
• A cluster proxy of either a hardware load balancer or a web server like OHS
• A cluster of WebLogic Servers on various machines (each one running applications)
• Various back-end systems or databases accessed by the applications running on
WebLogic Server
Other common architectural elements not shown:
• Additional firewalls (for example, between the Load Balancer and WebLogic Server or
between WebLogic Server and the database)
• Multiple load balancers, or perhaps hardware load balancers in front of multiple web
servers
• Multiple WebLogic Server clusters

Oracle WebLogic Server 12c: Administration I 2 - 8


WebLogic Server Domain

A domain is a collection of WebLogic Server resources.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• How many domains there are and how they are organized
is completely up to you.

Machine Machine Machine

Domain A Domain A Domain B Domain B


n s e
lice
ble
Admin
Server Server
fe r
Servera
s
Admin
Server n
a Server tr
Server
n -
a no
h a s eฺ
d
Product Product
Installation Product
ฺ m x) Gui
Installation Installation

co m dent
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r
A domainuz is( a collection of WebLogic Server resources. There are different kinds of resources
in aCdomain, including WebLogic Servers, deployed applications, clusters, security providers,
n e
e and Java Message Service and Java Database Connectivity elements.
R
How many domains you have and how you organize them is completely left to you. For
example, domains may be organized by a logical division of types of applications, by physical
location of hardware, by size and number of administrators, and so on.
All domains contain a special server called the administration server. You use the
administration server to configure and manage all of the domain resources. Any other
WebLogic Servers in the domain are called managed servers.
In most domains, the applications are deployed to the managed servers. The administration
server is only used for domain configuration and management.
A single WebLogic Server product installation can be used to create and run multiple
domains, or multiple product installations can be used to run a single domain. How domains
are defined is up to you. You can define multiple domains based on different system
administrators’ responsibilities, application boundaries, or geographical locations of the
machines on which servers run.

Oracle WebLogic Server 12c: Administration I 2 - 9


Administration Server

• A domain must have exactly one instance of WebLogic


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Server acting as the administration server. An


administration server is part of exactly one domain.
• The administration server is:
– The central point through which you configure and manage
all domain resources
n s e
lice
– Solely in charge of the domain’s configuration. It distributes
configuration changes to other servers in the domain.
r a ble
sfe
– An instance of WebLogic Server and, therefore, a fully
n
a
functional Java Enterprise Edition applicationtrserver
-
o n
Domain A
s an ฺ
) h a ide
ฺ m x G u
om uden t
c
Admin Server

sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz contain a special server called the administration server. You use the
All domains
C
eadministration
n WebLogic Servers in the domain are called managed servers.
server to configure and manage all of the domain resources. Any other
Re
In most domains, the applications are deployed to the managed servers. The administration
server is only used for domain configuration and management.
Because an administration server is an instance of WebLogic Server, it can perform any task
of a Java Enterprise Edition application server. Applications can be deployed and run on the
administration server. For simplicity, often a development-time domain will only contain the
administration server and no others. Developers deploy and test their applications on the
administration server.

Oracle WebLogic Server 12c: Administration I 2 - 10


Managed Servers

• A domain can have zero or more managed servers.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• A managed server:
– Is managed by the administration server
– Is an instance of WebLogic Server and, therefore, a fully
functional Java Enterprise Edition application server
– Is where your Java Enterprise Edition applications run
n s e
— Web applications, EJBs, web services, enterprise applications
lice
– Can be clustered with other cooperating managed servers
r a ble
for availability, scalability, and automatic failover sfe
- tr an
Domain A
n on
s a ฺ
a
) h uide Managed
Managed Managed
x Managed
Server Server ฺm Server
o m e n tG Server

ro ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
r u
In almost all domains, the administration server is not the only server defined in the domain.
C
ne
Other servers are also defined. These others are called managed servers, because they are
R e managed by the administration server.
A company’s web applications, EJBs, web services, and other resources are deployed and
run on the managed servers. That leaves the administration server free for configuration and
management purposes.
For scalability, availability, and failover (when one server fails, requests are automatically sent
to another server), managed servers can be placed together in a cluster.

Oracle WebLogic Server 12c: Administration I 2 - 11


Node Manager

• Is a separate process that accepts remote commands to


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

start, stop, or suspend servers on its machine


• Monitors server availability and can restart failed servers
• Can be used to migrate servers on a failed machine to
another machine

n s e
lice
r a ble
n sfe
a
Machine
n - r
tServer
Node Start/stop
no
Monitor/s a
a ideฺ Server
Manager
x )
restarth u
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Server instances in a WebLogic Server production environment are often distributed across
C
ne
multiple domains, machines, and geographic locations. Node Manager is a WebLogic Server
R e utility that enables you to start, shut down, and restart both administration server and
managed server instances from a remote location. Although Node Manager is optional, it is
recommended if your WebLogic Server environment hosts applications with high-availability
requirements. A Node Manager process runs on a particular machine.
There are two versions of Node Manager: the Java-based one that runs on any platform on
which WebLogic Server runs and the script-based one that only runs on *nix operating
systems. The Java-based Node Manager is recommended.
If Node Manager starts a server and that server later fails, Node Manager can be set to
automatically restart it. If Node Manager fails or is explicitly shut down, upon restart, it
determines the servers that were under its control when it exited. Node Manager can restart
any failed servers as needed.
The WebLogic Server administration console can be used to issue commands to Node
Managers running on remote machines. The WebLogic Scripting Tool (WLST) (in offline
mode) also serves as a Node Manager command-line interface.

Oracle WebLogic Server 12c: Administration I 2 - 12


Machines and Clusters

A machine:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Is defined within a domain to represent physical hardware


• Is required by Node Manager and used by clusters
• Has managed servers assigned to it
A cluster:
• Has multiple managed servers running cooperatively in it, n s e
lice
ble
which provides for failover
fer a
s
• With HTTP clients requires a cluster proxy that provides
n
load balancing tra n -
o
Proxy

s an ฺ
) h a ide
Cluster
ฺ m x G u
t
Server Server Server

ฺ com uMachine
d en
ero is St
Machine Machine
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r uz definition is used to associate a computer with the managed servers that it hosts.
A machine
C Manager is always defined within the context of a machine. Machine definitions, and
eNode
n which servers are assigned to them, are also used by a clustered managed server in selecting
Re the best location for storing replicated session data.
A cluster is a collection of multiple managed servers within a single domain running
simultaneously and cooperatively to provide increased scalability and reliability. Resources
and services are deployed identically to each server in a cluster, allowing for failover and load
balancing. The session state of one clustered server is replicated on another server in the
cluster. When a server fails, another server in the cluster takes over for it and retrieves the
replicated data. No information is lost and customers do not realize that a different server is
now fulfilling their requests. Clustered servers communicate with one another in two main
ways: sending updates to their “backup server” when session state changes, and through
cluster “heartbeats.” Each clustered server sends out a signal periodically to indicate that it is
still viable. If a member of the cluster misses too many heartbeats, that server has “failed.”
A cluster with HTTP clients (a cluster with web applications) is always fronted by a proxy,
which could be a web server, a hardware load balancer, or an instance of WebLogic Server.
The proxy provides load balancing and enables failover by avoiding failed servers. Clusters
that provide EJB or JMS applications do not require a cluster proxy.

Oracle WebLogic Server 12c: Administration I 2 - 13


WebLogic Server Application Services

• Java Database Connectivity (JDBC)


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– The API for accessing relational databases


– Data source objects are configured to provide database
access.
• Java Message Service (JMS)
– The API for and implementation of an enterprise messaging
n s e
system
lice
a ble
– Multiple resources must be configured in WebLogic Server
r
for JMS. fe s
- tr an
• Java Transaction API (JTA)
o n
s a n ฺ WebLogic
– When transactions need to span resources,
hamanager.
Server can act as the transaction ide x) Gu

m dentm
co
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r uz(
C
e ne
R

Oracle WebLogic Server 12c: Administration I 2 - 14


WebLogic Server Application: Example

1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Web
Application
2 3

EJB
Application
n s e
ce
Persistence
li
ble
4
Web Service
fer a
Application Message Queue WebLogic
n s
tra
XML Server
n -
no
5 WebLogic Server

s eฺ a
) h a id
x
Other
ฺm nt G
Systems
u
m
or Applications
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

e n e
z (rinteract
r u
1. Users with a web application by using a browser. The web application is
C responsible for rendering the website and for capturing user input through buttons,
e ne
R forms, links, and so on. It is possible that the web application contains all of the
necessary business logic to perform the tasks that users request.
2. In this example, however, the web application accesses Enterprise JavaBeans (EJBs) to
perform the business logic. These EJBs can be located on the same server as the web
application or on a different server, as shown in this example.
3. Some of the EJBs shown include a persistence mechanism. They are writing newly
placed orders to a relational database.
4. After the order is written to the database, an EJB uses the Java Message Service (JMS)
to asynchronously communicate with other applications so that those applications can
also process the order.
5. To expose the business logic of this application in a standard way to other applications,
both within your organization and beyond, a web service is used. XML-based web
services can be accessed by both Java and non-Java applications and are a
cornerstone of service-oriented architecture.

Oracle WebLogic Server 12c: Administration I 2 - 15


WebLogic Server Administrative Tools

WebLogic Server can be administered and monitored by using:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The WebLogic Server administration console


• The WebLogic Scripting Tool (WLST)
• The WebLogic Diagnostic Framework (WLDF)
• The WLDF Monitoring Dashboard
• Enterprise Manager Cloud Control n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 2 - 16


WebLogic Server Administrative Tools

WebLogic Server can be administered and monitored by using:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The Java Management Extensions (JMX) API


– WebLogic Server provides a large set of JMX managed
beans (MBeans) for the resources that it manages.
— These objects are used by the tools provided with the product.
These objects can also be used by your own custom JMX code
s e

n
lice
to create, configure, manage, and monitor WebLogic Server

ble
resources.

fer a
a n s
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
A managed bean (MBean) is a Java bean that provides a Java Management Extensions
C
ne
(JMX) interface. JMX is the Java Enterprise Edition API for monitoring and managing
R e resources. WebLogic Server provides a set of MBeans that its own tools use to configure,
monitor, and manage WebLogic Server resources. You can also write custom JMX code
perform those same functions. For more information about WebLogic Server MBeans, see the
MBean Reference document.

Oracle WebLogic Server 12c: Administration I 2 - 17


WebLogic Server Administration Console

• The Oracle WebLogic Server administration console is a


web browser–based tool for configuring, administering,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

and monitoring the resources of a domain.


• The console application runs on the administration server.
• It is part of the normal installation of WebLogic Server.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Oracle WebLogic Server administration console (admin console) is a
C
ne
web browser–based, graphical user interface that can be used to manage a WebLogic Server
R e domain. The admin console application runs on the administration server. The admin console
can be used to:
• Configure, start, and stop instances of WebLogic Server
• Configure clusters
• Configure database connectivity (JDBC)
• Configure messaging (JMS)
• Configure WebLogic Server security
• Deploy applications
• Monitor server and application performance
• View server and domain log files

Oracle WebLogic Server 12c: Administration I 2 - 18


WLST

The WebLogic Scripting Tool (WLST) is:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• A scripting tool for creating, configuring, administering, and


monitoring the resources of a WebLogic Server domain
• Part of the normal installation of WebLogic Server
• Capable of performing all the tasks available in the
administration console, and more
n s e
• Based on the Jython programming language (the Java lice
le
implementation of Python) rab fe
a n s
r
– Python is an object-oriented, interpreted programming
t
on-
an ฺ
language.

h s
a ide
x ) u
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
WLST is a command-line scripting environment that can be used to create, manage, and
C
ne
monitor WebLogic Server domains. It is based on the Java scripting interpreter, Jython. In
R e addition to supporting standard Jython features such as local variables, conditional execution,
and flow control statements, WLST provides a set of commands that are specific to WebLogic
Server.
WLST can be run interactively (one command at a time) or in script mode (running a file of
commands). It also can be run online (connected to an administration server that allows it to
manage an active domain) or offline (accessing the configuration files of an inactive domain).

Oracle WebLogic Server 12c: Administration I 2 - 19


WLST

• WLST can run commands one at a time (interactive mode)


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

or from files (script mode).


• To run WLST, set environment variables by running the
setWLSEnv.sh script in <WL_HOME>/server/bin, and
then call the Java Virtual Machine with the WLST class:

n s e
lice
$> source /u01/app/fmw/wlserver/server/bin/setWLSEnv.sh

ble
$> java weblogic.WLST
Initializing WebLogic Scripting Tool (WLST) ...
fer a
n s
Welcome to the WebLogic Server Administration Scripting
Shell
n- tra
no
Type help() for help on available command
a ฺ
a s
wls:offline>
x ) h uide
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (rewithout a script, as shown in the slide, puts you into interactive mode.
CallinguWLST
e Cr
R en

Oracle WebLogic Server 12c: Administration I 2 - 20


WLST

• To run a WLST script, after setting the environment


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

variables, call the Java Virtual Machine with the


weblogic.WLST class, followed by the name of the script:

...
$> java weblogic.WLST myscript.py
n s e
lice
myscript.py era
ble
# Modify these values as necessary ran
sf
o n -t
an ฺ
username = "weblogic"
password = "Welcome1"
h s
a ide
url = "t3://myadminhost:7001“ )
x server u
ฺ m t G
ompassword, en url)
# Connect to the admin
ฺ c u d
ero is St
connect(username,
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
c ou
neฺ
Copyright

e t
z (r
Cr u
To call WLST with a script, simply put the name of the script after the WLST fully qualified

ne
class name, weblogic.WLST:
R e $> java weblogic.WLST myscript.py

Oracle WebLogic Server 12c: Administration I 2 - 21


WLDF

The WLDF is used to gather and analyze WebLogic Server


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

runtime data:
• Diagnostic images: It creates snapshots of the
server’s configuration and runtime metrics.
• Harvesters: Metric collectors can be set to periodically
collect and record data.
n s e
• Watches and notifications: Watches compare data to lice
a le
bout
conditions you set, and when triggered, they can send
fer
notifications. n s
n - tra Server and
o
WLDF is part of the normal installation of WebLogic
an ฺ
can be configured and used through thes administration console
a e
or WLST. x) h uid ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r u
The WLDFz provides features for generating, gathering, analyzing, and persisting diagnostic
Cfrom WebLogic Server instances and from applications deployed to them. Some WLDF
edata
n features are configured as part of the configuration for a server in a domain. Other features
Re are configured as system resources (diagnostic modules) that can be targeted to servers (or
clusters).
You use the diagnostic image capture component of WLDF to create a diagnostic snapshot of
a server’s internal runtime state at the time of the capture. This information can help Oracle
support personnel analyze the cause of a server failure. You can capture an image manually
by using the WebLogic Server administration console or WLST, or you can generate one
automatically as part of a watch notification. A diagnostic image zip file includes the server’s
configuration, log cache, JVM state, work manager state, JNDI tree, and most recent
harvested data.

Oracle WebLogic Server 12c: Administration I 2 - 22


WLDF Monitoring Dashboard

The Monitoring Dashboard presents WLDF data graphically. It:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Is part of the administration console application


• Can be launched from the administration console or with
its own URL
• Can graphically display active runtime data or archived
data
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Monitoring Dashboard provides views and tools for graphically presenting diagnostic data
C
ne
about servers and applications running on them. The underlying functionality for generating,
R e retrieving, and persisting diagnostic data is provided by the WLDF. The Monitoring Dashboard
provides additional tools for presenting that data in charts and graphs.

Oracle WebLogic Server 12c: Administration I 2 - 23


Enterprise Manager Cloud Control

• Is a tool for administering and monitoring your entire


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Oracle IT infrastructure, including WebLogic Server


– Unlike other WebLogic tools, Cloud Control enables you to
administer multiple domains.
• Requires its own installation (It is not installed as part of
some other component.)
n s e
• Supplies a web browser–based user interface
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Enterprise Manager Cloud Control is composed of three main components:
C
e ne • The Oracle Management Repository
R • One or more Oracle Management Services
• One or more Oracle Management Agents
An Oracle Management Agent (simply called an agent) is responsible for monitoring the
health of a target and is installed on the host on which a target runs. An agent collects
information about a target and sends it through the Oracle Management Service (OMS) to the
Oracle Management Repository.
OMS is a Java Enterprise Edition web application. It receives information from agents and
saves that information in the Oracle Management Repository. It also provides the Grid Control
console.
The Oracle Management Repository contains a collection of Grid Control schema objects
such as database jobs, packages, procedures, and views.
Enterprise Manager Grid Control is renamed Enterprise Manager Cloud Control in version
12c.

Oracle WebLogic Server 12c: Administration I 2 - 24


Quiz

The number of administration servers in a domain:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. 0
b. 1
c. 2
d. 3 or more
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzb
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 2 - 25


Quiz

The minimum number of managed servers in a domain:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. 0
b. 1
c. 2
d. 3
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruza
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 2 - 26


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Define the WebLogic Server terms: domain, server, and


cluster
• Describe the difference between the administration server
and managed servers
• List WebLogic Server tools
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 2 - 27


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

R e ne
C r uz(
re n e
r u
ฺc to u
s
o ฺ
z@ se th
co m
er i s S tu
x
d
)
e
ha
ฺm nt G u
a
id
no
s eฺ
n- tr
a n sfer a ble
lice n s e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Installing and Patching WebLogic Server

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Determine supported configurations for WebLogic Server


• Install WebLogic Server
• Apply a patch to WebLogic Server

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 2


Determining Supported System Configurations

1. Know your system (operating system, processor).


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2. Download the System Requirements and Supported


Platforms spreadsheet for the version of FMW you plan to
use.
3. Start on the “FMW on WLS - System” sheet. Find your
operating system in the “OS Version” column.
n s e
– Which version of FMW? Which JDK? What DB and version?
lice
r a ble
Installation Version Processor OS Oracle JDK JDK
n s feDatabase
Oracle

tra
Type Supported Type Version FM Vendor 32/64 bit

11gR1 on-
32/64 Version

an ฺ
bit

s
(11.1.1.6)
64 ha Oracle JDK
ALL 11gR1 x64 Oracle
x ) 1.7.0_02+ u ide 64 …
(11.1.1.6+) Linux 6

m den m t G Oracle

c o
(UL1+) 11.2.0.1+

e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
(
zspreadsheet
r
On eachu “sheet,” there are multiple rows for each version of an operating
C In the “FMW on WLS - System” sheet, each row shows the operating system and its
e n e
system.
R version, the version of FMW supported, which JDKs are supported, which Oracle databases
are supported, and so on.
Note that the table shown, which represents part of that sheet, is for example purposes only.
Also note that only some of the columns are shown and only one of the rows displayed.
There are multiple sheets in the supported systems spreadsheet. Some of them are:
• FMW on WLS - Client and OER IDE: Shows which browsers and what versions work
with various FMW products. (OER stands for Oracle Enterprise Repository.)
• FMW on WLS - Additional DB: Shows which non-Oracle databases and what versions
work with certain FMW products.
• FMW on WLS - Web Servers: Shows which web servers and what versions work with
WebLogic Server.
• FMW on WLS - Id&Access: Shows which Oracle identity and access products and
what versions work with WebLogic Server and other FMW products. Identity and access
products include Oracle Access Management, Oracle Virtual Directory, and others.

Oracle WebLogic Server 12c: Administration I 3 - 3


Ensuring Your System Meets Requirements

1. Ensure that your system meets the minimum requirements


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

for WebLogic Server:


– At least a 1 GHz CPU
– Sufficient disk space (~3.9 GB for a complete installation)
— At installation, 2.5 x 3.9 GB of temporary space is needed.
– Sufficient memory (1 GB of RAM is minimum, 2 GB is
n s e
ce
recommended)
li
2. If using other FMW components, ensure that your system
r a ble
meets their added requirements:
n sfe
– For example, Oracle SOA Suite requires a dual-core
n - tra
processor 1.5 GHz or better, 15 GB of disk
a no space, and a
h a s with eฺ 4 GB of available
minimum of 2 GB of physical memory
x ) u i d
memory.
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
Cru
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 4


When Not All FMW Is the Same Version

1. If not everything is the same version, download the System


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Requirements and Supported Platforms spreadsheet for


the WebLogic Server version you plan to use.
2. Start on the “System” sheet. Find your operating system in
the “OS Version” column.

e
Installation Version Processor OS Oracle JDK JDK Oracle

n s
ce
Type Supported Type Version FM Vendor 32/64 bit Database
32/64 Version
li
ble
bit 12c
(12.1.2.0.0)
fe…r a
n s
ra Oracle
Oracle 12c x64 Oracle 64 Oracle JDK 64
WebLogic (12.1.2.x) Linux 5 1.7.0_02+
n - t
Server (UL6+)
n o 11.2.0.3+

s a ฺ
3. Use the “WLS - WebServer” x
a
) h foruithe
sheet de OHS version.
o m ฺmfor OID
e n t G& OAM versions.
ฺc tud
4. Use the “Id&Access” sheet
ro
e is S
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
r
On eachu spreadsheet “sheet,” there can be multiple rows for each version of an operating
C In the “System” sheet, each row shows the operating system and its version, the
esystem.
n version of WebLogic Server supported, which JDK is supported, which Oracle databases are
Re supported, and so on.
Note that the table shown, which represents part of that sheet, is for example purposes only.
Also note that only some of the columns are shown and only one of the rows displayed.
Oracle HTTP Server (OHS) is a web server based on the open-source Apache web server.
Oracle Internet Directory (OID) is an LDAP v3-compliant directory with meta-directory
capabilities. It is built on Oracle database and is fully integrated into Oracle Fusion
Middleware.
Oracle Access Manager (OAM) is a product that provides single sign-on capabilities.

Oracle WebLogic Server 12c: Administration I 3 - 5


WebLogic Server Installers

• Generic installer
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– JAR file
– Choose the generic installer with the features you require:
— WebLogic Server Core
— Fusion Middleware Core
– Requires you to first download and install an appropriate
n s e
ice
Java Development Kit (JDK) or Java Runtime Environment
e l
bl
(JRE)
Choose a supported one for your operating system. era
n sf

• ZIP installer
- tr a
no n
– A ZIP file
s eฺ a
– JDK included
) h a id
x u
– Only good for 32-bit operating
o m ฺm systems
e n tG
– Cannot be usedrfor o ฺcproduction
tu d
se this S
u @
z © s2013,
e Oracle and/or its affiliates. All rights reserved.
cr u
eฺ
Copyright

r e n to
r uz(
C
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 6


Generic Installers

• The WebLogic Server core installer (wls_generic.jar)


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

contains:
– WebLogic Server
– Coherence
– Administrative tools
– Database support
n s e
– Examples
lice
• The FMW core installer (wls_jrf_generic.jar) able
sfer
an
contains all of the above, plus:
- tr
– Repository Creation Utility (RCU)
n on
s a ฺManager
– Java Required Files (JRF) and Enterprise
) h uidea
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re core installer:
C ru
WebLogic Server

ene
• Coherence is an in-memory data management system for application objects shared
R across multiple servers.
• Administrative tools include the administration console, the Configuration Wizard, the
Template Builder, WLDF, and WLST.
• Database support includes third-party JDBC drivers and an evaluation Derby database.
The Apache Derby project is an open source relational database implemented entirely in
Java.
• Examples include example applications for WebLogic Server, and examples of code
using Coherence. Note that these examples are not installed as part of a “typical”
installation. Some of the samples use the Derby evaluation database.
• Also available in this installer is a Web 2.0 HTTP Pub-Sub server, which can be used by
Web clients to subscribe to channels and publish messages asynchronously to them by
using the Bayeux protocol. Bayeux supports responsive bidirectional interactions
between web clients, for example those using AJAX (Asynchronous JavaScript and
XML).

Oracle WebLogic Server 12c: Administration I 3 - 7


• The last part of this installer is WebLogic SCA (Service Component Architecture), which is
a Spring container. Spring is an open-source application development framework for Java.
Fusion Middleware core installer:
• Note that one of the “administrative tools,” the Configuration Wizard, is updated by some
Fusion Middleware components to ensure new WebLogic domains include artifacts
required by these components.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The RCU is the tool used to create database schemas for Fusion Middleware products.
• The JRF is a set of libraries providing common functionality for Oracle business
applications and application frameworks.
• Enterprise Manager contains the administrative tool Fusion Middleware Control.

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 8


What Is Oracle Coherence?

Oracle Coherence:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Is a JVM process
• Provides a distributed, in-memory data caching solution
• Offers high performance and scalability
• Is based on a cluster of cache servers
• Automatically distributes (partitions) cached data across n s e
lice
the Coherence cluster e
blof
fer a
• Can be installed and managed independently or as
n s part
a WebLogic Server domain tra n -
n o
Cache datas aCoherence ฺ
Get data
) h uid a e
Cluster
Applications
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
z primary uses of Oracle Coherence is to cluster an application’s data. This means
One ofuthe
r
e Cthe objects and data that an application delegates to Coherence clusters are
n
that
R e automatically available to and accessible by all servers in the application cluster. None of the
objects or data are lost in the event of server failure. Coherence thereby solves many of the
problems related to achieving reliability and availability for clustered applications.
The partitioning feature dynamically load-balances data evenly across the Coherence cluster,
whereas replication ensures that a desired set of data is always available and up-to-date in
the Coherence cluster. Replication enables operations that are running on any server to
obtain the data that they need locally, at basically no cost, because that data has already
been replicated to that server. The only downside of partitioning is that it introduces latency
for data access. To eliminate the latency associated with partitioned data access, Coherence
can use local or “near caching" as well. Frequently and recently used data from the
partitioned cache is maintained on the specific servers that are accessing that data, and this
“near data” is kept up-to-date by using event-based invalidation.
Coherence and Coherence*Web are included in the default installation of WebLogic Server.
WebLogic Server includes features that enable deployed applications to use Coherence data
caches and incorporate Coherence*Web for session management.

Oracle WebLogic Server 12c: Administration I 3 - 9


FMW Installation Flow

Installing Oracle Fusion Middleware products generally


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

involves the following steps:


1. Create the database schemas required by the FMW
products being installed by using the Oracle Repository
Creation Utility (RCU). If WebLogic Server is used
2. Install the JDK.
e
“stand alone” (without FMW

n s
lice
components running on it), only
3. Install Oracle WebLogic Server. steps 2 and 3 are needed.
le
4. Install other Oracle Fusion Middleware products. rab fe
n s
n tra
-
n o
Configure
s a ฺ
a
Install Oracle
h uid products e
FMW product Install FMW
) Server
Start Install JDK WebLogic End
schemas by
x
ฺm nt G
m
using RCU

ฺ c o u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r uz Repository contains metadata for some Oracle Fusion Middleware
The Metadata
C
ecomponents,
n configuration of some Oracle Fusion Middleware components. Developers can also write
for example, Oracle WebCenter. It can also contain metadata about the
Re code so that it can hold metadata for their own applications. The Metadata Repository can be
database based or file based. The database-based repository can be created in an existing
database by using the RCU.
Note that the installation of WebLogic Server and other FMW components does not require
that the Metadata Repository be created first, but it often is created first.
WebLogic Server itself does not use the Metadata Repository.

Oracle WebLogic Server 12c: Administration I 3 - 10


WebLogic Server Installation Modes

• Graphical:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– An interactive, GUI-based method of installation


• Silent:
– A noninteractive, command-line method of installation
– Request silent mode with the -silent option
– Installation configuration information must be placed in a file
n s e
and referred to with the -responseFile option
lice
$> java -d64 -jar wls_generic.jar
r a ble
-silent
n sfe
-tr a
on
-responseFile /path/file.rsp

a ฺ n
a s
x ) h uide
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r uz a response file with the correct format, install in graphical mode. On the “Installation
To create
C
eSummary”
n
screen, click the Save button, which saves your responses in a response file.
Re

Oracle WebLogic Server 12c: Administration I 3 - 11


Installing WebLogic Server on Linux
(Graphical Mode)
1. Determine that your system is supported and meets
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

requirements.
2. Log in as the user you want to use for installation. (Do not
use root.)
3. Download the appropriate JDK tarball file and the
WebLogic Server generic installer.
n s e
4. Install the JDK. lice
A. Create a directory for the JDK.
r a ble
n sfe
tra
B. Extract the JDK archive file into the new JDK directory.
n -
$> mkdir /u01/app/fmw/jdk
a no
$> mv /download/name.tar.gz /u01/app/fmw/
h a s eฺname.tar.gz
x ) u id
$> tar -zxvf name.tar.gz mฺm nt G
$> cd /u01/app/fmw/jdk

ฺ co ude
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (ofrethe directory where files have been downloaded can be anything.
ru
The name
C
ene
The JDK archive file name changes depending upon the version of the JDK downloaded.
R You can put the JDK in the directory of your choice.
In the tar command, the options are:
• z = file was compressed, so unzip
• x = extract
• v = verbose
• f = file (extract from a file)
Note: There are also RPM-based 32-bit and 64-bit JDK installers for Linux. (RPM is a
package management system.)

Oracle WebLogic Server 12c: Administration I 3 - 12


Installing WebLogic Server on Linux
(Graphical Mode)
5. Run the WebLogic Server generic installer.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

A. Set file permissions.


B. Set the PATH to include the bin directory of the JDK.
C. Run the JAR installer.
$> umask 027
$> export JAVA_HOME=/u01/app/fmw/jdk
n s e
ce
$> export PATH=$JAVA_HOME/bin:$PATH
li
ble
$> cd /download
$> java -d64 -jar wls_generic.jar
fer a
a n s
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
The umask command sets the file mode creation mask to effect the permissions of newly
C
ne
created files and directories. It is set to 027, which results in new files having the default
R e permission of rw- r-- --- and new directories having the default permission of rwx r-x
---.
The -d64 option is used for installing on 64-bit Linux systems.
The JAR file name may be different.

Oracle WebLogic Server 12c: Administration I 3 - 13


Installing WebLogic Server on Linux
(Graphical Mode)
6. On the Welcome screen, 7. On the Installation
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

click Next. Location screen, select a


location and click Next.

n s e
lice
r a ble
n sfe
If this is the first Oracle product
- tra
installed, the Specify Oracle
no n
Inventory Directory screen appears
s eฺ a
before the Welcome screen. Enter
) h a id
x u
<MW_HOME>/oraInventory and
click Next.
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
The Oracle Inventory directory (oraInventory) stores an inventory of all Oracle products
C
ne
installed on the system. It is required and shared by all Oracle products.
R e The Fusion Middleware documentation uses /home/Oracle/Middleware as the Fusion
Middleware “Oracle Home” directory. This is an example, and the location of the installation is
up to you.

Oracle WebLogic Server 12c: Administration I 3 - 14


Installing WebLogic Server on Linux
(Graphical Mode)
8. On the Installation Type 9. On the Prerequisite Check
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

screen, select a type and screen, at 100% success,


click Next. click Next.
Choose
“complete”
to get

e
sample
n s
ce
code.

li
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The choices for the type of installation are:
C
e ne • WebLogic Server Installation: WebLogic Server, Coherence, Web 2.0 Pub-Sub
R Server, WebLogic SCA (Spring), WebLogic client Jars, Administrative tools, 3rd party
JDBC drivers, the Derby evaluation database, open source tools (Jackson, Jersey, and
Maven), and OPatch.
• Complete Installation: All of the above, plus example code (WebLogic Server and
Coherence)
• Coherence Installation: The same as the WebLogic Server installation, but missing
WebLogic client Jars and 3rd party JDBC drivers.

Oracle WebLogic Server 12c: Administration I 3 - 15


Installing WebLogic Server on Linux
(Graphical Mode)
10. On the Security Updates 11. On the Installation
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

screen, enter a support Summary screen, click


email and password, and Install.
click Next.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
In the practice environment, you will not enter security update information, because you do
C
ne
not want to associate your email with a classroom installation.
R e

Oracle WebLogic Server 12c: Administration I 3 - 16


Installing WebLogic Server on Linux
(Graphical Mode)
12. On the Installation 13. On the Installation
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Progress screen, at Complete screen, click


100%, click Next. Finish.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 17


Installation Problems

• The “prerequisite check” of the installer checks if the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

operating system meets requirements and lists any issues.


– If you have determined your system is supported ahead of
time, there should be no problems.
• If the generic installer does not come up, ensure that you
have set the JAVA_HOME environment variable to the
n s e
lice
correct JDK and added the bin directory under it to the
PATH. le ab
• sfer log
If you are having problems installing, create a verbose
an
-troption:
file during the installation with the -logFile
n on
$> java -d64 -jar wls_generic.jar a s a ฺ /path/fn.log
) h uide
-logFile
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
Cru
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 18


Sample Installation Directory Structure
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Directory Description
 u01/app Oracle base
 db11g Database home
The Oracle Home you enter in
 fmw Middleware home the installer.(It is the “oracle
home” of Fusion Middleware.)
 coherence Coherence home
 jdk1.7.0_10 Java home
n s e
lice
ble
 oracle_common Oracle common home
 web Web home (OHS)
fer a
a n s
tr
 wlserver WebLogic Server home

n -
a noFusion Middleware product
s installed
Each

h a d e ฺ has its own “oracle


x ) u iMiddleware home. WebLogic
home” directory under

m ฺm nt G Server’s “oracle home” is here.


ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
When you install the first Oracle Fusion Middleware product in a system, a directory referred
C
ne
to as middleware home is created. (In the practice environment, it is the fmw directory.) The
R e path to this directory and its name is determined by the person installing the product.
Within middleware home, Oracle home directories are created for each FMW product that is
installed. For example, in the slide, the Oracle home directory for WebLogic Server is
wlserver.
A product's software binaries are installed into the product’s Oracle home directory. You
should not configure any component runtime environments (domains or instances) within this
directory.
In addition to Oracle home directories, the Oracle common home directory (in the slide as
oracle_common) is also located within the middleware home directory. The Oracle common
home directory contains the binary and library files required for Oracle Enterprise Manager,
Fusion Middleware Control, and the JRF. There can be only one Oracle common home
directory within each middleware home directory.

Oracle WebLogic Server 12c: Administration I 3 - 19


Uninstalling WebLogic Server

1. Shut down any


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

running servers.
2. Run the uninstall
script:
<MW_HOME>/
oui/bin/
n s e
ce
deinstall.sh.
li
3. Go through the
r a ble
screens,
n sfe
- tra
selecting the
no n
components to
s eฺ a
uninstall. By
) h a id
default, all are x
ฺm nt G u
co m d e
selected.
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
In Windows, the uninstaller can also be started by using the Windows Start menu: Start >
C
neWhen running the uninstaller script, if your system supports a graphical user interface, it starts
Programs > Oracle WebLogic > Uninstall Oracle WebLogic.
R e
in graphical mode. If not, it starts in console mode.
You can also choose console mode. To select console mode, add the -mode=console
option when running the script.
Another option, usually used from scripts, is to run in silent mode. To run in silent mode, add
the -mode=silent option when running the script. In silent mode, all components are
uninstalled. Also, some files remain (for example, the domain directories). Those can be
manually deleted.

Oracle WebLogic Server 12c: Administration I 3 - 20


Applying Patches by Using OPatch

• Follow these steps to apply a patch:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Contact Oracle Support.


2. Check for existing patches.
3. Obtain the necessary patch from Oracle Support.
4. Determine the Oracle home. OPatch is a utility
5. Read the patch README file. to help you apply
n s e
lice
software patches.
6. Apply the patch by using OPatch.
7.
r a
Based on the patch README file, perform postinstallationble
steps. sfe a n
- tr
• OPatch example:
n on
$> opatch apply -jdk $JAVA_HOME a
h a s eฺ
x ) u id
• You can use the OPatch rollback
ฺ m t G command to remove
an existing patch. com den
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r uz ( executable (or batch file for Windows) is found in the OPatch directory under
The OPatch
C
e<MIDDLEWARE_HOME>.
n To obtain the patch, you can contact your Oracle Support representative, or you can go to My
Re
Oracle Support (formerly OracleMetaLink) at http://support.oracle.com/.
If Oracle Support is not able to resolve the issue, you may be asked whether you have any
patches already installed on your system. To determine this information, run the
lsinventory command of OPatch.
The most common type of patch available in a Fusion Middleware environment involves
patching a specific Oracle home directory. Some patches (for example, a patch pertaining to
JRF) may apply to multiple Oracle home directories within a specific Middleware home. You
can obtain the list of Oracle home directories that are registered in an Oracle inventory by
using the lshomes command of OPatch. After you determine your Oracle home directories,
you should run the checkApplicable command to make sure that the patch can actually be
applied to them.

Oracle WebLogic Server 12c: Administration I 3 - 21


Quiz

The ZIP installer is OK to use for production installation in a


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

32-bit system.
a. True
b. False

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzb
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 3 - 22


Quiz

The name of the WebLogic home directory is _____________.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. wlserver_12.1
b. wlserver_12c
c. wlserver_12.1.2
d. wlserver
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzd
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 3 - 23


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Determine supported configurations for WebLogic Server


• Install WebLogic Server
• Apply a patch to WebLogic Server

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 24


Practice 3-1 Overview:
Installing WebLogic Server
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Installing the JDK


• Installing WebLogic Server

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 25


Practice 3-2 Overview:
Patching WebLogic Server
This practice covers using OPatch to patch WebLogic Server.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 3 - 26


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Creating Domains

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Describe a domain’s file system


• Create a domain by using the Configuration Wizard
• Configure resources by using the Configuration Wizard
• Copy a domain to another computer with the pack and
unpack utilities
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 2


Domain Planning Questions

• How many domains?


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– A domain is an arbitrary, administrative boundary.


– Possible domain boundaries include:
— Business unit
— Cost center
Data center location
e

n s
lice
— Administrator or administrative group
Application or application type (for example, one domain for e

end-user functions and another for back-end accounting)rab


l
n s femanage
a
n-tr
— Size (breaking up a large domain into smaller ones to

no
them more efficiently)

s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 3


Domain Planning Questions

• For each domain:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– What other FMW products are running in the domain?


— What extra requirements do they impose?
— See the Fusion Middleware Enterprise Deployment Guides which
provide product installation recommendations.
– What applications are running in the domain?
Do we need them to be highly available?
n s e
ce

Will we be using WebLogic clustering or Coherence?


li
ble

—Do we need a database?


fer a
n s
tra
Do we need a highly available database like Oracle RAC?

Do our applications use JMS?


n -
Do our applications contain EJBs? a no

a s eฺ

x ) h u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
c ou
neฺ
Copyright

e t
z (r
Cr u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 4


Domain Planning Questions

– What is the topology?


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

— How many computers?


— How many instances of WebLogic Server?
— What hosts and ports?
— Use virtual IP addresses or virtual host names
— How many clusters?
What will proxy the web-tier clusters? A web server? A
n s e
ce

hardware load balancer?


li
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 5


Virtual IP Address and Virtual Host Name

• Virtual IP
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– A network interface card typically binds to a single IP


address. It can be set up to listen on extra addresses. These
are called virtual IP (VIP) addresses.
– Use VIP addresses when defining WebLogic Servers.
If the server must be brought up on new hardware, the VIP
e

address can be moved over to the new hardware.


n s
lice
ble
• Virtual host name
– A host name is the primary name of a machine in the r a
fe can
n s
Domain Name System (DNS). Other (virtual) host
n - tra names
be assigned to the same machine.
a no
– Use a virtual host name for eachacomponent
h s eฺ in FMW. That
x )be relocated, u id no URLs used to
ฺm change. tG
way, if a component needs to
access that component
o mmust e n
r o ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z re is an unused IP address that belongs to the same subnet as the host’s
(address
C ruIP address. It is assigned to a host manually and Oracle WebLogic managed servers
A virtual IP

eneare configured to listen on this virtual IP address rather than a physical IP address. In the
primary
R event of failure of the machine where the IP address is assigned, the virtual IP address is
assigned to another machine in the same subnet, so that the new machine can take
responsibility for running the managed servers assigned to it.
A host name is the primary name of the machine in Domain Name System (DNS). In setting
up FMW components, it is a best practice to use virtual host names for each component,
rather than the actual machine’s host name. This simplifies migrating components to new
hardware when you scale your system or when the hardware fails. Virtual host names are set
in DNS or perhaps during development and test by updating the hosts file (with Linux it is
found in the /etc directory). Virtual host names are especially important for any FMW that
stores configuration information in the Metadata Repository. If real DNS names or IP
addresses are used in the configuration, the repository would have to be updated when new
hardware is used. By using virtual host names, the repository remains valid.
In case of a hardware failure, the virtual IP address and virtual host name are moved to a new
machine along with the component binaries and configurations. Then, whatever components
were running on the failed hardware are brought up on the new machine.

Oracle WebLogic Server 12c: Administration I 4 - 6


Domain Mode: Development

• Development mode
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– It allows applications to be auto-deployed.


– It is OK to use demonstration digital certificates for SSL.
– You are not prompted for a username and password to start
(or stop) the admin server.

e
– The admin console auto-locks the configuration by default.
n s
– Often no managed servers are defined in the domain.
lice
— The admin server handles administration and runs applications.
r a ble
n sfe
tra
Machine Development

n -
Dev Domain
a no
h a s eฺ
) Other DBuid
Admin
Server x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz
In development mode, the administration server watches the directory in the domain called
C
eautodeploy.
n server detects it, deploys that application to itself, and starts the application servicing
If you move an application archive file into that directory, the administration
Re requests.
You are not prompted for a username and password when starting or stopping the admin
server in development mode because a boot identity file (which contains the administrative
credentials) is automatically created. There will be more on boot identity files in the “Starting
Servers” lesson.

Oracle WebLogic Server 12c: Administration I 4 - 7


Domain Mode: Production

Production
• Production mode Machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Auto-deploy is disabled. Prod Domain


– You should not use the Oracle Admin
DB Server
demo certificates for
SSL.
– You are prompted for a Node Machine Node Machine
Mgr Mgr
n s e
e
username and password
Prod Domain lic
ble
to start (or stop) servers Prod Domain
– The admin console does Cluster
fer a
n s
a Server
tr
not allow auto-locking of Server
n -
no
the configuration.
Servera
h a s eฺ Server

x ) Serveruid
m ฺm nt G Server

ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
Note that a test domain should mirror production as closely as possible. Sometimes fewer
C
ne
servers are used, there is less data in the test database, and so on.
R e

Oracle WebLogic Server 12c: Administration I 4 - 8


Domain Creation Tools

• The Configuration Wizard: Is the graphical domain


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

creation tool
• WebLogic Scripting Tool (WLST): Can create domains
interactively or by running a WLST script
• Pack and unpack utilities: Is used to copy an existing
domain to another machine
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Note that console mode of the Configuration Wizard no longer exists. To create domains from
C
neAlso note that there is a Configuration Wizard script under the WebLogic Server installation
the command line, use a WLST script.
R e
directories here: <MW_HOME>/wlserver/common/bin. However, that script just calls the
one under the oracle_common directory. This is important because some FMW components
(for example, SOA Suite) update the Configuration Wizard so that the code required by that
component is included when domains are created.
Also, when creating a domain with the Configuration Wizard, you should create the managed
servers and clusters needed in the domain, so that all servers include any FMW component-
required code.
In addition to the WLST commands used to create a domain, there is a WLST command
called configToScript() that can read an existing domain and generate a script to
re-create it.

Oracle WebLogic Server 12c: Administration I 4 - 9


Domains Are Created from Templates

• Domains are created from domain templates.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Domain templates based on FMW products are supplied with


those products.
– You can create custom domain templates by using the
Template Builder tool.
• Domains can be extended with extension templates
n s e
lice
– Extension templates based on FMW products are supplied
with those products.
r a ble
sfe the
– You can create custom extension templates by using
n
Template Builder tool. tra n -
n o
• The Template Builder graphical tool is
s a found here:
– <MW_HOME>/oracle_common/common/bin/
) h a ideฺ
config_builder.sh ฺmx t Gu
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re Wizard knows which products are installed and where to locate the domain
ru
The Configuration
or C
e
n home directory. For example:
extension templates. These template JAR files are often located under the product’s Oracle
Re
• WebLogic Server templates are found here:
<MW_HOME>/wlserver/common/templates/wls
• The Oracle SOA Suite template is found here:
<ORACLE_HOME>/common/templates/applications
• Oracle Service Bus templates are found here:
<OSB_HOME>/common/templates/applications

Oracle WebLogic Server 12c: Administration I 4 - 10


Creating Domains
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

domain create new


Configuration
extension Wizard extend existing

Domain
input for extension 

n s e
 lice
ble
input

fer a
Template
an s
n- tr
a no
create
Domain
h a s input eฺ
Template
x ) u i d
(domain or extension)
ฺ m
Builder
t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Domains can be created by using the Configuration Wizard, which guides you through the
C
ne
domain creation process. It starts with either a template (a JAR file) or with built-in templates
R e based on products. When you start the Configuration Wizard, it asks whether you want to
create a new domain or extend an existing domain. You create a new domain with a domain
template or prebuilt templates based on products selected from a list. You extend a domain
by selecting the domain to extend, along with either an extension template or prebuilt
extension templates based on products selected from a list. When you extend a domain, the
domain must be “offline” (no servers running).
Templates can be built by using the Domain Template Builder. This wizard can build either
domain templates, for creating new domains, or extension templates, used to extend existing
domains. Templates are based on existing domains, other templates, or prebuilt product-
based templates.

Oracle WebLogic Server 12c: Administration I 4 - 11


Where to Place the Domain

Each computer that has WebLogic Servers running on it will


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

have a domain directory.


• The administration server domain directory is created by
the Configuration Wizard.
– It is a best practice to place the directory outside the
installation directories.
n s e
ce
This separates the product from your domain, which makes
li

ble
product upgrades and patching easier.

fer a
a n s
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
All computers that run WebLogic Server have a domain directory.
C
e ne • Do not place the domain directory under the product installation directories, even though
R that is the default. This separates the product from your domain, and should make
product upgrades and patching go more smoothly.
• The main domain directory (for the administration server) is created by the Configuration
Wizard.
• Make sure that each domain directory (for the same domain) is placed in the same
location on each computer.
• It is a good practice to have separate domain directories for the administration server
and managed servers, even on the same hardware. This isolates the administration
server and make the recovery of it easier (if the computer on which it is running
crashes).

Oracle WebLogic Server 12c: Administration I 4 - 12


Creating a Domain with the
Configuration Wizard
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
ble
Run the configuration
wizard script.
fer a
a n s
1. Select Create a
n - tr
new domain and
a no
enter a domain
h a s eฺ
x ) u id
location. Click
m ฺm nt G
Next. ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
When you create a domain, you place the domain files in the Domain Location. Oracle
C
neChoose Update an existing domain to extend a domain. In this case, the Domain Location is
recommends you do not place a domain under the installation directories.
R e
the location of a domain that already exists.

Oracle WebLogic Server 12c: Administration I 4 - 13


Creating a Domain with the
Configuration Wizard
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
ble
2. The Basic
WebLogic Server
fer a
a n s
Domain template
n - tr
is preselected.
a no
Click Next.
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
The drop-down list of Template Categories allows the list of templates to be shorter. By
C
ne
default All Templates is selected. The other choices are Oracle and Uncategorized
R e Templates.
When the Create Domain Using Product Templates option is selected, the Basic
WebLogic Server Domain check box is required and cannot be deselected.
The other check boxes on this wizard page are:
• Basic WebLogic SIP Server Domain: Oracle WebLogic Communication Services
(OWLCS) is a comprehensive platform designed to integrate communication services
with enterprise services and applications. OWLCS extends the core WebLogic Server
platform with a SIP Container compliant with JSR 289. (SIP is Session Initiation
Protocol, a telephony signaling protocol.) This enables the development of Java EE
applications that process SIP in addition to HTTP for advanced communications
applications.

Oracle WebLogic Server 12c: Administration I 4 - 14


• WebLogic Advanced Web Services for JAX-RPC Extension: It adds the functionality
required for advanced JAX-RPC web services, including reliable messaging, buffering,
and JMS transport.
• WebLogic Advanced Web Services for JAX-WS Extension: It adds the functionality
required for advanced web services, including asynchronous messaging, web services
reliable messaging, message buffering, web services atomic transactions, and security
using WS-SecureConversation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• WebLogic Coherence Cluster Extension: This adds a default Coherence cluster,


defaultCoherenceCluster, to the WebLogic Server domain and sets the listen port
for the cluster to 8088. A Coherence cluster is a collection of JVM processes. At run time,
JVM processes that run Coherence automatically join and cluster. JVMs that join a cluster
are called cluster members or cluster nodes. The Coherence*Web product builds on this
technology and can be used to replicate session information for WebLogic Server.
• WebLogic JAX-WS SOAP/JMS Extension: It adds the functionality required for
n s e
advanced web services using JMS.
lice
Depending upon the installer, there can be other templates listed.
r a ble
s e Custom
fUsing
tra
If you want to base a domain on a custom template, select Create Domain
n
Template and enter the Template Location.
n -
a no
ha s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s
r u z@ se th
n e ฺc to u
z (re
C ru
R ene

Oracle WebLogic Server 12c: Administration I 4 - 15


Creating a Domain with the
Configuration Wizard
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
3. Enter account
n sfe
information for
- tra
the main no n
s eฺ a
WebLogic Server
) h a id
administrator. x
ฺm nt G u
co m d e
Click Next.
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 16


Creating a Domain with the
Configuration Wizard
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
4. Select no n
s eฺ a
Production
) h a id
mode. Select a x
ฺm nt G u
JDK. Click Next.
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The JDK selected by default is the one used to install WebLogic Server by using the generic
C
ne
installer. To select a different JDK, select Other JDK Location and enter its location.
R e

Oracle WebLogic Server 12c: Administration I 4 - 17


Creating a Domain with the
Configuration Wizard
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

e
Which subsequent
n s
ce
screens display
depend upon the
li
a ble
selections here.
r
5. Select elements to n sfe
- tra
configure now.
no n
Click Next.
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
In the slide, Node Manager is not selected. It is configured later. If it is selected, the Node
C
ne
Manager screen is displayed, which allows you to select the Node Manager Type (Per
R e Domain, Custom Location, or Manual Node Manager Setup), the Node Manager Home (if
Custom Location is selected), and the Node Manager Credentials (Username, Password, and
Confirm Password). The Node Manager credentials do not have to match the main WebLogic
Server administrator credentials.
More information about Node Manager is provided in the lesson titled “Node Manager.”

Oracle WebLogic Server 12c: Administration I 4 - 18


Creating a Domain with the
Configuration Wizard
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
6. On the Admin Server lice
screen, enter its r a ble
n sfe
name, Listen Address,
- tr a
Listen Port, if SSL is
no n
enabled (and, if so, a
s eฺ
) ha id
the SSL Listen Port).
ฺm x G u
Click Next. om ent ฺc tud
ro
e is S
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
If you select Enable SSL, you must also enter the SSL Listen Port. It cannot be the same as
C
ne
the Listen Port.
R e

Oracle WebLogic Server 12c: Administration I 4 - 19


Admin Server Listen Address

• By default, the Listen Address field for the administration


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

server is “All Local Addresses.”


– This means the server binds to all available IP addresses on
the machine.
– If the Listen Address is left blank, the effect is the same as
choosing “All Local Addresses.”
n s e
ice
• Another drop-down option is “localhost”
– This is not a good option, since only processes that resideleonl
r a b
this machine (local processes) can connect to this server.
sfe
a n
tr host
• Best practice: Enter a virtual IP address or virtual
n -
name for the Listen Address. a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
C ru
n e
Re

Oracle WebLogic Server 12c: Administration I 4 - 20


Creating a Domain with the
Configuration Wizard
7. On the Managed Servers screen:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

A. Click Add.
B. Enter the server’s name, listen address, port, if SSL is
enabled (and, if so, the SSL Listen Port).
C. Do this for each one.
D. Click Next.
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
If you select Enable SSL on a managed server, you must also enter the SSL Listen Port. The
C
ne
SSL Listen Port cannot be the same as the Listen Port.
R e

Oracle WebLogic Server 12c: Administration I 4 - 21


Creating a Domain with the
Configuration Wizard
8. On the Clusters screen:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

A. Click Add.
B. Enter the cluster’s name and address (optional).
C. Do this for each cluster.
D. Click Next.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Cluster Address is used in entity and stateless Enterprise JavaBeans to construct the
C
neYou can explicitly define the cluster address when you configure the cluster; otherwise,
host name portion of request URLs.
R e
WebLogic Server dynamically generates the cluster address for each new request. Allowing
WebLogic Server to dynamically generate the cluster address is easier, in terms of system
administration, and is suitable for both development and production environments.

Oracle WebLogic Server 12c: Administration I 4 - 22


Creating a Domain with the
Configuration Wizard
9. On the Assign Servers
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

screen:
A. Select a cluster.
B. Select a server.
C. Click the right arrow.
D. Repeat as needed.
n s e
ce
E. Do this for each
li
ble
cluster.
F. Click Next.
fer a
a n s
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 23


Creating a Domain with the
Configuration Wizard
10. On the Machines screen:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

A. Click the proper tab.


B. Click Add.
C. Enter the Name, Node Manager Listen Address, and Port.
D. Do this for each machine.
E. Click Next.
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The wizard did not display the Coherence Clusters screen because Coherence was not
C
neThe Machine tab only has three columns: Name, Node Manager Listen Address, and Node
selected earlier under Templates.
R e
Manager Listen Port.
The Unix Machine tab adds fields to allow the server process, after it finishes all privileged
startup actions, to bind to a UNIX group ID (GID) and a UNIX user ID (UID). By default, this is
not enabled, and if you do not need this capability, you can choose the Machine tab, even if
this machine’s operating system is UNIX (or Linux). Generally, you only need this feature
when you configure your servers to low-order ports (less than 1024). The extra Unix Machine
fields are:
• Enable Post Bind: If selected, the server should bind to a GID after it finishes all
privileged startup actions.
• Post Bind GID: The GID
• Enable Post Bind: If selected, the server should bind to a UID after it finishes all
privileged startup actions.
• Post Bind UID: The UID

Oracle WebLogic Server 12c: Administration I 4 - 24


Creating a Domain with the
Configuration Wizard
11. On the Assign Servers
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

to Machines screen:
A. Select a machine.
B. Select a server.
C. Click the right arrow.
D. Repeat as needed.
n s e
ce
E. Do this for each
li
ble
machine.
F. Click Next. fer a
a n s
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 25


Creating a Domain with the
Configuration Wizard
12. On the Configuration Summary
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

screen, review the configuration


and click Create.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 26


Creating a Domain with the
Configuration Wizard
13. On the Configuration
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Progress screen,
when the progress
bar reaches 100%,
click Next.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 27


Creating a Domain with the
Configuration Wizard

14. On the Configuration Success


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

screen, click Finish.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 28


Domain File Structure

Directory Description
 domain-name
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

The name of this directory is the name of the domain.


 bin Scripts for starting and stopping the servers in the domain
 config The saved configuration of the domain is contained in the
config.xml file and other subdirectories and files.
 lib JAR files placed here are automatically added to the CLASSPATH of
each WebLogic Server started on this machine.
 nodemanager The default location for the domain’s Node Manager
n s e
 pending Domain configuration changes that have been saved but not yet
lice
ble
activated are stored here temporarily.
 security Domain-wide security-related files
fer a
a n s
tr
 servers
-
One subdirectory for each server in the domain
 server1 o
nand n
The server directory for the server of the same name

s a ฺ
 data
a
) h uid
Data for internal LDAP, Node Manager,
e
saved diagnostics

x
ฺm deployed t G applications
 logs Server log files
Default stagingm directory forn
 stage o
ฺc tud e
ro
e is S
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
There uz (re
Cr
are more directories under a domain than those listed in the slide.

en e
R

Oracle WebLogic Server 12c: Administration I 4 - 29


Creating a Domain to Support
FMW Components
Domain templates are supplied when certain FMW components
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

are installed, such as Oracle SOA Suite.


• If you add another FMW component, extend the domain
with that product’s extension template.

Existing Domain Template Components that Can Be Added/Registered

n s e
Oracle SOA Suite Any other Oracle SOA Suite component
lice
Any Oracle WebCenter component
r a ble
Any Web Tier component
n sfe
a - tr
Oracle Identity Management Other Identity Management components
no n
Any Web Tier component
s eฺ a
h a
)component id
x u
Oracle Portal, Oracle Reports, Any of these components
Oracle Forms Services, Oracle Any Web Tier
m ฺm nt G
Business Intelligence Discover
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
When uaz
(re
Cr is product based. In other words, it is the one that supports a particular component,
WebLogic Server domain is created, it is created with a template. Usually that
etemplate
n such as Oracle SOA Suite. If you want to add other Fusion Middleware components to that
Re domain, such as Oracle WebCenter, you extend the domain by using an extension template
for the new component that you want to add. When you extend a domain, the domain must be
offline (no servers running).
The Oracle Identity Management suite of components includes Oracle Internet Directory (a
general purpose directory service that combines LDAP with the performance and scalability of
an Oracle Database), Oracle Identity Federation (a self-contained federation server that
enables single sign-on and authentication in a multiple-system identity network), Oracle
Identity Manager (a user provisioning and administration product), Oracle Access Manager (a
product that provides a full range of perimeter security functions that include single sign-on,
authentication, authorization, policy administration, auditing, and more), Oracle Adaptive
Access Manager (a product that provides risk-aware authentication, real-time behavior
profiling, and risk analysis), and Oracle Authorization Policy Manager (a graphical interface
tool to manage application authorization policies). If a domain is created to include a product
in the Oracle Identity Management suite, it can be extended with other products in that suite.

Oracle WebLogic Server 12c: Administration I 4 - 30


Extending a domain for system components (like the Web Tier components) does not add them
to the WebLogic Server domain, but rather registers them with the domain so that they may be
controlled and monitored by Fusion Middleware Control.
Additionally, you may need to run the Repository Creation Utility (RCU) to add any required
schemas for the new component, and, of course, the new component must also be installed.
After it is installed, the prebuilt templates for that component will be available to the
Configuration Wizard.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 31


The Domain on Other Hardware

Remember, each computer that has instances of WebLogic


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Server running on it must have a domain directory.


• The administration server domain directory is created by
the Configuration Wizard.
• To create the domain directory on other computers (for
managed servers) use the pack utility to create a managed
n s e
server template. Move the managed server template JAR
lice
file to the other computer, and then use the unpack utility.
r a ble
• It is a best practice to place the domain directory n s fethe
in
n
same location on all computers that run that - ra
tdomain’s
o
servers. an s eฺ
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz that run WebLogic Server will have a domain directory.
All computers

n e •C The main domain directory (for the administration server) will be created by the
Re Configuration Wizard.
• To create domain directories for other computers (where the managed servers will be
running), use the pack utility to create a managed server template. The pack utility is
found here: <MW_HOME>/oracle_common/common/bin/pack.sh. After the
managed server template JAR file has been created, move it to the machine where the
managed server or servers will be running (and where WebLogic Server has already
been installed), and use the unpack utility:
<MW_HOME>/oracle_common/common/bin/unpack.sh
• Make sure that each domain directory (for the same domain) is placed in the same
location on each computer.

Oracle WebLogic Server 12c: Administration I 4 - 32


Creating the Domain Archive: Pack

1. On the administration server machine, use the pack.sh


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

script with the managed option.


$> cd <MW_HOME>/oracle_common/common/bin
$> ./pack.sh -domain=domain_path/domain_name
-template=name.jar
-template_name=somename
-managed=true
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Note that there are other available options for the pack.sh script.
C
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 33


Using the Domain Archive: Unpack

2. Move the JAR file to the machine where a managed server


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

will run. (The WebLogic Server product must already be


installed there.)
3. Before running the unpack.sh script on that machine,
create the directory in which to place the domain. (In the
example below, it is called domain_path.)
n s e
4. Run the unpack.sh script:
lice
r a ble
$> ./unpack.sh -domain=domain_path/domain_name nsfe
$> cd <MW_HOME>/oracle_common/common/bin

-template=pathtojar/name.jar-tra
n on
s a ฺ
) h uidea
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re are other available options for the unpack.sh script.
C ru
Note that there

R ene

Oracle WebLogic Server 12c: Administration I 4 - 34


Quiz

Domains are created from ____________.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. The administration server


b. WAR files
c. Templates
d. The administration console
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzc
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 4 - 35


Quiz

To copy a domain from the administration server machine to a


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

managed server machine, use the _________________.


a. Pack and unpack utilities
b. Configuration Wizard
c. Template builder
d. Zip and unzip utilities
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruza
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 4 - 36


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Describe a domain’s file system


• Create a domain by using the Configuration Wizard
• Configure resources by using the Configuration Wizard
• Copy a domain to another computer with the pack and
unpack utilities
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 37


Practice 4-1 Overview:
Creating a New Domain
This practice covers creating a new domain by using the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Configuration Wizard.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 38


Practice 4-2 Overview:
Copying a Domain to a New Machine
This practice covers copying a domain to another machine that
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

will run managed servers.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 4 - 39


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

R e ne
C r uz(
re n e
r u
ฺc to u
s
o ฺ
z@ se th
co m
er i s S tu
x
d
)
e
ha
ฺm nt G u
a
id
no
s eฺ
n- tr
a n sfer a ble
lice n s e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Starting Servers

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Start and stop servers with standard scripts


• Deal with server startup problems
• Customize start and stop scripts

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 5 - 2


WebLogic Server Life Cycle

As a server starts, stops, and runs, it finds itself in various


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

states. The most important of these states are:


• RUNNING: The server is fully functional, offering its services to
clients.
• SHUTDOWN: The server is configured, but not active.
• ADMIN: The server is running, but available only for
n s e
ce
administrative operations. Services are available to
li
ble
administrators, but are not available to other clients.

fe
FAILED: The server itself has failed (for example, it is out r a
of
n s
memory) or it has detected that one or more critical
n - trasubsystems
o
an ฺ
are unstable.
FAILED
h s
a ide
x ) u

m den m t G
o
SHUTDOWN ADMIN RUNNING

r c
oฺ Stu
e
s this
u z @ e Oracle and/or its affiliates. All rights reserved.
cr u s
eฺ
Copyright © 2013,

r e n to
r uz(
Note that this is a simplification of the server life cycle, showing only the most important
C
ne
states. There are quite a few transitional states that are not shown. See the “Understanding
R e Server Life Cycle” chapter in the Administering Server Startup and Shutdown for Oracle
WebLogic Server document for the other states, as well as many details on how a server
transitions from one state to another.
The states shown are:
• RUNNING: In the RUNNING state, WebLogic Server is fully functional, offering its
services to its clients. It can also operate as a full member of a cluster. A server instance
transitions to the RUNNING state as a result of a “start” command, or the “resume”
command from the ADMIN state.
• SHUTDOWN: In the SHUTDOWN state, this instance of WebLogic Server is configured,
but inactive. A server enters the SHUTDOWN state as a result of a “shutdown” or “force
shutdown” command. You can transition a server in the SHUTDOWN state through
transitional states to either RUNNING (with a “start” command) or ADMIN (with a “start
in admin” command).

Oracle WebLogic Server 12c: Administration I 5 - 3


• ADMIN: In the ADMIN state, WebLogic Server is up and running, but available only for
administration operations. You can start a server in the ADMIN state by using a “start in
admin” command. Also, a server transitions through the ADMIN state when going from
SHUTDOWN to RUNNING and vice versa. When a server is in the ADMIN state:
– The administration console is available.
– The server accepts requests from users with the Admin role. Requests from non-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

admin users are refused.


– Applications are activated in the application ADMIN state. The applications only
accept requests from users with the Admin and AppTester roles.
– The subsystems are active, and administrative operations can be performed upon
them.
– Deployments are allowed, and take effect when the server goes back to the
RUNNING state.
n s e
lice
– If the server is part of a cluster, the Cluster Service is active and listens for

ble
heartbeats and announcements from other cluster members, but this server is
invisible to the other cluster members.
fer a
a n s
tr
• FAILED: A running server can fail as a result of out-of-memory exceptions or stuck
n-
no
application threads. Also, as a server monitors its health, if it detects that one or more
a
critical subsystems are unstable, it declares itself FAILED. When a server enters the
s eฺ
ha
FAILED state, it attempts to return to a nonfailed state. If it failed before reaching the
) id
x
ฺm nt G u
ADMIN state, the server instance shuts itself down. If the server fails after reaching the

o m e
ADMIN state, but before reaching the RUNNING state, by default, it returns to the ADMIN
c d
o ฺ tu
er i s S
state if an administration port has been configured. A server can enter the FAILED state
s
from any other state. However, once a server has entered the FAILED state, it cannot

r u z@ se th
return to a RUNNING state directly. The FAILED state is fatal and a server must go into
e ฺc to u
the ADMIN or SHUTDOWN state before returning to the RUNNING state.
n
z re
Note: The (commands in the explanation above are shown in double quotes (for example, “start

C ru command)
in admin” to indicate that there are such commands, without giving what the
e
n labeled Start. The “start” command in the WebLogic Scripting Tool (WLST) is either start()
command actually is. For example, the “start” command in the administration console is a button
Re or startServer().

Oracle WebLogic Server 12c: Administration I 5 - 4


Starting WebLogic Server with a Script

When a domain is created, scripts are generated and placed in


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the domain’s bin directory.


• The administration server start script:
– startWeblogic.sh
No parameters

e
$> cd /u01/domains/part1/wlsadmin/bin
n s
ce
$> ./startWebLogic.sh
li
• Managed servers start script:
r a ble
– startManagedWeblogic.sh
n sfe
- tr (required) a

n
no (optional)
Parameter one: The name of the managed server
aserver
Parameter two: The URL of the admin
s ฺ
a ide

) h
ฺmx t Gu
$> ./startManagedWebLogic.sh server1

om uden
http://host01.example.com:7001
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
To start the administration server, open a terminal window and change to the bin directory
C
ne
under the domain directory. Run the startWebLogic.sh script. If prompted for a username
R e and password, enter the administrator credentials set when the domain was created. Note
that this script calls the setDomainEnv.sh script that sets the environment variables and
options. Also note that there is a convenience script in the main domain directory, also called
startWebLogic.sh. This script calls the script of the same name in the bin directory.
To start a managed server, open a terminal window and change to the bin directory under
the domain directory. Run the startManagedWebLogic.sh script with its parameters. The
first parameter is required and is the name of the managed server to start. The second
parameter is the URL of the administration server of the domain. If omitted, it defaults to
http://localhost:7001. If prompted for a username and password, enter the
administrator credentials set when the domain was created. This managed server start script
actually calls the startWebLogic.sh script, which calls the setDomainEnv.sh script.
The setDomainEnv.sh script calls a generic “set the environment” script under the install
directories: <WL_HOME>/common/bin/commEnv.cmd.
Note that in a Microsoft Windows environment, you use the equivalent scripts that end in
.cmd.

Oracle WebLogic Server 12c: Administration I 5 - 5


Creating a Boot Identity File

Starting or stopping WebLogic Server requires administrative


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

authority. The scripts prompt for a username and password.


A boot identity file contains administrator credentials, making
prompting unnecessary.
1. Each server has its own directory in the domain. For example,
servers/server1. Under that directory create a new
n s e
lice
subdirectory called security.
2. Create a text file there called boot.properties: le a b
fer
ans
username=adminuser
password=thepassword
n - tr
a no the file for its
3. Start the server with the script. The server
h a sstarts. eฺThe server also
reads
x
credentials. If they are valid, the server ) u i d
ฺ m t G
om uden
encrypts both values in the file so that they are now secure.
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (refile contains the user credentials for starting and stopping an instance of
A bootuidentity
e Cr Server. An administration server or managed server can refer to this file for user
en credentials rather than prompt at the command line for them. Because the server encrypts the
WebLogic
R credentials in the boot identity file, it is more secure than storing plain text credentials in start
or stop script. There can be a different boot identity file for each server in a domain. Both start
and stop scripts can use a boot identity file.
If you choose Development Mode when creating a domain by using the Configuration Wizard,
a boot identity file is automatically created for the administration server. Boot identity files
must be manually created for a Production Mode domain.
If you use Node Manager to start managed servers, rather than running start scripts manually,
you do not need to create boot identity files for those servers. Node Manager creates its own
boot identity files and stores them under each server’s directory in the data/nodemanager
subdirectory.

Oracle WebLogic Server 12c: Administration I 5 - 6


Stopping WebLogic Server

A server can be stopped:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• By using the admin console. There are two options:


– When work completes (sessions complete or time out)
— You can set the Graceful Shutdown Timeout for a server
(seconds to wait before switching to a forced shutdown)
– Force Shutdown Now (session data lost)
n s e
• With a standard stop script
lice
– These standard domain scripts do a forced shutdown ble
fe ra
• By killing its JVM process
a n sCtrl+C
in the Terminal n
The same effect as pressingr
-t in which a
– kill -2
o
n is running.
window

s aserver
a ideฺ
Does a forced shutdown
h

– kill -9 x ) u

m den m t G
c o
“Hard” kill, no “shutdown” code; use only as a last resort
oฺ Stu

e r
s this
u z @ e Oracle and/or its affiliates. All rights reserved.
cr u s
eฺ
Copyright © 2013,

r e n to
r uz(
The stopWebLogic.sh script is for stopping the admin server. It takes no parameters.
eTheCstopManagedWebLogic.sh script is for stopping a managed server. It takes two
n parameters:
Re
• The managed server name (required)
• The URL of the admin server (optional—defaults to t3://localhost:7001)
See the “Understanding Server Life Cycle” chapter in the Administering Server Startup and
Shutdown for Oracle WebLogic Server document for more details (for example, what the
server normally does when shutting down and the possible server states).
Note: If the admin server is writing to the configuration files when its process is killed abruptly
(kill -9), the configuration could be corrupted.

Oracle WebLogic Server 12c: Administration I 5 - 7


Suspend and Resume

A server that is suspended goes from the RUNNING state to


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the ADMIN state.


• A server can be suspended by using the admin console.
There are two options:
– When work completes
– Force Suspend Now
n s e
A suspended server can be resumed. It then transitions from ice
the ADMIN (or STANDBY) state to the RUNNING state. ble
l
fera
• A server can be resumed by using the admin console.
a n s
n -t r
• STANDBY is a state in which a server has n o completed its
s a any ฺ requests. (Its
startup procedure, but does not process
h a d e
regular listen port is closed.) x
ฺ m
) is used
This
G ui to keep a server
ready as a “hot” backup.
co m dent
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
( in STANDBY, you can change its default startup mode by using the admin
za server
r u
To start
C Select the server, then click the Configuration > General tab. Click Advanced.
econsole.
n Change the Startup Mode field to Standby. You must have an admin port defined for the
Re domain, so that the server can listen on its admin port for the command to resume.

Oracle WebLogic Server 12c: Administration I 5 - 8


Customizing Standard Scripts

The standard start scripts can be customized to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Change WebLogic Server runtime options


• Change which JVM runs WebLogic Server
• Change JVM options
– Performance tuning of the JVM
• Modify the CLASSPATH
n s e
lice
r a ble
n sfe
a
- tr
o
nNEW n
s a ฺ
a
AND
) h uidIMPROVED! e
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 5 - 9


WebLogic Server Options

The options of weblogic.Server are used to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

The Java
• Change the location of configuration data class that
starts WLS
– Examples:
— WebLogic home: -Dweblogic.home=path
— Default: Determined by CLASSPATH
Server root directory: -Dweblogic.RootDirectory=path
e

n s
ce
Default: The directory from which the server was started
i

l
ble
• Override a server’s configuration
a
This line could rbe
fe such as
to a starts
added
– Examples:
a n
n-tr
script
-Dweblogic.ListenAddress=host startWebLogic.sh.

no

a ฺ
-Dweblogic.ListenPort=portnumber
s

) h uidea
x
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.ListenPort=9001"

m ฺmusing n G
tthe
– Instead, make changes
ฺ co by
u d e admin console/WLST.
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
r u
Setting environment variables is shown as it is done in Linux.
C
e ne There are many more -D options to override a server’s configuration. See the Command
R Reference for Oracle WebLogic Server.

Oracle WebLogic Server 12c: Administration I 5 - 10


WebLogic Server Options

The options of weblogic.Server are used to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Change the server type


– Normally all server services are started.
– If you do not need EJBs, JCA (Java EE Connector
Architecture), or JMS, you can run the lighter version of
WebLogic Server that does not start those services.
n s e
ce
– Use the -DserverType=wlx option.
li
JAVA_OPTIONS="${JAVA_OPTIONS} -DserverType=wlx"
r a ble
n sfe
n - tra
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z re of WebLogic Server takes less memory and starts up faster.
(version
ru
The lighter
C
eThe Java EE Connector Architecture is used by tool vendors and system integrators to create
n resource adapters. A resource adapter is a software component that allows Java EE
Re
applications to access and interact with the underlying resource manager of an enterprise
information system (EIS).

Oracle WebLogic Server 12c: Administration I 5 - 11


Changing the JVM

• There are environment variables used to indicate which


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

JVM runs WebLogic Server. In setDomainEnv.sh, there


are the following variables:
– VM_TYPE: Values such as "HotSpot" or "JRockit"
– JAVA_VENDOR: Values such as "Oracle" or "Sun"
– JAVA_HOME: Location of the JDK
n s e
lice
• If, for example, both the HotSpot and JRockit JDKs are
installed, ensure that the SUN_JAVA_HOME and
r a ble
BEA_JAVA_HOME variables are set properly. Then,
n sfenear
n- tra
the top of setDomainEnv.sh, add a line setting
o
VM_TYPE: an s eฺ
) h a id
x u
VM_TYPE="JRockit" or VM_TYPE="HotSpot"

– Logic in the script will set


o m ฺm
e
the other n t Gvariables accordingly.
ro ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 5 - 12


JVM Options

• The options that are available depend upon the JVM.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• For memory options, set the USER_MEM_ARGS variable in


setDomainEnv.sh.
Where Java
– Xms is the minimum heap size. classes are kept
– Xmx is the maximum heap size.
– XX:MaxPermSize sets the maximum permanent space for a
n s e
HotSpot JVM.
lice
USER_MEM_ARGS="-Xms64m -Xmx200m -XX:MaxPermSize=350m" le
r a b
sfe
• For other options, update the JAVA_OPTIONS variable
r a n in
setDomainEnv.sh.
o n -t
s a nmark-sweep”
– For example, to choose the “concurrent
garbage collection algorithmxof
a ideฺ
) hHotspot:
ฺ m G u
om uden t
c
JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+UseConMarkSweepGC"

sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

e n e
z (rthe
C r u
The heap is area of memory where objects are created and deleted dynamically. It has a

e n e
configurable minimum and maximum size and is organized into different areas called
R generations. Objects that exist for a certain amount of time are promoted to the next
generation. Older generations are garbage collected less frequently. The permanent
generation, in a HotSpot JVM, is where application Java classes are stored. The allocation
and deallocation of memory for objects is handled by the JVM. Garbage collection is the
process of detecting when an object is no longer referenced, clearing the unused object from
memory, and making reclaimed memory available for future allocations. JVM garbage
collection happens automatically.
There are different algorithms for how JVMs perform garbage collection. One algorithm is
called concurrent mark-sweep. For an application where fast response time is the most
important performance criteria, this algorithm might be chosen. Generally, garbage collection
for a young generation does not cause long pauses. However, old generation collections,
though infrequent, can sometimes create longer pauses. With the concurrent mark-sweep
algorithm most of the collection of old generations is done concurrently with the execution of
the application so those pauses do not affect the application.
A JVM often has many options that can be set. See the particular JVM documentation.

Oracle WebLogic Server 12c: Administration I 5 - 13


Modifying the CLASSPATH

• The Java CLASSPATH tells the JVM where to find


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

user-created packages and classes.


• There are many environment variables relating to the
CLASSPATH. They are used to update the CLASSPATH for
patches and libraries. These variables are set in:
– domain_name/bin/startWebLogic.sh
n s e
– domain_name/bin/setDomainEnv.sh
lice
ble
– <MW_HOME>/oracle_common/common/bin/commEnv.sh
ra
fe
ans
• To modify the CLASSPATH for:
– All domains, edit the commEnv.sh script n-tr
o
nsetDomainEnv.sh
a
s eฺ
a
– A particular domain, edit that domain’s
script x) h uid
m ฺm nt G These files may need to be

ฺ co ude modified on multiple hosts.


o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r uz
The CLASSPATH makes available to the JVM (and WebLogic Server) classes that are
C for the server. The classes that make up the server itself, classes that patch the
erequired
n current version of the server, classes that make up tools such as Log4J or Ant, startup and
Re shutdown classes, and database driver classes are the kinds of classes that go into the
CLASSPATH. If the classes for the CLASSPATH are compiled in the expanded format, the
directory that contains their package directory is added to the CLASSPATH. If the compiled
classes are in a Java archive (JAR) file, the path to and the name of the JAR file is added to
the CLASSPATH.
The CLASSPATH is not for application classes. Those compiled classes reside within
application archives. There are better ways to share classes between applications than
modifying the CLASSPATH. Use Java Optional Packages or WebLogic Server Shared
Libraries for sharing application classes among deployed applications.
If you run instances of WebLogic Server on multiple hosts, remember that the scripts you are
modifying reside on each host—whether you are modifying the commEnv.sh script under the
installation directories or the setDomainEnv.sh under the domain directories.

Oracle WebLogic Server 12c: Administration I 5 - 14


Modifying the CLASSPATH

To modify the commEnv.sh installation script:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Add your JAR file to the WEBLOGIC_CLASSPATH


environment variable.
– If your classes need to be found first, place your JAR file as
the first thing in the string
WEBLOGIC_CLASSPATH="/tools/mytool.jar${CLASSPATHSEP}..."
n s e
lice
To modify the setDomainEnv.sh domain script:
r a ble
• Create the PRE_CLASSPATH environment variable, n sfeif it
does not exist, and assign it to your JARofile. n -tra
PRE_CLASSPATH="/tools/mytool.jar" s a
n
) h a ideฺ
ฺ m x G u
• If the variable already exists,
o m den add t your JAR file to it.
r c
oฺ Stu
e
s this
u z @ e Oracle and/or its affiliates. All rights reserved.
cr u s
eฺ
Copyright © 2013,

r e n to
r uz(
The CLASSPATHSEP variable is used as the CLASSPATH delimiter so the same script can be
e C in multiple operating systems. It is set in the commEnv.sh script.
n
used
R e

Oracle WebLogic Server 12c: Administration I 5 - 15


Modifying the CLASSPATH

• To add code in a JAR file to the CLASSPATH of all servers


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

in the domain, without changing any of the startup or set


environment scripts, place the JAR file in the lib directory
of the domain.
– All JAR files in this directory are added dynamically to the
end of each domain server’s CLASSPATH the next time the
server starts.
n s e
– Note that the JAR file needs to be placed in the domain’s e
l lice
lib directory on each host on which servers from thisrab
e
domain run. nsf tra
n -
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 5 - 16


WebLogic Server Startup Issues

• Severe errors during server startup may cause:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– WebLogic Server to exit prematurely


– The JVM to crash (rare)
• Common causes include:
– Missing or invalid server start parameters
– Another process using the address and port of the server
n s e
– Custom start scripts with errors lice
– Missing or invalid boot credentials or SSL files r a ble
n sfe
– An invalid or corrupt domain configuration
n - tra
o failed.
an ฺ
– A corrupted
<Critical> LDAP server
<WebLogicServer> <BEA-000362> <Server
Reason: [Management:141245]Schema validation error...>
h s
a ide
...
)
x <AGucritical service
<Error> <WebLogicServer> <BEA-000383>
ฺ m
m dent down.>
failed. The server will shut
co itself

e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
( startup error messages include the following:
zserver
r u
Possible
e •C Unable to create a server socket. The address <listenAddress> might be incorrect or
e n
R another process is using port <port>.
• Cannot use SSL because no certificates have been specified in the WebLogic Server
configuration
• Cannot read private key file <file>. Exception is <exception>.
• Server failed. Reason <reason>.
• Unable to initialize the server: <server>
The first time you start a managed server instance, it must be able to contact the
administration server. Thereafter, the managed server can start even if the administration
server is unavailable. This is called managed server independence (MSI) mode and is
enabled by default. The managed server starts by using its local copy of the configuration.
To start and stop WebLogic Server, you must provide the credentials of a user who is
permitted to start and stop servers for the domain. Users must fit the criteria of the global
Admin role defined in the security realm. By default, this role includes all members of the
Administrators group.

Oracle WebLogic Server 12c: Administration I 5 - 17


Failed Admin Server

• If the administration server fails:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– There is no effect on running managed servers or their


applications, so your users are unaffected.
— When the admin server returns, managed servers reconnect.
– A managed server not running can be started without the
admin server, if it has:
n s e
ce
Been started at least once before to obtain its own copy of the
i

l
ble
configuration
Enabled
Managed server independence (MSI) mode enabled rbyadefault
e
– No changes to the configuration can be made.ansf

n - tr
a no
as Managed eฺ
Domain
Managed) h i d
Admin Managed
ฺ m x G uServer Managed
Server Server
om uden
Server t Server
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
Cru
e ne
R

Oracle WebLogic Server 12c: Administration I 5 - 18


Restarting a Failed Admin Server:
Same Machine
• To restart the admin server on the same machine:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Run the start script again


— If the server fails again:
— Analyze the reason for the failure (from the server log)
— Correct the issue
— Run the start script
– If the admin server was started by Node Manager, Node
n s e
Manager can be set to automatically restart it. lice
• When the admin server has restarted, the running rabl
e
n sfe
tra
managed servers will reconnect to it.
n -
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
C ru
n e
Re

Oracle WebLogic Server 12c: Administration I 5 - 19


Restarting a Failed Admin Server:
Different Machine
• To restart the admin server on a different machine:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– The admin server backup machine must have already been


configured and contain:
— WLS installation
— Domain files
Deployed applications
e

n s
ce
– If using a virtual IP address, move it to the backup machine.
li
– Start the admin server (start script or Node Manager). le b
fera
• When the admin server has restarted, the running
a n s
-t
managed servers reconnect to it if the admin rserver has:
n
– A virtual IP address a no
a sIP addresses

) h
– A host name that maps to multiple ide
x u
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
If the admin server is started with a different IP address but has the same host name, its
C
ne
managed servers can find it. Therefore, it is good planning to use a virtual host or DNS name
R e that maps to multiple IP addresses for the admin server.

Oracle WebLogic Server 12c: Administration I 5 - 20


Restarting a Failed Managed Server:
Same Machine
• To restart a managed server on the same machine:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Run the start script again


— If the server fails again:
— Analyze the reason for the failure (from the server log)
— Correct the issue
— Run the start script
– If the managed server was started by Node Manager, Node
n s e
Manager can be set to automatically restart it. lice
r a bitsle
fe
• As the managed server is restarted, it reconnects with
n s
tra
admin server.
n -
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
C ru
n e
Re

Oracle WebLogic Server 12c: Administration I 5 - 21


Restarting a Failed Managed Server:
Different Machine
• To restart a managed server on a different machine, it
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

needs:
– WLS installation
– Domain files
– Deployed applications
– JTA and JMS artifacts
n s e
– If using a virtual IP address, move it to the backup machine
lice
• Start the managed server (start script or Node Manager).
r a ble
• As the managed server is restarted (even if onan fe
a sdifferent
IP address), it reconnects with its admin oserver. n -tr
acann
• A clustered managed server that a
h s
fails
e ฺ be configured to
x) Gui or manually. d
migrate to another machine automatically
m ฺ m t
navailable.
co mustdbe e
oฺ Stu
– JTA and JMS artifacts
e r
s this
u z @ e Oracle and/or its affiliates. All rights reserved.
cr u s
eฺ
Copyright © 2013,

r e n to
(
z Server
r u
WebLogic provides the capability to migrate clustered managed server instances. If a
C managed server has been configured to be migratable and it fails and cannot be
e n e
clustered
R restarted on its current hardware, it can be moved to new hardware either manually by an
administrator or automatically. The migration process makes all of the services running on the
server instance available on a different machine, but not the state information for the JTA and
JMS services that were running at the time of failure. For whole server migration or service-
level migration to work properly, the artifacts of these services (TLogs for JTA and JMS stores
for JMS) must be available to the new hardware. Therefore, these artifacts must be in a
database that is accessible or in shared storage that is accessible.
For more information, see "Whole Server Migration" in Oracle Fusion Middleware
Administering Clusters for Oracle WebLogic Server.

Oracle WebLogic Server 12c: Administration I 5 - 22


Quiz

The startManagedWebLogic.sh script takes two


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

parameters. They are:


a. The name of the admin server and the URL of the
managed server
b. The name of the managed server and the URL of the
managed server
n s e
c. The name of the admin server and the URL of the admin lice
server
r a ble
e
d. The name of the managed server and the URL nofsfthe
n- tra
admin server o
s an ฺ
) h a ide
ฺ m x G u
om uden t
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzd
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 5 - 23


Quiz

The name of the boot identity file is:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. boot.identity
b. identity.properties
c. boot.properties
d. password.properties
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzc
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 5 - 24


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Start and stop servers with standard scripts


• Deal with server startup problems
• Customize start and stop scripts

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 5 - 25


Practice 5-1 Overview:
Starting and Stopping Servers
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Starting the administration server with a script


• Starting managed servers with a script
• Creating a boot identity file
• Modifying server start scripts
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 5 - 26


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Using the Administration Console

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Access the WebLogic Server administration console


• Create and configure servers by using the administration
console

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 6 - 2


Accessing the Administration Console

After starting the administration server, you can access the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

administration console in a web browser.


http://hostname:port/console
https://hostname:secureport/console

hostname = The host name or IP address of the administration server


port = The port number of the administration server
n s e
secureport = The secure sockets layer (SSL) port number of the admin server
lice
r a ble
n sfe
- tra
n
http://localhost:7001/console
http://adminDNSName:7001/console
a no
https://127.0.0.1:7002/console
h a s eฺ
x ) u id
m ฺm nt G
SSL on a different port
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,e tOracle
ฺc to u
Copyright

n e
z( re
r u
When started, the administration console prompts for a username and password.
C
e neIfport
you configured a domain-wide administration port, use that port number. An administration
R always uses SSL.
The first time you access the administration console, there may be a brief delay because the
application is deployed on-demand. If you prefer that the console be deployed at server
startup, do the following:
1. In the administration console, click the domain name under Domain Structure.
2. Click the Configuration tab, and then the General subtab.
3. Ensure that Enable on-demand deployment of internal applications is not selected.

Oracle WebLogic Server 12c: Administration I 6 - 3


Administration Console Login

Enter the username and password that you set when creating
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

your domain. The password is not displayed.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
When the login page appears, enter the username and password that you used to start the
C
ne
administration server or enter a username that belongs to one of the following security
R e groups:
• Administrators
• Operators
• Deployers
• Monitors
These groups provide various levels of access to the system administration functions in the
administration console.
By default, the administration server has an administration console application. If you want to
prevent access to this console (for example, as an added security measure in a production
environment), you can prevent the administration server from deploying it:
1. Select your domain name in the Domain Structure panel of the console.
2. Select Configuration > General and click Advanced at the bottom of the page.
3. Deselect Console Enabled and click Save.

Oracle WebLogic Server 12c: Administration I 6 - 4


Basic Navigation

Lock the configuration Help system


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

to make changes.

Breadcrumbs

n s e
Domain
about the selected resource le l
Tabs help organize information
ice
resources
r a b
sfe
(Configuration > Deployment)

tr a n
n -
a no
h a s eฺ
x ) the uid
ฺm based t Gon
Information about

o m
selected resource,
e n
ro ฺc tud
the tabs selected

se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
z ( Domain Structure is a navigation tree. Click any of the nodes in the tree to display

r u
Under
C information on that domain element. Click the “+” symbol to expand a node.
e ne •
R The right panel shows detailed information about the selection in the left panel. Often a
configuration element has many attributes, and these are organized by tabs and subtabs.
In the slide, a server was selected in the Domain Structure, and the Configuration tab
and Deployment subtab have been clicked on the right.
• Click the Lock & Edit button in the Change Center to lock the domain configuration. The
configuration must be locked before changes can be made. After changes have been
made, they may be undone by clicking the Undo All Changes button, or committed by
clicking the Activate Changes button.
• The console includes a “breadcrumbs” navigation feature, which presents a series of links
that show the path that you have taken (menu history). You can click any of the links to
return to a previously visited page.
• You can access the online Help by clicking the Help link in the menu.

Oracle WebLogic Server 12c: Administration I 6 - 5


Tabular Data

Often, information in the admin console is displayed in a table.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

You can customize the columns that are displayed.

n s e
1
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
When the data in the administration console is displayed as a table that lists resources of a
C
ne
particular type, you can customize the table by filtering the data displayed and adding or
R e subtracting the attributes that are displayed. You can also sort the data in the tables by
clicking the column headers. To customize a table:
1. Click the Customize this table link, located at the top of the table.

Oracle WebLogic Server 12c: Administration I 6 - 6


Customizing a Table

Sort by this attribute.


2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Move selected attributes Move all attributes from


3 from Available to Chosen. Available to Chosen.

4
n s e
lice
ble
Select a Chosen attribute and use these

a
arrows to change its order in the table.

fer
5 n s
6
n - tra
a no
h a s eฺ
7
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
To customize a table:
C
e ne 2. Select an attribute for filtering the data displayed. Optionally, enter a filtering text
R string in the Criteria field. The filtering criteria is specified as an expression of the
WebLogic Diagnostics Framework (WLDF) Query Language.
3. To show attributes that are currently not displayed, select them in the Available
column and click the single right arrow to move them to the Chosen column. If you
want to move all attributes from Available to Chosen, click the double-right arrow.
You can also select attributes that are in the Chosen column and move them to the
Available column, so they are no longer displayed.
4. You can reorder the attributes displayed. Select an attribute in the Chosen column
and use the up and down arrows. An arrow with a line at its point moves the
selected attribute all the way up or all the way down.
5. Select the number of rows to display per page and the maximum number of results
returned.
6. When finished, click the Apply button.
7. The table now displays the columns of your choice.

Oracle WebLogic Server 12c: Administration I 6 - 7


Admin Console Preferences
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
1. At the top of the administration console there is a Preferences link. Click it to change
C
ne
console preferences.
R e 2. Change the value of one or more preferences and click Save. The preferences are
saved under the domain in
domain_name/servers/AdminServer/data/console/ConsolePreferences.
xml and set for you the next time you log in.
The preferences that are available include:
- Show Inline Help: Determines whether inline help appears for forms
- File Browser Start: Determines the directory in which the deployment file browser
starts
- Remember Last Used Path: Causes the deployment file browser to remember
the last path browsed to before selecting an application
- Show Advanced Sections: Causes advanced form sections to be displayed by
default
- Refresh Interval: Some pages have a refresh icon. When it is clicked, the admin
console periodically polls the resource and refreshes the screen. This attribute
controls how often this refresh occurs.

Oracle WebLogic Server 12c: Administration I 6 - 8


The preferences that are available include:
- Warn If User Holds Lock: Causes a warning message to be issued when a user
logs out, if that user is currently the owner of the domain configuration lock
- Warn User Before Taking Lock: Causes a warning message to be issued when the
user attempts to take the domain lock, reminding the user that another user is
currently the owner of the domain configuration lock
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Note that there are more preferences than the ones listed here.

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 6 - 9


Advanced Console Options

In the Advanced section of a screen, the console hides the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

options that are not frequently used.

n s e
lice
r a ble
2
n sfe
a
1
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
By default, only the most commonly changed configuration attributes are shown for a given
C
ne
resource, such as a server, cluster, data source, or application. To see the full list of available
R e attributes:
1. Click the Advanced link at the bottom of the page, if available.
2. Then view or update the options displayed.
The regular options shown for a server (under Configuration > General) are:
• Java compiler: The Java compiler to use for all applications hosted on this server that
need to compile Java code.
• Diagnostic volume: Specifies the volume of diagnostic data that is automatically
produced by WebLogic Server at run time for the WebLogic Diagnostic Framework
(WLDF). The default is “Low,” which means a minimal amount of data is produced.

Oracle WebLogic Server 12c: Administration I 6 - 10


The advanced options shown for a server (under Configuration > General) are:
• Virtual Machine Name: When WLS is running on JRockit Virtual Edition (which has been
discontinued), this specifies the name of the virtual machine running this server.
• WebLogic Plug-In Enabled: Specifies whether this server uses the proprietary WL-
Proxy-Client-IP header, which is recommended if the server instance receives requests
from a proxy plug-in. When the WebLogic plugin is enabled, a call to getRemoteAddr will
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

return the address of the browser client from the proprietary WL-Proxy-Client-IP header
instead of the web server.
• Prepend to classpath: The options to prepend to the Java compiler classpath when
compiling Java code

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 6 - 11


Administration Console Change Center

The domain configuration must be locked to change it.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Click the Lock & Edit button and make changes.


2. Click Activate Changes to commit those changes (or click
Undo All Changes to undo them).
Some activated changes will not take effect until the server
restarts. In the administration console, attributes that require a
n s e
server restart are marked with this icon: lice
r a ble
n sfe
- tra
no n
s eฺ a
h a id
2)
x u
ฺm nt G
1
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Each domain stores its configuration in XML files located in the config directory and its
C
ne
subdirectories. At run time, each instance of WebLogic Server creates an in-memory
R e representation of the configuration as a collection of read-only JMX managed beans
(MBeans).
In addition to the read-only Configuration MBeans, the administration server maintains a
collection of editable Configuration MBeans. To edit them, you use a JMX client (such as the
administration console or WLST). This client obtains a lock on the configuration before it
allows you to change it.
While holding the lock on the editable Configuration MBeans, in-memory changes can be
saved, which causes the administration server to write the changes to a set of pending
configuration files in the pending directory of the domain.
When you activate changes, each server in the domain determines whether it can accept the
change. If all servers are able to accept the change, they update their copy of the domain's
configuration files. Then they also update their in-memory Configuration MBeans, and the
change is complete.
Many configuration changes can take effect on running servers, while others require the
affected servers to be restarted before they take effect. In the administration console, an
attribute that requires a server restart for changes to take effect is marked with a special icon.

Oracle WebLogic Server 12c: Administration I 6 - 12


Admin Console: Creating Domain Resources

The administration console can be used to create and


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

configure:
• Servers
• Clusters
• Machines
• JMS servers
n s e
lice
ble
• JMS destinations
fer a
• JDBC data sources
n s
• And more… -tra on
a ฺ n
Find the type of resource under Domain
h a s e
Structure, click Lock &
x) element’s d
ui attributes, click
Edit, click the New button, enter the
ฺ m
mChanges. nt G
Save, and then click Activate
co d e
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
z ( resources are quite as simple as the procedure given in the slide, but many
Not alludomain
r
e CIn addition, of course, you need to know what values should be entered for a resource’s
n
are.
R e attributes.

Oracle WebLogic Server 12c: Administration I 6 - 13


Creating a Resource Example: New Server

To create a new server:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
2 3 no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
This is an example of how to create a new domain resource by using the administration
C
neTo create a new managed server, perform the following steps:
console. In this example, you see how to create a new managed server.
R e
1. In the Change Center, click Lock & Edit.
2. Select Servers under Environment in the Domain Structure.
3. Click the New button. (Or to copy an existing server, click the Clone button.)
4. Fill in the information about the server and click Next.

Oracle WebLogic Server 12c: Administration I 6 - 14


The attributes to fill in for the new server are:
• Server Name: The domain’s name for this server
• Server Listen Address: The IP address or DNS name this server uses to listen for
incoming connections. (If left blank, clients can reach the server through an IP address of
the computer that hosts the server, a DNS name that resolves to the host, or with
localhost).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Server Listen Port: The TCP port that this server uses to listen for regular (non-SSL)
incoming connections.
• (Not shown) Should this server belong to a cluster? (Choices are: “No, this is a stand-
alone server,” “Yes, make this server a member of an existing cluster” (and you select the
cluster), and “Yes, create a new cluster for this server.”

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 6 - 15


Creating a Resource Example: New Server

To create a new server:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
n
6
a no
h a s eฺ
x ) u id
7
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
To create a new managed server, perform the following steps:
C
e ne 5. Review the server you are about to create and click Finish.
R 6. In the Change Center, click Activate Changes.
7. A message displays that indicates if any servers need to be restarted for the change to
take effect.

Oracle WebLogic Server 12c: Administration I 6 - 16


Modifying a Resource Example: Server

To modify a server:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4
1

n s e
lice
r a ble
n sfe
2
- a
tr
no n
a
s eฺ 5
h a id
3 x) u
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
This is an example of how to modify a domain resource by using the administration console.
C
ne
In this example, you see how to modify some attributes of the server created in the previous
R e example.
To modify a server, perform the following steps:
1. In the Change Center, click Lock & Edit.
2. Select Servers under Environment in the Domain Structure.
3. In the Servers table, click the link of the server you want to modify.
4. Select the appropriate back tab and front tab to access the attribute you want to modify.
5. Enter or modify the attribute value (or use a check box or drop-down list). In this
example, a drop-down list is used to select the Machine on which this server will run.

Oracle WebLogic Server 12c: Administration I 6 - 17


Modifying a Resource Example: Server

To modify a server:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
6
lice
r a ble
8
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
To modify a server, perform the following steps:
C
e ne 6. After making your changes, click the Save button.
R 7. In the Change Center, click Activate Changes.
8. A message displays that indicates if any servers need to be restarted for the change to
take effect.

Oracle WebLogic Server 12c: Administration I 6 - 18


Admin Console: Monitoring Domain Resources

The administration console can be used to monitor domain


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

resources:
• Servers
• Clusters
• Machines
• Deployments
n s e
lice
ble
• JMS destinations
fer a
• JDBC data sources
n s
• And more… -tra on
a ฺ n
Find the type of resource under Domain
h a s e
Structure, select a
x) Gutab d
i (and perhaps a
particular resource, click the Monitoring

m dentm
co
oฺ Stu
subtab).
e r
s this
u z @ e Oracle and/or its affiliates. All rights reserved.
cr u s
eฺ
Copyright © 2013,

r e n to
r uz ( The subtabs under the Monitoring tab are: General (state, version, OS, and so
• Servers:
C on) Health, Channels (statistics on hosts/ports), Performance (Java memory
e ne
R information), Threads (Java thread information), Timers (internal timers used by the
server) Workload (information on Work Managers), Jobs (Job Scheduler information),
Security (invalid logins and locked out users), Default Store (information on the default
persistent store used by JMS, JTA, WLDF, and others), JMS (information on JMS
connections and servers), SAF (information on Store and Forward agents), JDBC (data
sources), and JTA (transactions).
• Clusters: Information about the servers in the cluster, how often they drop out of the
cluster, failover data, and more
• Machines: Monitoring of the Node Manager under the machine
• Deployments: The state and other information about deployed applications
• JMS destinations (queues and topics): Information about messages on the
destination
• JDBC data sources: Information about connections and capacity

Oracle WebLogic Server 12c: Administration I 6 - 19


Admin Console: Controlling Domain Resources

The administration console can also be used to control domain


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

resources:
• Servers: Start, shut down, suspend, resume, and restart
SSL
• Clusters: Control the servers in the cluster
• Deployments: Start or stop servicing requests
n s e
• JMS destinations: Pause or resume production, insertion, lice
consumption r a ble
n sfe reset,
• JDBC data sources: Start, suspend, resume,rshrink,
- t a
clear statement cache no n
a
s eฺ
• And so on ha id
) Structure,
x
ฺm nt G
Find a resource type under Domain u select a
m de select how to control it.
ฺcotab, uand
ero is St
resource, click the Control
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r uz Start (only works if Node Manager is configured and running), shut down
• Servers:
C (when work completes or force shutdown now), suspend (go from RUNNING to ADMIN
e ne
R state), resume (from STANDBY or ADMIN to RUNNING state), and restart SSL (restart
SSL after changes made to the keystore files).
• Clusters: Control the servers in the cluster.
• Deployments: Start servicing all requests, start servicing only administration requests,
stop when the work completes, force stop, and stop but service administration requests.
• JMS destinations (queues and topics): Pause or resume the production of messages,
insertion of messages, and consumption of messages. Also with queues, new
messages can be created and placed on the queue.
• JDBC data sources: Start a data source that has been shut down, suspend (active
connections allowed to time out), force suspend (suspends immediately), resume (from
being suspended), shrink (the connection pool to the current number of reserved
connections or the initial size, whichever is greater), and clear statement cache (clears
all prepared and callable statements in each connection).

Oracle WebLogic Server 12c: Administration I 6 - 20


Enterprise Manager Cloud Control

• It is a tool for administering and monitoring your entire


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Oracle IT infrastructure, including FMW components.


• Cloud Control requires its own installation. (It is not
installed as part of some other component.)
• Cloud Control supplies a web browser–based tool for
administering and monitoring many Oracle components.
n s e
– Unlike other WebLogic tools, Cloud Control allows you to
lice
administer multiple WebLogic domains. ble ra
• n
Cloud Control was called Enterprise Manager Grid sfeControl
a
in 11g. n-tr no
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Enterprise Manager Cloud Control is composed of four main components:
C
e ne • One or more Oracle Management Agents
R • Oracle Management Plug-ins
• The Oracle Management Service (OMS)
• The Oracle Management Repository
An Oracle Management Agent (simply called an agent) is responsible for monitoring the
health of a target and is installed on the host on which a target runs. An agent collects
information about a target and sends it through the OMS to the Oracle Management
Repository.
Oracle Management Plug-ins provide the core Enterprise Manager Cloud Control features for
managing and monitoring Oracle technologies. These plug-ins can be downloaded and
deployed by using the new Self Update feature. This enables Cloud Control to be updated
with management support for the latest Oracle product releases, without having to wait for the
next Cloud Control release.

Oracle WebLogic Server 12c: Administration I 6 - 21


OMS is a Java Enterprise Edition web application. It receives information from agents and
saves that information in the Oracle Management Repository. It also provides the Cloud Control
console.
The Oracle Management Repository contains a collection of Grid Control schema objects such
as database jobs, packages, procedures, and views.
Enterprise Manager Cloud Control was called Enterprise Manager Grid Control in version 11g.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 6 - 22


Quiz

The default context path of the web application that is the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

administration console is: __________.


a. admin
b. em
c. console
d. weblogic
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzc
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 6 - 23


Quiz

In the administration console, to view information about a


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

domain resource, first select that resource in the __________.


a. Configuration tab
b. Domain Structure
c. Change Center
d. Menu
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzb
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 6 - 24


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Access the WebLogic Server administration console


• Create and configure servers by using the administration
console

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 6 - 25


Practice 6-1 Overview: Using the
Administration Console for Configuration
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Accessing the administration console


• Using the admin console to configure domain resources
• Setting some admin console preferences

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 6 - 26


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Configuring JDBC

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to configure:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• A generic data source


• A GridLink data source

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 7 - 2


JDBC: Overview

• The Java Database Connectivity (JDBC) API:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Is a platform and vendor-independent mechanism for


accessing and using a database
– Provides transparency from proprietary vendor issues
– Requires the use of a driver (a Java class)
• JDBC drivers are supplied with the WebLogic Server
n s e
installation or by your database vendor.
lice
r a ble
n sfe
Get connection Get connection
a - tr
Driver n
nocalls
SQL statements Database
s eฺ a
) h a id
Application
ฺ m x G u Database
Code
co m dent
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r uz (API is the way in Java code to work with the database Structured Query Language
The JDBC
C It builds on Open Database Connectivity (ODBC), so developers familiar with ODBC
e(SQL).
n find it easy to use.
Re
By using JDBC, a Java application can access virtually any relational database and run on
any platform with a Java Virtual Machine (JVM). That is, with JDBC, it is not necessary to
write one program to access a Sybase database, another to access an Oracle database,
another to access an IBM DB2 database, and so on. You can write a single program by using
the JDBC API. Because the application is written in Java, you need not write different
applications to run on different platforms, such as Windows and Linux.
JDBC accomplishes database connections by using a driver mechanism that translates the
JDBC calls to native database calls. Although most available drivers are fully written in Java
(Type 4 drivers), and are thus platform independent, some drivers (Type 2) use native
libraries and are targeted to specific platforms.

Oracle WebLogic Server 12c: Administration I 7 - 3


WebLogic JDBC Drivers

• Oracle and third-party drivers for many databases are


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

included in the WebLogic Server installation:


– Oracle 11g and 12c
– Sybase
– Microsoft SQL Server
– IBM DB2
n s e
– Informix
lice
– MySQL
r a ble
n sfe
• By default, these drivers are added to the server’s
- a
trupdate
CLASSPATH. To use other drivers, you must
o n the
server’s CLASSPATH.
s an ฺ
) h a ide
• XA (Extended Architecture) drivers
ฺ m x G u
provide support for
global transactions. om
c d e nt
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r uz ( JDBC drivers are installed with Oracle WebLogic Server in the
The WebLogic
C
e<WL_HOME>/server/lib
n Oracle WebLogic Server. Driver class files are included in the manifest CLASSPATH in
folder, where <WL_HOME> is the directory in which you installed
Re weblogic.jar, so the drivers are automatically added to the server’s CLASSPATH.

Oracle WebLogic Server 12c: Administration I 7 - 4


Global Transactions: Overview

• A global (distributed) transaction involves more than one


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

transactional resource.
– A transaction manager (TM) deals with each resource
manager (RM). WebLogic Server can act as a TM.

n s e
ce
Resource
i
Transactional
l
ble
Manager Resource
Transaction
fer a
a n s
tr Transactional
Manager
Resource
o n-
an
Application
s eฺ
Manager Resource

) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz Server can act as the transaction manager to the various transactional resource
WebLogic
e C in a global or distributed transaction.
n
managers
R e There will be more on global transactions in the lesson titled “Transactions.”

Oracle WebLogic Server 12c: Administration I 7 - 5


Two-Phase Commit

The Two-Phase Commit (2PC) protocol uses two steps to


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

commit changes within a global transaction:


• Phase I: Prepare
RM Resource
Yes
TM
Ready?
RM
e
Resource
Yes
n s
lice
• Phase II: If all resources are ready, the TM tells them r a ble
to
n sfe
tra
commit. Otherwise, the TM tells them to roll back.
o n -
a ฺ n RM Resource

a s
Commit ) h ideRM
TM

ฺ m x G u
om uden
Extended Architecture (XA) implementsc2PC.
t Resource


sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z re protocol:
(commit
u
rPhase
Two-phase
C
e n e • 1: TM asks RMs to prepare to make the changes.
R • Phase 2: If all RMs report that they are ready to commit, TM tells the RMs to commit,
which makes the changes permanent. If any RM is not ready to commit, TM tells all RMs
to roll back (undo any changes).
The Extended Architecture (XA) specification comes from the Open Group
(http://www3.opengroup.org), a global consortium that works on IT standards.

Oracle WebLogic Server 12c: Administration I 7 - 6


JDBC Data Source

• A data source is a Java object targeted to and managed by


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

one or more instances of WebLogic Server.


• A deployed data source has connections to a particular
database in its connection pool ready-to-go for applications
running on those servers.

database is used and how many connections are in the pool. ense
– The connection pool configuration determines which

le lic
rab
– Applications locate a data source in a server’s tree of
e
resources by using the Java Naming and Directory fInterface
s
tr a n
(JNDI) API.
-
ondata source, it can

n
a data
After the application has a reference to the
request a database connection from s the
h ฺ source.
a ide
x ) u
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
A data source is a Java object managed by WebLogic Server and used by application code to
C
ne
obtain a database connection. Retrieving a database connection from a data source is better
R e than getting a connection directly from the database for two reasons:
• Connections in a data source’s connection pool have already been created. Therefore,
the application does not have to wait for connection creation.
• All database-specific information moves out of the application code and into the
WebLogic Server configuration, making the code more portable and robust.
Data sources can be created by using one of the WebLogic Server administration tools. A
data source is configured with a connection pool that will contain connections to a particular
database. It is also targeted to one or more instances of WebLogic Server.
For an application to use one of the connections in a data source’s connection pool, first the
application looks up the data source in the server’s resource tree. The API used is the Java
Naming and Directory Interface (JNDI). Once the data source is retrieved, the application
asks it for a database connection. The data source gives the application one of the
connections not currently being used, from its pool of connections. The application uses that
connection to access the database. When the application is finished with the connection, it
closes it. But rather than close, the connection is returned to the connection pool for some
other application to use.

Oracle WebLogic Server 12c: Administration I 7 - 7


JDBC Data Source

1. An application looks up
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the data source in a 1


server’s resource tree
by using the JNDI API. 2
2. It asks the data source Data Source

for a connection.
3. It uses the connection Application Code Connection
n s e
(which uses a driver) to Pool
lice
ble
access the database. 3
4. When finished, it
fer a
a n s
closes the connection Driver
n - tr
(which returns it to the
no
WebLogic Server

s eฺ a
a
pool).
x ) h u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
A data source is a Java object managed by WebLogic Server and used by application code to
C
ne
obtain a database connection. Retrieving a database connection from a data source is better
R e than getting a connection directly from the database for two reasons:
• Connections in a data source’s connection pool have already been created. Therefore,
the application does not have to wait for connection creation.
• All database-specific information moves out of the application code and into the
WebLogic Server configuration, making the code more portable and robust.
Data sources can be created by using one of the WebLogic Server administration tools. A
data source is configured with a connection pool that will contain connections to a particular
database. It is also targeted to one or more instances of WebLogic Server.
For an application to use one of the connections in a data source’s connection pool, first the
application looks up the data source in the server’s resource tree. The API used is the Java
Naming and Directory Interface (JNDI). Once the data source is retrieved, the application
asks it for a database connection. The data source gives the application one of the
connections not currently being used, from its pool of connections. The application uses that
connection to access the database. When the application is finished with the connection, it
closes it. But rather than actually close it, the data source returns the connection to the
connection pool for some other application to use.

Oracle WebLogic Server 12c: Administration I 7 - 8


Java Naming and Directory Interface (JNDI)

• An API for accessing directory or naming services.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• WebLogic Server keeps a tree of its resources in memory


that can be accessed by using JNDI.
• JNDI terms:
– Context: A “container” node in the JNDI tree that can contain

se
other contexts and objects
– Object: A leaf node in the JNDI tree. Resources are objects. cen
le li
ab
– Binding: Associating an object with a name and a context
fer
an s
javax
n - tr
transaction
a no
= context
h a s eฺ
= object x )
UserTransaction
u id
m n G name of this object:
ฺmjavax.transaction.UserTransaction
t
Full binding

ฺ co ude
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
JNDI is an API that provides naming and directory functionality to Java applications
C
ne
independent of any specific naming or directory service implementation (such as the
R e Lightweight Directory Access Protocol (LDAP), Domain Name Server (DNS), or a file system).
WebLogic Server, upon starting, creates a tree of its resources in memory that can be
accessed by using JNDI.
The terms associated with a JNDI tree include the following:
• Context: A “container” node in the JNDI tree. It can contain other contexts and objects.
• Object: A leaf in the JNDI tree, which is bound to a context. (It cannot contain other
objects or contexts.) Resources are objects in the tree.
• Root context: The context at the top in the JNDI tree
• Initial context: A context that is chosen as the starting point for all future operations. It
does not have to be the root context.

Oracle WebLogic Server 12c: Administration I 7 - 9


JNDI Duties of an Administrator

• Report to developers the JNDI names of resources you


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

create, so they can look them up in their code.


• Check whether resources are in the JNDI tree of an
instance of WebLogic Server.
– You can view the JNDI tree of a server by using the admin
console.
n s e
lice
ble
4

fe r a
a n s
n - tr
a no
h a s 3 eฺ
x ) u id
2
m ฺm nt G
1
ฺ c o u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
To view a server’s JNDI tree by using the administration console:
C
e ne 1. In the Domain Structure, expand Environment and click Servers.
R 2. In the Servers table, select the server of interest. (In this example, server1 is selected.)
3. Under Configuration > General, click the View JNDI Tree link.
4. The server’s JNDI tree is displayed in a new web browser window (or tab). Use the plus
signs to expand contexts. When you click an object in the tree, details about that object
are displayed to the right.

Oracle WebLogic Server 12c: Administration I 7 - 10


Deployment of a Data Source

• The configuration of a WebLogic Server data source is


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

stored in an XML document called a JDBC module:


– A WLS-specific extension of Java EE modules
– Targeted to certain instances of WebLogic Server
• A JDBC module is either a system module or an
application module.
n s e
lice
– A JDBC system module is created by using the
administration console or WLST. It resides in the domainble
configuration here: fera s
domainname/config/jdbc/dsname-jdbc.xml
- tr an
— domainname: The main domain directoryo
n n
a
as eฺ
— dsname: The name of the data source

)h id
ฺ m xcan beGdeployed
u
– A JDBC application module
m n t either within a
Java EE application
ro de
o stand-alone.
ฺcor tu
e
s this S
u z @ e Oracle and/or its affiliates. All rights reserved.
cr u s
eฺ
Copyright © 2013,

r en to
z (
r u
The connections to a database for the connection pool of a data source are created when the
Csource is first created (or deployed) to a targeted instance of WebLogic Server.
edata
n Subsequently, connections are created when that server is restarted.
Re
A JDBC application module can be part of a Java enterprise application. In that way, the data
source is deployed along with the application code that needs it. Also, that data source is
available only to the containing application.
Finally, a JDBC application module can be deployed stand-alone.

Oracle WebLogic Server 12c: Administration I 7 - 11


Targeting of a Data Source

• A data source is targeted to one or more instances of


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WebLogic Server.
– Each targeted server has its own instance of that data
source.
– Each data source has its own connection pool.

n s e
ce
Server 1 Server 2 Server 3
li
Data Source Data Source Data Source
r a ble
n sfe
Connection Connection
n - tra
Connection
Pool Pool
n o Pool
s a ฺ
) h uidea
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
A JDBC module, which contains a data source, is targeted to one or more instances of
C
ne
WebLogic Server. When a server is targeted, it will have its own instance of that data source.
R e

Oracle WebLogic Server 12c: Administration I 7 - 12


Types of Data Sources

• Generic data source


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Is a standard data source with a connection pool tied to a


particular database
• Multi data source
– Is a collection of generic data sources tied to multiple
database servers
n s e
lice
– Is looked up and used by applications like a generic data
source
r a ble
sfe its
– Transparently provides load balancing or failover across
n
member generic data sources tra n -
o
• GridLink data source
s an ฺ
– Provides connectivity between h
) a ide Server and the
WebLogic
ฺ m x (RAC) G u Database
om uden
Oracle Real Application Clusters t
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

e n e
z
A multiudata
(rsource
r is an abstraction around a collection of generic data sources that provides
Cbalancing or failover among that data source collection. Applications look up a multi data
e n e
load
R source in a server’s JNDI tree just like they do a generic data source, and then ask the multi
data source for a database connection. The multi data source determines which data source
to use to satisfy the request depending on the algorithm selected in the multi data source
configuration: load balancing or failover.
All generic data sources used by a multi data source to satisfy connection requests must be
deployed on the same servers and clusters as the multi data source. A multi data source uses
a data source deployed on the same server to satisfy connection requests. Multi data sources
do not route connection requests to other servers in a cluster or in a domain. To deploy a
multi data source to a cluster or server, you select the server or cluster as a deployment
target.
A single GridLink data source provides connectivity between WebLogic Server and an Oracle
Real Application Clusters (RAC) database. An Oracle RAC database allows database
instances on different machines to access the same database. This provides scalability, load
balancing, and failover. More information on Oracle RAC and GridLink data sources is found
later in this lesson.

Oracle WebLogic Server 12c: Administration I 7 - 13


Creating a Generic Data Source

3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
1
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Make sure that the JDBC drivers that you want to use to create database connections are
C
ne
installed on all the servers on which you want to configure database connectivity and they are
R e in the servers’ CLASSPATH. Some JDBC drivers are installed with Oracle WebLogic Server
and are placed in the CLASSPATH by default. To create a generic data source after clicking
Lock & Edit in the Change Center, perform the following tasks:
1. In the Domain Structure tree, expand Services and then select Data Sources.
2. Above (or below) the table of data sources, click the New drop-down list and select
Generic Data Source.
3. On the first page of the data source creation wizard, enter or select the following
information and then click Next:
- Name: The configuration name for this data source
- JNDI Name: The JNDI “binding name” for this data source. Applications look up
the data source on the server’s JNDI tree by this name. The name can include
contexts by placing dots in the string. For example, if the name is jdbc.ds.myds,
the data source can be found in the context jdbc, subcontext ds, with the name
myds. Note that the name and JNDI name can be different.

Oracle WebLogic Server 12c: Administration I 7 - 14


- Database Type: The database type. The database types in this drop-down list
include Adabas, DB2, Derby, EnterpriseDB, Informix, Ingres, MS SQL Server,
MySQL, Oracle, Sybase, and more. If your database is not listed, select Other.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 7 - 15


Creating a Generic Data Source

Selecting an XA driver 5a
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

5b
4a

n s e
lice
ble
Selecting a non-XA driver

fer a
a n s
n - tr
4b
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
4. Use the drop-down list to select a driver, and then click Next.
C
e ne A. This example shows selecting an XA driver.
R B. This example shows selecting a non-XA driver.
5. On the next wizard page, select the transaction options, and then click Next.
A. If you selected an XA driver, there are no transaction options because the data
source supports global transactions by using the two phase commit protocol.
B. If you selected a non-XA driver, you can still allow the data source to participate in
global transactions by selecting Supports Global Transactions. If selected, you
then choose how the data source will participate, even though it is not
XA-compliant. The choices are:
• Logging Last Resource (Recommended): This resource is processed last. If it
succeeds, the other resources are told to commit, if it fails, they are told to roll
back.
• Emulate Two-Phase Commit: This resource always returns “ready” during
phase one of 2PC. This can possibly cause heuristic conditions.
• One-Phase Commit: Only this resource can participate in the global
transaction.

Oracle WebLogic Server 12c: Administration I 7 - 16


Non-XA Driver Transaction Options

If a non-XA driver is selected, you can still choose for the data
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

source to support global transactions. If you enable this option,


you must specify how the data source will participate in those
transactions:
• Logging Last Resource: This resource is processed last. If
it succeeds, the other resources are told to commit; if it
n s e
ce
fails, they are told to roll back.
li
• Emulate Two-Phase Commit: This resource always returns
r a ble
“ready” during phase one of 2PC. This can possibly
n sfe cause
heuristic conditions.
n- tra
o participate in
ncan
• One-Phase Commit: Only this resource a
s eฺ
) ha id
the global transaction.
ฺ m x G u
om uden t
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
z ( Last Resource (LLR): With this option, the transaction branch in which the

r u
Logging
C data source connection is used is processed as the last resource in the transaction and
e ne
R is processed as a one-phase commit operation. The result of the operation is written in a
log file on the resource itself, and the result determines the success or failure of the
prepare phase of the transaction. This option offers some performance benefits with
greater data safety than Emulate Two-Phase Commit. There will be more information
about LLR in the lesson titled “Transactions.”
• Emulate Two-Phase Commit: With this option, the transaction branch in which the
connection is used always returns success (or “ready”) for the prepare phase of the
transaction. This option offers performance benefits, but also has risks to data in some
failure conditions.
• One-Phase Commit: Connections from the data source participate in global
transactions using one-phase commit transaction processing. With this option, no other
resources can participate in the global transaction.

Oracle WebLogic Server 12c: Administration I 7 - 17


Creating a Generic Data Source

7
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
6. Enter values for the following properties and click Next:
C
e ne - Database Name: The database name (name requirements vary by DBMS)
R - Host Name: The DNS name or IP address of the server that hosts the database
- Port: The port on which the database server listens for connections requests
- Database User Name: The database user account name that you want to use for
connecting to the database
- Password: The password for the database user account
- Confirm Password (not shown): The password again
- Oracle.jdbc.DRCPConnectionClass (not shown): Database Resident
Connection Pooling (DRCP) provides a connection pool at the database server. It
is designed to work with applications that acquire a database connection, use it for
a short while, and then release it. DRCP complements middle-tier connection
pools. DRCP enables a significant reduction in key database resources that are
required to support a large number of client connections. The DRCP connection
class is a user-chosen string to distinguish this application from any others that
also use DRCP. If this string is not set, the DRCP pool will not be able to be
shared effectively.

Oracle WebLogic Server 12c: Administration I 7 - 18


7. Review the connection parameters (Driver Class Name, URL, Database User Name,
Properties, System Properties, Test Table Name) and click Test Configuration. The test
attempts to create a connection from the administration server to the database.
8. After the connection test, the result is displayed at the top of the page. If the test is
unsuccessful, you should click Back and correct any configuration errors. If the test is
successful, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 7 - 19


Creating a Generic Data Source

9
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
9. Select the servers or clusters to which the data source should be deployed and then click
C
ne
Finish. If no servers are targeted, the data source is created, but not deployed. You will
R e need to target it later. As usual, to confirm the changes, in the Change Center, click
Activate Changes.

Oracle WebLogic Server 12c: Administration I 7 - 20


Connection Pool Configuration

1 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Pool size attributes

n s e
lice
ble
Statement cache attributes

fer a
a n s
n - tr
a no
Connection testing attributes
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,e tOracle
ฺc to u
Copyright

n e
z( re
r u
After creating your initial data source configuration in the console, you can tune its connection
C
ne
pool settings (in the Change Center click Lock & Edit if you have not already done so):
R e 1. In the Domain Structure tree, expand Services and select Data Sources. Click on your
data source name in the table. Then click the Configuration > Connection Pool tab.
2. Enter values for any connection pool attributes you want to change (some are found
under the Advanced options section), including:
- Initial Capacity: The number of connections to create when deploying the
connection pool. If unable to create this number of connections, creation of the
data source will fail.
- Maximum Capacity: The maximum number of connections that this connection
pool can contain
- Minimum Capacity: The minimum number of connections that this connection
pool can contain after it is initialized. It is used only for connection pool shrinking
calculations.

Oracle WebLogic Server 12c: Administration I 7 - 21


- Statement Cache Type: The algorithm used for maintaining the prepared
statements stored in the statement cache. The options are LRU and Fixed. LRU:
When a new prepared or callable statement is used, the least recently used
statement is replaced in the cache. Fixed: The first fixed number of prepared and
callable statements is cached.
- Statement Cache Size: The number of prepared and callable statements stored in
the cache
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

- Test Connections On Reserve: WebLogic Server tests a connection before giving


it to a client, which adds a small delay in serving the client requesting a connection,
but ensures that the connection is viable.
- Test Frequency: The number of seconds between tests of unused connections.
Connections that fail the test are closed and reopened to reestablish a valid
connection. If the test fails again, the connection is closed.
n s e
ce
- Test Table Name: The name of the database table to use when testing connections.
li
ble
This name is required when you specify a Test Frequency or enable Test Reserved

r
Connections. The default SQL used in testing is: select count(*) from
fe a
a n s
tablename. If the Test Table Name field begins with SQL, the rest of the string is

- tr
taken as a literal SQL statement to use in testing connections.
n
no
Note: There will be more information on these connection pool settings later in this lesson.
a
ha s eฺ
x ) uid
m ฺm nt G
ฺ co u d e
o
er i s S t
s
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 7 - 22


Connection Properties

Connection properties are:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Found in the configuration of the data


source under Configuration >
Connection Pool
• Property/value pairs entered in:
– Properties as: property=value
n s e
– System Properties as:
lice
property=systemProperty
r a ble
n sfe
• Used to configure JDBC connections
- tr a
• Passed to the driver during
no n
sa a i deฺ
connection setup
x ) h u
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
You can enable driver-level features by adding the property and its value to the Properties
C
neData sources also support setting driver properties by using the value of system properties.
attribute of the connection pool of a data source.
R e
Add a system property to the System Properties attribute of the connection pool of a data
source. The value of the property is derived at runtime from the named system property.
The available connection properties depend upon the database driver. For a complete list,
see your driver documentation.

Oracle WebLogic Server 12c: Administration I 7 - 23


Testing a Generic Data Source

3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
ble
4
fer a
a n s
n - tr
a no
1
h a s e5ฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
When you test a data source, the selected server reserves a connection from the data source
C
ne
and then releases it, thereby testing the connection pool. If the Test Connections on Reserve
R e attribute of the connection pool is enabled, the acquired connection is also tested as part of
the reserve operation. In that case you must have specified a table name or SQL query in the
Test Table Name attribute of the data source’s connection pool (as well as selected the Test
Connections on Reserve attribute).
To test a generic data source, perform the following tasks:
1. In the Domain Structure tree, expand Services, and then select Data Sources.
2. Select the data source from the table of data sources.
3. Click the Monitoring > Testing tab.
4. Select the target on which to test the data source, and then click the Test Data Source
button.
5. A message displays above the tabs to indicate whether the test was successful.

Oracle WebLogic Server 12c: Administration I 7 - 24


Oracle Real Application Clusters: Overview

• Oracle Real Application Clusters (RAC):


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Supports multiple Oracle database servers for greater


scalability and reliability
– Relies on database servers having access to a shared and
highly available storage device

n s e
lice
RAC
r a ble
node 1
n sfe
Driver a Shared
- tr Storage
o n
RAC a n
Application
h a s2 eฺ
x ) node
u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

e n e
z
OracleuReal
(rApplication
r Clusters (RAC) is software that enables users on multiple machines
C a single database with increased reliability. RAC is made up of two or more Oracle
e n e
to access
R database instances running on two or more clustered machines that access a shared storage
device via cluster technology. To support this architecture, the machines that host the
database instances are linked by a high-speed interconnect to form the cluster. This
interconnect is a physical network used as a means of communication between the nodes of
the cluster. Cluster functionality is provided by the operating system or compatible third-party
clustering software.
Because every RAC node in the cluster has equal access and authority, the loss of a node
may impact performance, but does not result in down time.

Oracle WebLogic Server 12c: Administration I 7 - 25


GridLink Data Source for RAC

WebLogic Server’s GridLink data source is “RAC-aware.” It:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Performs intelligent load balancing based on the current


RAC workload
• Implements RAC’s Fast Connection Failover (FCF) pattern
• Ensures that all database operations within a global
transaction are routed to the same RAC node (“XA
n s e
affinity”) lice
ble
WebLogic Server RAC

fer
node 1a
a n s
n - tr
no
GridLink RAC

a
Data Source node 2

h a s eฺ
x ) u id
Applications om
ฺm nt G RAC

ฺ c u d e node 3

o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
A single GridLink data source provides connectivity between WebLogic Server and an Oracle
C
ne
database service that has been targeted to an Oracle RAC cluster. This type of data source
R e automatically adjusts the distribution of work based on the current performance metrics
reported by each RAC node, such as CPU usage, availability, and response time. If this
capability is disabled, GridLink data sources instead use a round-robin, load-balancing
algorithm to allocate connections to RAC nodes.
A GridLink data source implements Oracle's Fast Connection Failover (FCF) pattern, which:
• Provides rapid failure detection
• Aborts and removes invalid connections from the connection pool
• Performs graceful shutdown for planned and unplanned Oracle RAC node outages
• Adapts to changes in topology, such as adding or removing a node
• Distributes run-time work requests to all active Oracle RAC instances, including those
rejoining a cluster
XA affinity ensures all the database operations performed on a RAC cluster within a global
transaction are directed to the same RAC instance. This increases performance and also
helps ensure data integrity after a failure.

Oracle WebLogic Server 12c: Administration I 7 - 26


GridLink , FCF, and ONS

• Typically, when a system goes down, applications must


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

wait for the network to time out (perhaps minutes).


• FCF pattern: The Oracle Notification Service (ONS)
delivers Fast Application Notification (FAN) events about
RAC availability and workload to registered subscribers.
• The GridLink data source can subscribe to ONS and
n s e
immediately respond to nodes that are added or removed.
lice
ONS RAC node rab
le
WebLogic Server
n sfe
FAN
n - tra
GridLink ONS events
o RAC node
nONS
s eฺ a
a
Data Source Client

x ) h u id
m ฺm nt G ONS RAC node
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
r u
When a database outage occurs, two problems confront applications: errors and hangs.
C
ne
Applications encounter errors because the work they were doing (queries, transactions) is
R e interrupted. Even worse, those errors may take some time to arrive. When the database
outage occurs, the client application may have to wait for network timeouts (which may be
minutes) before being informed of the outage. This can cause the application to hang for
some time, leading to user frustration. Oracle Database provides several features that Java
applications such as WebLogic Server can use to increase failure responsiveness and to help
mask errors from the end user.
The Fast Connection Failover (FCF) pattern consists of the Oracle Notification Service (ONS)
using a simple publish/subscribe method to produce and deliver Fast Application Notification
(FAN) event messages. ONS daemon processes are automatically created during the RAC
installation process and are configured to run on each node. ONS is a component of the
Oracle Process Manager and Notification (OPMN) server, which manages Oracle Fusion
Middleware system components.
A GridLink data source uses ONS to adaptively respond to state changes in an Oracle RAC
instance. This ensures that the connection pool in the data source contains valid connections
(including reserved connections) without the need to poll and test connections. The data
source also distributes connections to Oracle RAC instances based on these FAN events.

Oracle WebLogic Server 12c: Administration I 7 - 27


GridLink and Services

• Oracle Database supports services that:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Act as gateways to a subset of RAC nodes


– Automatically start on another node if the current one fails
– Are accessed by applications by using the service name
– Enable you to control and prioritize the available capacity on
e
your grid for different clients
n s
lice
• FCF requires the use of database services.
e
• abl
Create a separate GridLink data source for each service.
fer
s
an node
GridLink
n - tr
A RAC

no A RAC node
Data Source for
Service A
a
s eฺ B
Applications
) h a id
GridLink
x
ฺm nt G u
m
Data Source for

c o d e
oฺ Stu
Service B B RAC node

e r
s this
u z @ e Oracle and/or its affiliates. All rights reserved.
c r u s
eฺ
Copyright © 2013,

r e n to
r u
Serviceszare( entities defined for a RAC database that enable its workload to be managed.
e C also decouple any hardwired mapping between a connection request and a RAC
n
Services
R e instance. Each service represents a workload with common attributes, thresholds, and
priorities. For example, online users can be one service, batch processing can be another
service, and reporting can be a third service type. A service can span one or more database
instances and a single instance can support multiple services. The use of FAN events and
run-time connection load balancing requires the configuration of services.
Services hide the complexity of a cluster from the database client by providing a single logical
entity for managing work. Applications or middleware such as WebLogic Server specify a
service by supplying its name when making the initial connection. On WebLogic Server in
particular, you scale the number of GridLink data sources as the number of services
increases in the database, independent of the number of nodes in the cluster.

Oracle WebLogic Server 12c: Administration I 7 - 28


GridLink and Single Client Access Name (SCAN)

• Starting with Oracle RAC version 11gR2, a SCAN service


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

is provided that:
– Accepts a database cluster alias
– Returns the locations of cluster members
– Can run independently or integrate with your corporate DNS
• GridLink data sources can either use a list of database
n s e
node locations or a single SCAN address.
lice
r a ble
GridLink
n sfe
a tr RAC node
RAC node Data Source

n -
a no
sSCAN eฺ
GridLink
a
RAC node OR
h d
Data Source

x) Gui
RAC node


m dentm
RAC node
co RAC node

e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
Singleu
r z ( Access Name (SCAN) is a new feature starting with RAC 11g Release 2 that
Client
e C a single name for clients to access databases running in a cluster. The benefit is that
n
provides
R e the client’s connection information does not have to change if you add or remove nodes in the
cluster. Having a single name to access the cluster allows clients to access any database
running in the cluster, independently of which server or servers in the cluster are active.
SCAN provides load balancing and failover for client connections to the database. The SCAN
works as a cluster alias for databases in the cluster.
During the installation of the Oracle Grid Infrastructure, you are prompted to provide a SCAN
name. There are two options for defining the SCAN:
• Use an existing Domain Name Service (DNS) implementation
• Use the Oracle Grid Naming Service (GNS)
If you choose the DNS option, you must ask your network administrator to create a single
name that resolves to three IP addresses by using a round-robin algorithm. Three IP
addresses are recommended for the SCAN service for high-availability reasons, regardless of
the number of servers in the cluster. The IP addresses must be on the same subnet as your
public network in the cluster.

Oracle WebLogic Server 12c: Administration I 7 - 29


Creating a GridLink Data Source

1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2
3

n s e
lice
4
r a ble
n sfe
a
no n-tr
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
( when making a change to the configuration in the administration console,
zalways,
r
1. u
As
C you first click Lock & Edit in the Change Center. Then, in the Domain Structure, select
e ne
R Services > Data Sources. Then click New > GridLink Data Source.
2. Supply a Name, JNDI Name, and select the Database Driver. Then click Next. Notice
the drivers are special GridLink drivers. Also notice that the Database Type is Oracle
and cannot be changed.
3. As with generic data sources, on the next wizard page you select transaction options
and then click Next. If you selected an XA driver, there are no transaction options
because the data source supports global transactions. If you selected a non-XA driver,
you can allow the data source to participate in global transactions by selecting
Supports Global Transactions and then choose how the data source will participate.
4. Select Enter individual listener information and click Next. (You can instead choose
to enter the complete JDBC URL manually, but it is easier to let the data source wizard
generate it for you.)

Oracle WebLogic Server 12c: Administration I 7 - 30


Creating a GridLink Data Source

5
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
7
s eฺ a 8

) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
z (the Service Name.
5.
C r u
Enter

e ne 6. Use the Add button multiple times to specify a list of initial database listeners to connect
R to, or use the Add button once to specify a Single Client Access Name (SCAN)
address. A GridLink data source containing SCAN addresses does not need to change
if you add or remove Oracle RAC nodes.
7. Enter values for the following properties:
- Database User Name: The database user account name that you want to use for
connecting to the database
- Password: The password for the database user account
- Confirm Password (not shown): The password again

Oracle WebLogic Server 12c: Administration I 7 - 31


- Protocol (not shown): Leave the default value of TCP (Transmission Control
Protocol) in this field, unless you are using Exalogic hardware. If you are using
Exalogic, replace TCP with SDP (Sockets Direct Protocol). This protocol is used in
InfiniBand high-speed networks. For example, InfiniBand can be used to connect an
Exalogic machine to an Exadata machine. SDP is characterized by short-distance,
high-performance communications between multiple server systems. Simply
connecting the machines with InfiniBand cables is not sufficient, however, because
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WLS and RAC will still communicate by using standard TCP unless the value of SDP
is entered here. Also note that in order to use SDP, you will need to add a
command-line argument when starting WebLogic Server: -
Djava.net.preferIPv4Stack=true. One way to do that is to add the argument
to the start scripts for WebLogic Server, like startWebLogic.sh.
- Oracle.jdbc.DRCPConnectionClass (not shown): See the explanation of the
Database Resident Connection Pooling (DRCP) class in the “Creating a Generic
n s e
ice
Data Source” section.
l
8. Click Next.
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 7 - 32


Creating a GridLink Data Source

9
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

10

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u 11

co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
z ( the properties and values displayed. Notice that the Driver Class Name cannot
r
9. u
Review
C be changed. The URL has been generated from what was entered earlier, but could be
e ne
R modified. The Database User Name (not shown) and Password (not shown) can be
modified. As with generic data sources, driver-level features can be enabled by adding
properties and values to the Properties (not shown) and System Properties (not
shown) text areas. The Test Table Name (not shown) can be updated.
10. Optionally, test whether the URL is correct by clicking the Test All Listeners button. Or,
you can test one listener at a time as each one is given a Test Listener button (not
shown).
11. When you have confirmed the properties (and, if you tested, the test was successful),
click Next.

Oracle WebLogic Server 12c: Administration I 7 - 33


Creating a GridLink Data Source

12
14
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

13

n s e
lice
r a ble
n sfe
- tra
15 no n
s eฺ a
) h a id
x
ฺm nt G u 16
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
12. Confirm that FAN Enabled is selected if you want WebLogic Server to subscribe to
C
ne 13.
Oracle FAN events.
R e Use the Add button multiple times to specify a list of initial ONS daemon processes to
connect to. You can also optionally configure the ONS client on WebLogic Server to
receive events over SSL by configuring an ONS Wallet File Directory (not shown) and
ONS Wallet Password (not shown). Oracle Wallet manages SSL certificates.
14. Click Next.
15. Optionally, test whether the ONS hosts and ports are correct by clicking the Test All
ONS Nodes button. Or, you can test one ONS node at a time as each one is given a
Test ONS Node button (not shown).
16. Click Next. (If you tested, ensure that the test was successful.)

Oracle WebLogic Server 12c: Administration I 7 - 34


Creating a GridLink Data Source

17
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
17. Select the servers or clusters to which the data source should be deployed, and then
C
ne
click Finish. If no servers are targeted, the data source is created, but not deployed.
R e You will need to target it later. As usual, to confirm the changes, in the Change Center,
click Activate Changes.

Oracle WebLogic Server 12c: Administration I 7 - 35


Common Data Source Problems

• Data source configuration errors:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Invalid JDBC URL


— When the data source is created or deployed it will fail. The
underlying exception is java.net.ConnectException.
– Invalid credentials
When the data source is created or deployed, it will also fail. Not
e

because a network connection could not be established, but


n s
because the database rejects the connection attempt. ice el
bl
– Wrong driver version in the CLASSPATH
fe ra
Errors can be subtle and hard to catch if the version
a n sof the driver
r
-t you want to use

is not the one expected. Ensure that the drivers


n o n
are in the CLASSPATH before the standard
a
s afterethe
ones. For example,
ฺ CLASSPATH has
add this line in startWebLogic.sh
h a d
been set:
ฺ m x) Gui
co m dent
CLASSPATH="/path/customdriver.jar:${CLASSPATH}"

e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
( first two errors can be caught when the data source is created in the
zthe
r u
Note that
C
e n e
administration console by using the Test Configuration button.
R Drivers are installed in the <WEBLOGIC_HOME>/server/lib directory by using
weblogic.jar. The manifest file found in weblogic.jar lists driver JARs to be loaded
when the JAR is loaded (when the server starts). Therefore, you do not need to add these
JDBC drivers to your CLASSPATH. If you plan to use a third-party JDBC driver that is not
installed with WebLogic Server, you must install the drivers, which includes updating your
CLASSPATH with the path to the driver files. If you plan to use a different version of any of the
drivers installed with WebLogic Server, you can replace the driver file in
<WEBLOGIC_HOME>/server/lib with an updated version of the file or add the new file to
the front of your CLASSPATH.

Oracle WebLogic Server 12c: Administration I 7 - 36


Common Data Source Problems

• Insufficient connections
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– When the maximum capacity is reached,


the next application to request a
connection will wait Connection Reserve
Timeout seconds for a free one.
— If none are free at that time, an exception
is returned.
n s e
– If this happens often, see whether more lice
connections from the database areable
sfer
an
available, and increase the Maximum
Capacity.
n - tr
– If the applicationsacan wait longer,n o
h a s theeConnection

)
perhaps increase
xTimeout i d
useconds.

Reservem t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
When u anzapplication requests a connection from a data source, if all connections in the data
r
C are in use and if the data source has expanded to its maximum capacity, the
e n e
source
R application gets ConnectionUnavailableSQLException. To avoid this, you can
configure the Connection Reserve Timeout value (in seconds) so that connection requests
wait for a connection to become available. After the Connection Reserve Timeout has
expired, if no connection becomes available, the request fails and the application gets
PoolLimitSQLException.
If you set Connection Reserve Timeout to –1, a connection request will time out immediately
if there is no connection available. If you set Connection Reserve Timeout to 0, a connection
request will wait indefinitely.

Oracle WebLogic Server 12c: Administration I 7 - 37


Common Data Source Problems

• Connection leaks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Poorly implemented applications


can starve the data source of
connections.
— Hold a connection too long, even
when not currently using it
Forget to close a connection (so
n s e
ce

it can return to the pool)


li
– To provide a failsafe, WebLogic
r a ble
Server can automatically reclaim
n sfe
- tra
a connection after a certain
no n
amount of inactivity.
s eฺ a
h a id
)a reserveduconnection
x
o m ฺm minutes
Reclaim
e n t G of inactivity.
ฺc tud
after two
ro
e is S
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
A leaked connection is a connection that was not properly returned to the connection pool in
C
ne
the data source. To automatically recover leaked connections, you can specify a value for
R e Inactive Connection Timeout. Find this attribute in the Advanced section of the Connection
Pool tab. WebLogic Server forcibly returns a connection to the data source when there is no
activity on a reserved connection for the number of seconds that you specify. When set to 0
(the default value), this feature is turned off.
Note that the actual timeout could exceed the configured value for Inactive Connection
Timeout. The internal data source maintenance thread runs every five seconds. When it
reaches the Inactive Connection Timeout (for example 30 seconds), it checks for inactive
connections. To avoid timing out a connection that was reserved just before the current check
or just after the previous check, the server gives an inactive connection a “second chance.”
On the next check, if the connection is still inactive, the server times it out and forcibly returns
it to the data source. On average, there could be a delay of 50% more than the configured
value.

Oracle WebLogic Server 12c: Administration I 7 - 38


Common Data Source Problems

• Statement timeout
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Most JDBC drivers support a


maximum time limit for SQL
statements that can be set:
— By using the Statement Timeout
attribute
Programmatically by the
n s e
ce

application
li
– Increase this value if your
r a ble
applications require complex,
n sfe
- a
tr
long-running database
no n
operations.
s eฺ a
) h a idout before
x
m nt increase
ฺcompletion, u
G this value.
m
If statements time
o
ฺc tud e
ro
e is S
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
With the Statement Timeout option, you can limit the amount of time that a statement is
C
ne
allowed to execute. When you set a value for Statement Timeout, WebLogic Server passes
R e the time specified to the JDBC driver by calling the Statement’s setQueryTimeout()
method. WebLogic Server makes the call, and if the driver throws an exception (this is
unsupported, for example), the Statement Timeout value is ignored. In some cases, the driver
may silently not support the call or may document limited support. Oracle recommends that
you check the driver documentation to verify the expected behavior. When Statement Timeout
is set to –1, (the default) statements never time out. Find the Statement Timeout attribute in
the Advanced section of the Connection Pool tab.

Oracle WebLogic Server 12c: Administration I 7 - 39


Basic Connection Pool Tuning

• Pool Capacity
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Connection creation is
expensive.
– For applications with consistent,
heavy database use:
Determine Maximum Capacity
e

experimentally
n s
lice
ble
– Set Initial Capacity equal to
Maximum Capacity
fer a
n s
– For applications with intermittent peak database
n - tra use:
– Use different values for Initial and Maximum
n o Capacity
s a based ฺ on the speed of
– Tune the Shrink Frequency (seconds)
h a d e
the load changes
ฺ m x) Gui
co m dent
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
z (
r u
Each data source has a pool of database connections that are created when the data source
C
ne
is deployed or at server startup. Applications use a connection from the pool and then return it
R e when they have finished using it. Connection pooling enhances performance by eliminating
the costly task of creating new database connections for the application.
Creating a database connection is a relatively expensive process in any environment.
Typically, a connection pool starts with a small number of connections. As demand for more
connections grows, there may not be enough in the pool to satisfy the requests. WebLogic
Server creates additional connections and adds them to the pool until the maximum pool size
is reached.
One way to avoid connection-creation delays is to initialize all connections at server startup,
rather than on-demand as applications need them. Set the Initial Capacity equal to the
Maximum Capacity on the Connection Pool tab of your data source configuration. However,
you still need to determine the optimal value for Maximum Capacity as part of your
preproduction performance testing.

Oracle WebLogic Server 12c: Administration I 7 - 40


Basic Connection Pool Tuning

• Connection testing helps to ensure that connections are


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

viable, but can degrade performance.


– WebLogic Server tests a connection before giving it to an
application when you enable Test Connections On Reserve.
– WebLogic Server tests connections periodically based on the
Test Frequency value.
n s e
e
If you use Test Frequency, do not test too often.
– To help minimize the performance impact of testing, use e lic

r a bl
Seconds to Trust an Idle Pool Connection
n sfe proven
It is the number of seconds after a connection has
- a
trtesting
been
n

viable that WebLogic Server trusts it and skips


n o it again.
s a ฺ
) h uidea
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
r u
To make sure that the database connections in a data source remain healthy, you can
C
ne
periodically test the connections. WebLogic Server provides automatic testing that you
R e configure with attributes of the connection pool.
• Test Connections on Reserve: Enable this to test each connection before assigning it
to a requesting application. This may add a slight delay to the request, but it guarantees
that the connection is viable. If this is enabled, you must also set a Test Table Name.
You can minimize the impact of testing reserved connections by tuning Seconds to
Trust an Idle Pool Connection.
• Test Frequency: Use this attribute to specify the number of seconds between tests of
unused connections. When unused connections are tested, WebLogic Server closes
and replaces any connections that prove faulty. Setting this also requires you to set the
Test Table Name.
• Seconds to Trust an Idle Pool Connection: Use this option to specify the number of
seconds after a connection has been proven to be okay that WebLogic Server trusts the
connection is still viable and skips the connection test, either before delivering it to an
application or during the periodic connection testing process. This option is an
optimization that minimizes the performance impact of connection testing, especially
during heavy traffic.

Oracle WebLogic Server 12c: Administration I 7 - 41


Basic Connection Pool Tuning

• Statement caching
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Prepared and callable statements can be cached to improve


overall performance through reuse.
– The Statement Cache Type determines the algorithm.
— LRU: Once the cache is full, the least recently prepared/callable
statement is replaced by a new one.
FIXED: Once the cache is full, no new prepared/callable
n s e
lice

statement is cached.
l e
rab
– Determine the size of the cache through experimentation
f each e
a n sfor
tr could exceed
Warning: Some databases maintain an open cursor
-

open statement, so if the cache is too large,nyou


o
the open cursor limit. an s eฺ
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz statement caching, each connection in a data source has its own individual cache
If you use
e C
n
of prepared and callable statements. However, you configure statement cache options per
R e data source. That is, the statement cache for each connection in a data source’s connection
pool uses the statement cache options specified for the data source, but each connection
caches its own statements.
Statement Cache Type: The algorithm used for maintaining the prepared statements stored
in the statement cache. The options are LRU and Fixed.
• LRU: When a new prepared or callable statement is used, the least recently used
statement is replaced in the cache.
• Fixed: The first fixed number of prepared and callable statements is cached. After the
cache is full, new prepared or callable statements are no longer cached. With this
statement cache algorithm, you can inadvertently cache statements that are rarely used.
Statement Cache Size: The number of prepared and callable statements stored in the cache.
Caching increases performance, however, you must consider how your DBMS handles open
prepared and callable statements. In many cases, the DBMS maintains a cursor for each
open statement. This applies to the prepared and callable statements in the statement cache.
If you cache too many statements, you may exceed the limit of open cursors on your
database server. Setting the size of the statement cache to 0 turns off statement caching.

Oracle WebLogic Server 12c: Administration I 7 - 42


Quiz

Developers look up a server’s data source by using which API?


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. JDBC
b. EJB
c. SQL
d. JNDI
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzd
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 7 - 43


Quiz

The connection pool of a generic data source has its Initial


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Capacity set to 2 and its Maximum Capacity set to 10. The data
source is targeted to three managed servers. What is the most
number of database connections that this can cause to be used
at one time?
a. 10
n s e
b. 12
lice
c. 30
r a ble
e
d. 36 nsf tra
n -
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
(re
ruzc
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 7 - 44


Summary

In this lesson, you should have learned how to configure:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• A generic data source


• A GridLink data source

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 7 - 45


Practice 7-1 Overview:
Configuring a JDBC Data Source
This practice covers creating and configuring a generic data
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

source.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 7 - 46


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Monitoring a Domain

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Configure and access WebLogic Server logs


• Enable WebLogic Server debugging output
• Monitor WebLogic Server health and performance
• Monitor JDBC data sources
• Access diagnostic charts in the Monitoring Dashboard n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 8 - 2


WebLogic Server Logs

The subsystems of an instance of WebLogic Server publish


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

information about themselves into logs.

Log Description

Server log Used by server subsystems to record events

n s e
ce
Standard out Some server log messages are printed to standard out.
li
Domain log Some server messages are gathered by the administration server
r a ble
for inclusion into the domain-wide log.
n sfe
Access log Used by the HTTP subsystem to track HTTP communication
n - tra
a no an Auditing provider
Audit log
a s eฺ
Tracks security requests. Requires configuring
h
(not configured by default).
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re Server instance writes the messages from its subsystems and applications
ru
Each WebLogic
C
ene
into a server log file that is located on the local host computer.
R In addition to writing messages to a log file, each server instance prints a subset of its
messages to standard out. Usually, standard out is the shell (command prompt) in which you
are running the server instance. However, some operating systems enable you to redirect
standard out to some other location. By default, a server instance prints only messages of a
NOTICE severity level or higher to standard out.
Each server instance also forwards a subset of its messages for the administration to collect
and place in the domain-wide log file. By default, servers forward messages of severity level
NOTICE or higher. While you can modify the type of messages that are forwarded, servers
can never forward messages of the DEBUG severity level.
The HTTP subsystem keeps a log of all HTTP transactions in a text file. The default location
and rotation policy for HTTP access logs is the same as the server log. You can set the
attributes that define the behavior of HTTP access logs for each server.

Oracle WebLogic Server 12c: Administration I 8 - 3


WebLogic Server Logs
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Log Description

Transaction log • Contains information about transactions being managed by


WebLogic Server
• Is used by that server when recovering from crashes
• Is in binary format
n s e
JMS Server log • Is enabled when a JMS Server is created
lice
• Message destinations must be specifically enabled.
r a ble
• Contains information on basic message lifecycle events
n sfe
n - tra
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re Auditing provider records information from a number of security requests,
ruare determined internally by the WebLogic Security Framework. The WebLogic
The WebLogic
C
eneAuditing provider also records the event data associated with these security requests, and the
which
R outcome of the requests. Configuring an Auditing provider is optional. The default security
realm does not have an Auditing provider configured.
Each server has a transaction log, which stores information about committed transactions
managed by the server that may not have been completed. WebLogic Server uses the
transaction log when recovering from system crashes or network failures. You cannot directly
view the transaction log; the file is in a binary format. The Transaction Manager uses the
default persistent store to store transaction log files. You can change where the default store
is located.
JMS logging is enabled by default when you create a JMS Server, however, you must
specifically enable it on message destinations in the JMS modules targeted to this JMS server
(or on the JMS template used to create the destinations). JMS server log files contain
information on basic message lifecycle events, such as message production, consumption,
and removal. When a JMS destination is configured with message logging enabled, then each
of the basic message lifecycle events generate a message log event in the JMS message log
file.

Oracle WebLogic Server 12c: Administration I 8 - 4


WebLogic Server Log Locations

Directory Description
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

 domainname
 servers
 AdminServer Admin server (named AdminServer) directory
 logs
 AdminServer.log The server log file for AdminServer
 domainname.log The domain log
n s e
 server1 Directory for managed server named server1
lice
 logs
r a ble
 server1.log The server log file for server1
n sfe
 access.log
n - tra
no
HTTP subsystem log
 jmsServers
s eฺ a
jmsservername
) h a id
 jms.messages.log ฺm
x u
G of the JMS Server called
m
o ude
JMS
n t
lifecycle events

ฺ c
ero is St
jmsserverame created on server1

s h and/or its affiliates. All rights reserved.


r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
r u
Note that the administration server also has an access.log file, which is not shown here.
C
e neThe auditing log location is also not shown. If the WebLogic Auditing provider is configured,
R the audit log is here:
domainpath/domainname/servers/servername/logs/
DefaultAuditRecorder.log.
The location of the transaction log (also not shown) in the default store is:
domainpath/domainname/servers/servername/data/store/default/
_WLS_SERVERNAMExxxxxx.DAT. (Where xxxxxx is a generated count.)
The JMS subsystem is enabled once JMS Servers are created. There is a log file for each
JMS Server.

Oracle WebLogic Server 12c: Administration I 8 - 5


Log Message Severity Levels

Severity levels from low to high impact:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Severity Description
TRACE Used for messages that are part of WebLogic Diagnostic Framework

DEBUG Messages from enabled "debug flags”

INFO Normal operation information


n s e
lice
ble
NOTICE More important operation information

fer a
n s
tra
WARNING Something suspicious occurred, but it might not affect normal
operation.
n -
a noor application can
s degradation
ERROR A user level error has occurred, but the system
handle it with no interruption and limited
h a d e ฺ of service.
ฺ m x) Gui
co m dent
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r en to
(
iszmore on debug flags later in this lesson.
There u
C r
e n e
R

Oracle WebLogic Server 12c: Administration I 8 - 6


Log Message Severity Levels
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Severity Description
CRITICAL A system or service level error has occurred. The system can
recover, but there may be momentary loss or permanent
degradation of service.
ALERT A particular service is unusable, while other parts of the system still
n s e
ce
function. Automatic recovery is not possible. Immediate attention of
li
ble
an administrator is needed.

fer a
s
EMERGENCY The server is unusable. This indicates a severe system failure.

tra n
n -
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
Cru
e ne
R

Oracle WebLogic Server 12c: Administration I 8 - 7


Understanding Log File Entries

Log message format:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Subsystem Server

Start of message Timestamp Message severity Physical machine

####<Jan 24, 2013 10:04:33 AM EST> <Notice> <Cluster> <host01> <server1>

e
Thread information

n s
<[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> lice

r a ble
Username WLDF diagnostic context ID Transaction ID
n sfe
Raw time (milliseconds)

- a
tr<1359039873281>
<<WLS Kernel>> <> <>
no n
s eฺ a
) h a id
x u
Message number Message

<BEA-000197> <Listening for announcements


o m ฺm nfrom
e t Gcluster using unicast cluster
messaging>
r o ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (rebe viewed in any text editor.
C ru
Log files can
eIn this example, extra blanks are placed in the log entry for readability. The username being
n used is WLS
Re Kernel, an internal ID used by the server itself. Also, there is no WebLogic
Diagnostic Framework (WLDF) context ID (it is blank), nor a transaction ID (also blank).

Oracle WebLogic Server 12c: Administration I 8 - 8


Accessing the Logs from the Admin Console
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1
2
n s e
lice
r a ble
n sfe
- tra
3
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
To access logs from the WebLogic Server administration console:
C
e ne 1. Under Domain Structure, select Diagnostics and then Log Files.
R 2. Select the log of interest and click View.
3. View log entries. To see more details, select an entry and click View.
The logs available for viewing in the administration console are:
• Server logs
• Domain logs
• HTTP access logs
• JMS Server logs

Oracle WebLogic Server 12c: Administration I 8 - 9


The logs available for viewing in the administration console are:
• WebLogic Diagnostic Framework (WLDF) diagnostic logs:
– Data source profile log: Data source diagnostic data that in earlier versions of
WebLogic Server was written to the events data archive. What is contained in the
data source profile log is configured at the data source level. In the administration
console, select the particular data source and then the Configuration >
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Diagnostics tabs. The configuration of the log file itself is done at the server level. In
the administration console, select the particular server and then click the Logging >
Data Source tab. The default location and name of the file is:
domainpath/domainname/servers/servername/logs/datasource.log
– Events data archive: Diagnostic data from WLDF instrumentation. WLDF
instrumentation is a mechanism for adding diagnostic code to instances of WebLogic

e
Server or applications to trigger actions at specific code locations and record data
n s
ce
from those actions in the archive. This data is placed in the WLDF archive (see
li
ble
below).

fer a
Harvested data archive: Diagnostic data from a WLDF “harvest.” WLDF data can
n s
be collected by a WLDF artifact called a data harvester, which is configured to
a
- tr
periodically collect diagnostic data and store it in this archive. Harvesters are
n
no
configured in a WLDF diagnostic module. The default location of the WLDF archive
a
file is:
ha s eฺ
x ) uid
domainpath/domainname/servers/servername/data/store/

m ฺm nt G
diagnostics/WLS_DIAGNOSTICSxxxxxx.DAT
ฺ co u d e
o
er i s S t
(Where xxxxxx is a generated count.)
s
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 8 - 10


Configuring Server Logging

Logging tab
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Must restart
server for these
changes to occur Log file
n s e
ce
rotation type:
li
ble
By Size or

a
By Time or

fer
None

a n s
tr
Disabled because

n -
no
By Size selected

s eฺ a Keep the

) h a id
latest 100
x
ฺm nt G u server logs

co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
After you click Lock & Edit in the Change Center, in the Domain Structure of the
C
ne
administration console, expand Environment and click Servers. In the Servers table, click
R e the name of the server you want to configure. Click the Logging > General tab. The available
options include:
• Log file name: The name of the file that stores the server log. The default is to place the
file in the log directory under the server directory and name it the server’s name .log.
If you change it and specify a relative path, it is relative to the server’s main directory.
• Rotation type
- None: Messages accumulate in a single file. You must erase the contents of the
file when it grows too large. Note that Oracle WebLogic Server sets a threshold
size limit of 500 MB before it forces a hard rotation to prevent excessive log file
growth.
- By Size: When the log file reaches the size that you specify in “Rotation file size,”
the server renames the file to servername.lognnnnn.
- By Time: At each time interval that you specify in “Begin rotation time” and
“Rotation interval,” the server renames the file to servername.lognnnnn.
• Limit number of retained files: After the server reaches the File to retain limit, it
deletes the oldest log file and creates a new log file with the latest suffix.

Oracle WebLogic Server 12c: Administration I 8 - 11


Configuring Server Logging
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Minimum severity for all logs

Choose either
n s e
Log4J or JDK
lice
ble
logging

fer a
a n s
n - tr
a no
If enabled, redirects server
h a s eฺ
standard out to logs
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,e tOracle
ฺc to u
Copyright

n e
z( re
r u
The available Advanced options include:
C
e ne • Minimum severity to log: The minimum severity of log messages going to all log
R destinations. By default all messages are published.
• Logging implementation: Specifies whether the server logging is based on a Log4J
implementation or the default, the logging based on the Java Logging APIs in the JDK
• Redirect stdout logging enabled: When enabled, redirects the standard out of the
JVM in which a WebLogic Server instance runs to the logging system

Oracle WebLogic Server 12c: Administration I 8 - 12


Configuring Server Logging
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Each log “location”


has its own setting
for minimum
severity level and
can have its own
log filter.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a Domain

) h a id
broadcast

x
ฺm nt G u buffer size

co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The available Advanced options include:
C
e ne • Log file: The server log attributes:
R - Severity level: The minimum severity of log messages for this log. By default all
messages go.
- Filter: Specifies the filter configuration for this log. A filter configuration defines
simple filtering rules to limit the volume of log messages written.
• Standard out: The standard out attributes:
- Severity Level and Filter. (Same explanations as before.) The default severity for
standard out is NOTICE.
• Domain log broadcaster: The domain log (from this server) attributes:
- Severity Level and Filter. (Same explanations as before.) The default severity for
the domain log is also NOTICE.
- Buffer Size: Specifies the size of the buffer for the log messages that are sent to
the domain log. The buffer is maintained on the Managed Server and is broadcast
to the domain log when it gets full. If you notice performance issues due to a high
rate of log messages being generated, set this value higher.

Oracle WebLogic Server 12c: Administration I 8 - 13


Error Messages Reference

Use the WebLogic Server online Error Messages Reference


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

document to obtain more information about a specific log


message based on its ID.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
For a detailed description of log messages if you only have a message number, use the
C
ne
online document titled Oracle WebLogic Server Error Messages Reference.
R e

Oracle WebLogic Server 12c: Administration I 8 - 14


Log Filters

• Provide finer tuned control of the log messages that are


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

published
• Are based on the values of message attributes
• Are created at the domain level
• Can be applied to different log message destinations:
– Server log
n s e
lice
ble
– Server log memory buffer
– Server standard out
fer a
a n s
– Domain log broadcaster
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
Log filters provide control over the log messages that are published. A filter uses custom logic
C
ne
to evaluate the log message content and accept or reject a message. For example, you can
R e filter messages of a certain severity level from a particular subsystem. Only the log messages
that satisfy the filter criteria are published. You can create separate filters for the messages
that each server instance either writes to its server log file, standard out, memory buffer, or
broadcasts to the domain-wide log.

Oracle WebLogic Server 12c: Administration I 8 - 15


Creating a Log Filter

1 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
ce
4
li
r a ble
n sfe
- tra 5
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
z (locking the configuration, in the Domain Structure, select the name of the domain.
1.
C r u
After

e ne 2. Click the Configuration > Log Filters tab.


R 3. Click the New button.
4. On the Create a New Log Filter page, enter a name for the filter and click OK.
5. The new log filter appears in the Log Filters table. To configure a filter expression, click
the log filter name.

Oracle WebLogic Server 12c: Administration I 8 - 16


Creating a Log Filter

6
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Select the
n s e
lice
message attribute

r a ble
n sfe
- tra Select the

no n operator

s eฺ a
) h a id
x
ฺm nt G u Enter a value

co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
6. On the Configuration page, click the Add Expressions button.
C
e ne 7. Specify an expression as part of the criteria for qualifying messages. A filter expression
R defines simple filtering rules to limit the volume of log messages that are written to a
particular log destination. Select a Message Attribute, an Operator, and a Value. Then
click OK. Continue to click the Add Expressions button and saving expressions until you
have entered all the expressions needed.
Note: The names of the subsystems can be found by looking through the “Impact” values in
the error messages in Oracle WebLogic Server Error Messages Reference.

Oracle WebLogic Server 12c: Administration I 8 - 17


Creating a Log Filter
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

% is a 8
wildcard.

Expressions
can also be
n s e
ce
manually
li
ble
edited.

fer a
a n s
n - tr
a nothe expressions are
s combined
Ensure

h a d e ฺ correctly.
ฺ m x) Gui
co m dent
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r uz(
8. After the expressions have been entered, ensure that the Boolean operators that connect
C
ne
them are correct. Use the drop-down list to choose And or Or. Then click the Save button.
R e Finally, click Activate Changes in the Change Center.
Log filter expressions are WLDF queries. For more information about the WLDF Query
Language see the appendix titled “WLDF Query Language” in the Configuring and Using the
Diagnostics Framework for Oracle WebLogic Server document.

Oracle WebLogic Server 12c: Administration I 8 - 18


Applying a Log Filter

1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
a
- tr
no n
a
s eฺ 4
3
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
1. After the configuration has been locked, in the Domain Structure, expand Environment
C
ne
and select Servers. In the Servers table, click the name of the server that you want to
R e configure. Click the Logging > General tab.
2. Click Advanced.
3. Under the Message destination(s) section, specify an existing filter for messages going
to any of the four log message destinations:
– Log file (the server log, being filtered in the slide)
– Standard out
– Domain log broadcaster
– Memory buffer
4. Click the Save button. Then, in the Change Center, click Activate Changes.

Oracle WebLogic Server 12c: Administration I 8 - 19


Subsystem Debugging

• Various WebLogic Server subsystems have the ability to


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

generate detailed log messages to facilitate debugging.


• You can enable debugging on specific servers for
individual subsystems.
1
2
n s e
lice
3 r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
1. After the configuration has been locked, in the Domain Structure, expand Environment
C
ne
and select Servers. In the Servers table, click the name of the server you want to
R e configure.
2. Click the Debug tab.
3. Select one or more available debugging scopes by using the supplied check boxes.
Then click Enable or Disable. For convenience, a Clear button is also provided to
deselect the debug scopes or attributes that are currently selected.

Oracle WebLogic Server 12c: Administration I 8 - 20


Debug Scopes

• Debug flags (attributes) for WebLogic Server subsystems


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

are organized into scopes.


– You can enable entire debug scopes or individual attributes.
– When a parent scope is enabled, all child scopes and
attributes are also enabled, unless they are overridden.

n s e
lice
Scopes When in doubt about which scope or attribute
r a ble
fe
to choose, enable a parent category.
n s
n - tra
a no
Attribute s
) h a ideฺ
ฺ m x G u
om uden t
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
r u
Changing debugging is “dynamic,” in that you can enable debugging while a server is running.
C
e neMany debug flags can also be set as command-line arguments when starting a server. Some
R examples:
• -Dweblogic.debug.DebugCluster=true (cluster debugging)
• -Dweblogic.debug.DebugJDBCSQL=true (SQL debugging)

Oracle WebLogic Server 12c: Administration I 8 - 21


Debug Scopes: Examples
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Subsystem Scopes (weblogic.*)


JDBC jdbc.connection, jdbc.internal, jdbc.sql

Cluster core.cluster
Deployment deploy, ejb.deployment

e
Applications application.library, ejb.caching, ejb.invoke,
n s
ce
ejb.pooling, servlet, servlet.internal,
li
ble
servlet.internal.session
Transactions transaction.recovery, transaction.twopc,
fer a
transaction.xa
n s
security, security.ldap, security.ssl
n - tra
no
Security

s eฺ a
h a id
)the log location
x u
All “debug scope” messages are the DEBUG
m nt G
isฺ set appropriately.
severity level, so ensure
m
co
severity level
ฺ u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
Some u z (re of attributes under a scope:
r examples
•C weblogic.jdbc.connection.DebugJDBCConn: Traces all connection reserve and
en e
R release operations in data sources as well as all application requests to get or close
connections
• weblogic.jdbc.sql.DebugJDBCSQL: Prints information about all JDBC methods
invoked, including their arguments and return values, and thrown exceptions
• weblogic.core.cluster.DebugCluster: Prints information about basic cluster
lifecycle events

Oracle WebLogic Server 12c: Administration I 8 - 22


Admin Console: Monitoring Domain Resources

The administration console can monitor domain resources:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Servers
• Clusters
• Machines Click the refresh icon to periodically
refresh the page.
• Deployments
• JDBC data sources n s e
lice
ble
• And more
r a
fe Select
Use the Domain Structure to locate the type of resource.
n s
a particular instance. Then click the Monitoring-tab.
n tra The
Monitoring tab of some elements have subtabs. a no
h a s the eฺ Customize this
• When data is displayed in a table, )
x displayed.
use
u i d
m ฺ m
table link to modify the columns n t G
ฺ co ude
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
re
z ( The subtabs under the Monitoring tab are: General (state, version, OS, and so

r u
Servers:
C on), Health, Channels (statistics on hosts/ports), Performance (Java memory
e ne
R information), Threads (Java thread information), Timers (internal timers used by the
server), Workload (information on Work Managers), Jobs (Job Scheduler information),
Security (invalid logins and locked out users), Default Store (information on the default
persistent store used by JMS, JTA, WLDF, and others), JMS (information on JMS
connections and servers), SAF (information on Store and Forward agents), JDBC (data
sources), and JTA (transactions).
• Clusters: Information about the servers in the cluster, how often they drop out of the
cluster, failover data, and more
• Machines: Monitoring of the Node Manager under the machine
• Deployments: The state and other information about deployed applications
• JMS destinations (queues and topics): Information about messages on the
destination
• JDBC data sources: Information about connections and capacity
If a monitoring page has a refresh icon, click it to have the administration console periodically
poll the resource and update the display. To change the rate at which this occurs, update the
Refresh Interval under the admin console’s User Preferences.

Oracle WebLogic Server 12c: Administration I 8 - 23


Monitoring the Domain

The domain itself has a Monitoring tab, which can show you
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

an overview of the domain’s health, servers, clusters, and


migration.

Choose a certain
state (like “Failed”)
and click Filter to
n s e
limit which servers
lice
ble
are displayed.

fer a
a n s
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
To access domain monitoring, in the Domain Structure, click the domain name, and then click
C
neThe options for the Health filter are:
the Monitoring tab. Its subtabs are Health, Servers, Clusters, and Migration.
R e
• All: Show all servers.
• OK: Show only servers that are functioning without any problems.
• Warning: Show servers that have issued warnings and that might have problems in the
future.
• Overloaded: Show servers that are overloaded; these servers have gone below their
free memory threshold percentage. (This threshold is set for a server in the admin
console under the Configuration > Overload tabs. The field is called “Free Memory
Percent Low Threshold.”)
• Critical: Show servers that are about to fail. Action must be taken immediately or a
server in this state will soon fail.
• Failed: Show servers that have failed. A failed server’s Health will display as “Not
reachable.”

Oracle WebLogic Server 12c: Administration I 8 - 24


Monitoring All Servers

The servers table in the admin console lists all the servers in a
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

domain. The information displayed can be customized so you


can use this table to see the information important to you.

To customize the information displayed

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
To access the servers table, in the Domain Structure, expand Environment and select
C
neThe data in the servers table can be customized (as many tables can in the administration
Servers. The servers table is on the Configuration tab.
R e
console). Click Customize this table and you can filter the data displayed and adding or
subtracting the attributes that are shown. You can also sort the data in the tables by clicking
the column headers.

Oracle WebLogic Server 12c: Administration I 8 - 25


Monitoring Server Health

The admin console server health monitoring page shows the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

state of the server’s subsystems and deployments.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
To access the server health information, in the Domain Structure, expand Environment and
C
ne
select Servers. In the servers table, select the server of interest by clicking its name. Click the
R e Monitoring > Health tab.

Oracle WebLogic Server 12c: Administration I 8 - 26


Monitoring Server Performance

The admin console server


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

performance monitoring
page shows information on
the JVM.
Request the JVM do a Display the current stacks

e
garbage collection now. for each thread.

n s
lice
r a ble
n sfe
a
Have the admin console
refresh the screen
n - tr
no
periodically.

s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
To access the server health information, in the Domain Structure expand Environment and
C
ne
select Servers. In the servers table, select the server of interest by clicking its name. Click the
R e Monitoring > Performance tab.

Oracle WebLogic Server 12c: Administration I 8 - 27


Monitoring Data Source Health

The admin console data source monitoring lets you view data
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

source state and many statistics about its health and activity.

n s e
Many data source attributes are
lice
ble
available when you customize the table.

fer a
a n s
n - tr
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
To access data source monitoring, in the Domain Structure expand Environment, then
C
ne
Services, and select Data Sources. In the data sources table, select the data source of
R e interest by clicking its name. Click the Monitoring > Statistics tab.
Many health, activity, and performance data source attributes are available to display by using
the Customize this table link.

Oracle WebLogic Server 12c: Administration I 8 - 28


Example Data Source Performance Attributes

Customize the data source monitoring table to display


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

performance data. For example:

Attribute Description
Active Connections The number of database connections currently in use
Current Count
Current Capacity The total number of connections in the connection pool
n s e
The running total of connection requests that could not bele l
ice
Failed Reserve
r a b
Request Count fulfilled
e
sf to the
tr a n
Leaked Connection The number of connections reserved but not
n - returned
Count connection pool
a no
Number Available The number of connections idle
h a s andeavailable
ฺ for use
x) Gui d

m dentm
c o
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r uz ( are some of the performance attributes available under data source monitoring :
The following
e •C Active Connections Current Count: The number of connections currently in use by
e n
R applications
• Current Capacity: The current count of JDBC connections in the connection pool in the
data source
• Failed Reserve Request Count: The cumulative, running count of requests for a
connection from this data source that could not be fulfilled
• Leaked Connection Count: The number of leaked connections. A leaked connection is
a connection that was reserved from the data source but was not closed. Because it was
not closed, it was not returned to the connection pool.
• Number Available: The number of database connections that are currently idle and
available to be used by applications in this instance of the data source

Oracle WebLogic Server 12c: Administration I 8 - 29


JMX, MBeans, Managing, and Monitoring

WebLogic Server manages and monitors its resources by using


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the Java Management Extensions (JMX) API.


• JMX provides a standardized way of managing and
monitoring resources through objects call MBeans
(managed beans).
• WebLogic Server provides a large set of MBeans for all the
n s e
resources that it manages and monitors.
lice
– These MBeans are used by WebLogic Server tools like the
r a ble
administration console, WLST, and the Monitoringsfe
- tr an
on
Dashboard.
a ฺ n
a s
x ) h uide
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
r u
Configuration MBeans contain information about the configuration of WebLogic Server
C
ne
resources. They represent the information that is stored in the domain’s XML configuration
R e documents. Each instance of WebLogic Server has an in-memory representation of its
configuration as a collection of these read-only Configuration MBeans.
In addition to the read-only Configuration MBeans, the administration server maintains a
collection of editable Configuration MBeans. To edit them, you use a JMX client (either the
administration console, WLST, or Enterprise Manager Cloud Control). This client goes
through the administration server to use its editable Configuration MBeans.
Runtime MBeans contain information about the runtime state of a server and its resources.
They generally contain only data about the current state of a server or resource, and they do
not persist this data. When you shut down a server instance, all runtime statistics and metrics
from the runtime MBeans are destroyed. It is these runtime MBeans that are used by the
Monitoring Dashboard to get real-time data.

Oracle WebLogic Server 12c: Administration I 8 - 30


Monitoring Dashboard

The Monitoring Dashboard:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Is accessible from a link on the administration console


home page
The dashboard opens
in a new window or tab

• Graphically presents current or historic WebLogic Server


n s e
diagnostic data
lice
– Multiple graph types are available
r a ble
• Allows you to monitor WebLogic Server MBeannattributes sfe
n - tra
no
– From active runtime MBeans (polled metrics)
s a ฺ
– From an archive collected by WLDF
) h uid a (collected
e
metrics)
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re Dashboard provides views and tools for graphically presenting diagnostic
u underlying functionality for generating, retrieving, and persisting diagnostic data is
rThe
The Monitoring
C
e
n provided by the WebLogic Diagnostics Framework (WLDF).
data.
Re
You can launch the Monitoring Dashboard from the administration console, or you can run it
independently. To launch it from the admin console, go to the Home page and under “Charts
and Graphs” click the Monitoring Dashboard link. The dashboard opens in its own window
(or tab). To access the Monitoring Dashboard directly, use the URL:
http:admin_host:admin_port/console/dashboard
The dashboard, like the admin console, requires you to log in with administrative credentials.
The diagnostic data displayed by the Monitoring Dashboard consists of runtime MBean
attributes. These values are referred to in the Monitoring Dashboard as metrics. The
dashboard obtains metrics from two sources:
• Directly from active runtime MBean instances. These metrics are referred to as polled
metrics.
• From Archive data that has been collected by a WLDF (by a WLDF artifact called a
Harvester). These metrics are referred to as collected metrics.

Oracle WebLogic Server 12c: Administration I 8 - 31


Monitoring Dashboard Interface

Explorer View Display


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Metric Browser

View List

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Monitoring Dashboard has two main panels: the explorer panel and the view display
C
neThe explorer panel has two tabs:
panel.
R e
• View List: A list of existing built-in and custom views. It also contains controls for
creating, copying, renaming, and deleting views.
• Metric Browser: A way of navigating to and selecting the specific MBean instance
attributes whose metric values you want to display in a chart in a view

Oracle WebLogic Server 12c: Administration I 8 - 32


Views

• Are a way to organize your charts and graphs


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Typically display metrics that are related in some way


• Are individually started (to collect data) and stopped
• Continue to collect data even when not being displayed

n s e
ce
Stop the displayed
i
Stop all active views
l
ble
view
a
Create a new rview
fe
n s
ra selected view
Start the displayed
view (disabled since
n
Copy - tthe
already started) o
nDelete
s a ฺ
) h uid a e
the selected view
An active view
x
ฺm nt G
co m d e
An inactive view
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (retab lists views. A view is a collection of one or more charts that display captured
C ru and diagnostic data. You can access, create, and update views from the View List
The View List

enetab. When you click the name of a view on the View List tab, that view is displayed in the View
monitoring
R Display on the right.
The dashboard uses icons to indicate the status of a view. A gray icon indicates that the view
is inactive and data polling is not occurring for the charts in that view. A color icon indicates
that the view is active and data polling is occurring for all charts in that view (this is true
whether or not the view is currently displayed in the View Display).
To start the data collection for a view, click the view name in the list and click the green Start
button above the tabs. To stop data collection, click the red-and-white rectangular Stop
button. To stop all active views, click the red octagonal Stop All button.

Oracle WebLogic Server 12c: Administration I 8 - 33


Built-in Views

• The dashboard defines built-in views for some of the more


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

critical runtime performance metrics.


• Built-in views cannot be modified (or deleted), but they can
be copied and the copy modified.

n s e
Basic JMS metrics for all servers
lice
r a ble
n sfe for
Basic heap metrics

n - ta
eachrserver’s JVM

a no
Preconfigured
h a s eฺ
views listed
x ) u id
per server
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z re are a set of predefined views of available runtime metrics for all running
(views
ru Server instances in the domain. These views display some of the more critical
The built-in
C
e
n runtime WebLogic Server performance metrics and serve as examples of the dashboard’s
WebLogic
Re chart and graph capabilities.
You cannot modify a built-in view, but you can copy it. This copy is now one of your custom
views. As a custom view, the copy can be modified, renamed, saved, and later deleted.
Built-in views also cannot be deleted.
Custom views are available only to the user who created them and only within the current
domain.

Oracle WebLogic Server 12c: Administration I 8 - 34


Creating a Custom View

2
1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
4
lice
• A view is a collection of
r a ble
charts.
n sfe
- tr 5 a
• Each chart contains one
no n
or more graphs. a
s eฺ
) ha id
• Each graph displays
x u
one MBean attribute. mฺm 6 nt G
ฺ co ude
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
A custom view is any view created by a user. Custom views are available only to the user who
C
neTo create a new custom view with a chart and graphs:
created them. You can access a custom view again when needed.
R e
1. Click the View List tab. Then click the New View button. A new view appears in the list
named New View. Replace the default name with something meaningful. Also, a new
empty view appears in the View Display area. To add charts to the custom view, use the
drop-down menu above the View Display area and click New Chart, or just drag in the
first metric (MBean attribute) and a new chart is created for you.
2. To add graphs to a chart, first click the Metric Browser tab.
3. Select a server in the Servers drop-down list and click Go.
4. Select an MBean type and an MBean instance.
5. In the Metrics list for that instance, drag an MBean attribute to a chart. Note that a view
may have as many charts as you like and a chart can graph as many metrics as you
like. Also, if a metric is dragged into a view that contains no charts, the dashboard
automatically creates a new chart to contain the graph.
6. When the metrics are in place, click the green Start button to start collecting data.
To delete a custom view, select the name of the view and click the Delete (red “X”) button.

Oracle WebLogic Server 12c: Administration I 8 - 35


Anatomy of a Chart
Edit Tool
Y-axis
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Graph with data


points (move cursor
over for details)

n s e
Menu
lice
r a ble
s
Pan andnzoom fe
n - tra
no
controls
Legend Chart
X-axis
s eฺ a
a
overview

x ) h u id
m ฺm nt G
o e
Metric Menu
o ฺ c tu d
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re one or more graphs that show data points over a specified time span. A chart
A chartucontains
r
ealsoCincludes a legend that lists the sources of data for each graph along with their associated
n icons and colors.
Re
When working with a view, you can do the following:
• Add charts to views
• Add graphs to charts
• Pan and zoom
• Edit labels and legends by using the Edit Tool
• Start and stop data collection for charts in a view

Oracle WebLogic Server 12c: Administration I 8 - 36


Current or Historical Data

• To view real-time metrics, no set up is needed. When a


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

view is started, the runtime MBean instances are polled.


• To view historical (collected) metrics, WLDF must have
been previously configured to collect data. Metrics
collected by WLDF are placed into the diagnostic archive.
To view harvested data:
n s e
lice
1. In the View List, click the New View button.
2. In the Metric Browser, select a Server.
r a ble
3.
n sfe Only.
To see only harvested data, select Collected Metrics
tra new view.
n-the no
4. Drag some attribute from the Metrics list to

s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Monitoring Dashboard displays two kinds of diagnostic metrics: real-time data directly
C
ne
from active runtime MBeans (called polled metrics) and historical data collected by a
R e previously configured WLDF artifact called a Harvester (called collected metrics).
Note that with polled metrics, if polling has been taking place long enough for old data to be
purged, a view will not contain all data from the time polling started.
If a WLDF Harvester was configured to harvest data for a particular metric, that historical data
is available and can be displayed. Harvesters, or metric collectors, are configured within
Diagnostic Modules. To create a Diagnostic Module, from the Domain Structure expand
Diagnostics and select Diagnostic Modules, and then create one by clicking the New
button. Select the new module and click the Configuration > Collected Metrics tabs to set
up a collector. Select the Enabled check box to enable this collector. Set the period (in
milliseconds) between collections in the Sampling Period field. Define the metric to collect by
clicking the New button and use the Create a Metric wizard to select the MBean Server
location, the MBean Type, and its Attributes. Target the Diagnostic Module to servers from
which you want it to collect data. Harvested data is placed into the diagnostic archive, which
can either be a WLDF file store or WLDF JDBC store. By default, the file store is used. The
file can be found here: server_name/data/store/diagnostics.

Oracle WebLogic Server 12c: Administration I 8 - 37


Quiz

Which list of severity levels is in order from bad to worse?


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. ERROR, CRITICAL, ALERT, EMERGENCY


b. ALERT, ERROR, CRITICAL, EMERGENCY
c. ERROR, ALERT, CRITICAL, EMERGENCY
d. ERROR, CRITICAL, EMERGENCY, ALERT
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruza
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 8 - 38


Quiz

A log filter can be applied to only one log message destination


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

at a time.
a. True
b. False

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzb
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 8 - 39


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Configure and access WebLogic Server logs


• Enable WebLogic Server debugging output
• Monitor WebLogic Server health and performance
• Monitor JDBC data sources
• Access diagnostic charts in the Monitoring Dashboard n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 8 - 40


Practice 8-1 Overview:
Working with WebLogic Server Logs
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Accessing the server log by using the admin console


• Creating and applying a log filter

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 8 - 41


Practice 8-2 Overview:
Monitoring WebLogic Server
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Monitoring a server by using the admin console and the


Monitoring Dashboard
• Monitoring JDBC data sources by using the admin console
• Enabling debugging by using the admin console

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 8 - 42


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Node Manager

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Configure WebLogic Server machines


• Set up and configure Node Manager
• Start managed servers through Node Manager

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 9 - 2


Node Manager

Node Manager is a WebLogic Server utility that:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Can remotely start and stop the administration server or


managed servers
• Can monitor the health of an instance of WebLogic Server
and automatically restart it if it fails
• Runs as a separate process on the same machines as
n s e
instances of WebLogic Server lice
• Is available as either a Java-based or a script-basedrabl
e
n sfe
ra
process (for UNIX or Linux)
n- t
n
• Can be set up as an operating system service o to start
a ฺ
as
automatically when a system is rebooted
) h uide
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Instances of WebLogic Server are often distributed across multiple domains, machines, and
C
ne
geographic locations. Node Manager is a WebLogic Server utility that enables you to start,
R e shut down, and restart the administration server or managed servers from a remote location.
Although Node Manager is optional, it is recommended if your WebLogic Server environment
hosts applications with high availability requirements.
If Node Manager starts an instance of WebLogic Server and that instance fails, Node
Manager can automatically restart it. Node Manager can restart only a failed server that it
started. This restart feature is configurable. Node Manager's default behavior is to:
• Automatically restart WebLogic Server instances under its control that fail. You can
disable this feature.
• Restart failed server instances no more than a specific number of times. You define the
number of restart tries.
If Node Manager fails or is explicitly shut down, upon restart, it determines which WebLogic
Server instances were under its control when it exited. Node Manager can then restart any
failed server instances if need be.
To control instances of WebLogic Server on a particular machine through Node Manager,
there must be a Node Manager process running on that machine.

Oracle WebLogic Server 12c: Administration I 9 - 3


WebLogic Server provides two versions of Node Manager: Java based and script based (for
UNIX or Linux). The two versions have different configuration and security considerations. The
Java-based Node Manager contains the latest functionality and runs on any platform that
supports WebLogic Server, and so it is the one covered in this lesson.
The administration console can communicate with Node Manager to start, shut down, or restart
instances of WebLogic Server.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WLST (in offline mode) can serve as a Node Manager command-line interface.
Node Manager is also involved in automatic server migration within a cluster. If a server fails
and cannot be restarted (as in the case of hardware failure), that server can be migrated to new
hardware and restarted there.
It is recommended that you run Node Manager as an operating system service, so that it
restarts automatically if its host machine is restarted.

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 9 - 4


Two Types of Node Manager

• Java based
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Runs within its own Java Virtual Machine


– Runs on any operating system that runs WebLogic Server
– Can use secure SSL communication, if desired
• Script based
– Runs in its own process
n s e
– Available only for UNIX or Linux systems lice
– Uses Remote Shell (RSH) or Secure Shell (SSH) r a ble
n sfethe
Either type should be set up to start automatically when
n - tra
computer is booted (as a UNIX daemon or a o
a ฺ n Windows service).
a s
x ) h uide
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re Server provides two versions of Node Manager: Java based and script
OracleuWebLogic
e Cr
en
based.
R • A Java-based Node Manager runs within its own JVM process. The Java-based version
of Node Manager determines its configuration from the nodemanager.properties
file.
• For UNIX or Linux systems, WebLogic Server also provides a script-based version of
Node Manager. This script is based on UNIX shell scripts. It can use SSH for increased
security. SSH uses user ID-based security.
Automatic Server Migration is supported by both script-based and Java-based versions of
Node Manager.
It is recommended that you run Node Manager as a Windows service on Windows platforms
and as a daemon on UNIX platforms, allowing Node Manager to restart automatically when
the system is rebooted.

Oracle WebLogic Server 12c: Administration I 9 - 5


Node Manager Architecture: Per Machine

A single Node Manager can control servers from multiple


domains.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Admin Console Admin Console


or WLST or WLST

Start ServerA2 Start ServerB1

n s e
ce
Machine
li
ble
Domain A
Domain B
fer a
n s
ra
ServerA1
n - t
no
Node ServerB1
ServerA2
a
s ServerB2
a eฺ
Manager
x ) h u i d
m G
ServerA3
ฺ t
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
In previous releases of WebLogic Server, a Node Manager process was not associated with a
C
ne
specific WebLogic Server domain, but instead with a machine. You used the same Node
R e Manager process to control server instances from any WebLogic Server domain, as long as
those server instances ran on the same machine.
This configuration is still possible.

Oracle WebLogic Server 12c: Administration I 9 - 6


Node Manager Architecture: Per Domain

The default is to have one Java-based Node Manager per


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

domain.
Domain A Machine Admin Console
or WLST
ServerA1 Domain B

e
Node
ServerA2
n s
ce
Manager Start ServerB1
li
ServerA3
r a ble
Admin Console Domain B
n sfe
a - tr
n
or WLST
ServerB1no
Domain A
s a ฺ
This allows the
Node a
h uid
) ServerB2 e
Node Manager
Start ServerA2 Manager
ฺ m x G
for each domain

om uden t to have its own

ฺ c
configuration.

sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
r u
Starting with WebLogic Server 12.1.2, the default is for a Java version of Node Manager to
C all WebLogic Server instances belonging to the same domain.
e n e
control
R Having domain-specific (Java-based) Node Managers allows you to have different
configurations for different domains.

Oracle WebLogic Server 12c: Administration I 9 - 7


How Node Manager Starts a Managed Server

Machine Machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2
Admin Start ServerA2. Node
Server Manager

Create process
3
and start server.
n s e
ce
1
li
Request to
r a ble
start ServerA2. ServerA2
n sfe
4 a - tr
no n
a
Obtain latest
Admin Console configuration
h a s eฺ
or WLST (as usual).x ) u id
m ฺm nt G
ฺ c o u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (reManager client, the administration console or WLST, asks to start the managed
C ru
1. The Node

ene
server.
R 2. The administration server contacts the Node Manager running on that server’s machine,
asking Node Manager to start that server. The admin server verifies its identity by sending
along the Node Manager credentials (username and password). The server’s startup
properties are also sent (from the server’s Configuration > Server Start page). If those
properties have not been set, Node Manager uses the defaults found in the
nodemanager.properties file.
3. Node Manager creates the server process and starts the server.
4. As usual, when a managed server comes up, it obtains the latest configuration from its
administration server.
Note: This is the usual procedure used to start a managed server through Node Manager. It
is also possible to start a managed server by using WLST and connecting directly to Node
Manager (bypassing the administration server).

Oracle WebLogic Server 12c: Administration I 9 - 8


How Node Manager Can Help
Shut Down a Managed Server
Machine Machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4
Admin Shut down ServerA1. Node
Server Manager
Issue OS
command to
5 kill the server’s
n s e
Request to process.
lice
ble
1 shut down
ServerA1. ServerA1
fer a
a n s
2
n - tr
no
3
a
Shut down
Admin Console Theaserver
h s eฺ
or WLST
x )unreachable. u id
ฺm nt G
is

co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (reManager client, the administration console or WLST, asks to shut down the
C ru
1. The Node

ene
managed server.
R 2. The administration server issues the shutdown command directly to the managed server.
Normally, the server then performs the shutdown sequence.
3. If the server is unreachable (perhaps it is “hung”), the admin server contacts Node
Manager.
4. The administration server asks Node Manager to shut down the server.
5. Node Manager requests that the operating system kill the server’s process.

Oracle WebLogic Server 12c: Administration I 9 - 9


Configuration Wizard and Node Manager

When creating a domain with the Configuration Wizard, there is


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

an option for Node Manager.


• You can select the Node Manager check box on the
Optional Configuration page of a wizard.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 9 - 10


Configuration Wizard and Node Manager
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Per Domain uses the


default location.
If Custom Location
The default selected, enter the
location here.

n s e
lice
ble
To change the Node
Manager home location
fer a
a n s
n - tr used by
a no a client (admin
Credentials

h a s eฺserver or WLST) to
x ) u id access Node
m ฺm nt G
o e
Manager

ro ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
On the Node Manager page:
C
e ne • Select:
R - Per Domain: Node Manager home is the default location of
<domain>/nodemanager.
- Custom Location: Enter the home directory in the Node Manager Home field.
- Manual Node Manager Setup: This bypasses any Node Manager configuration by
the wizard.
• Enter the Node Manager Credentials:
- Username/Password/Confirm Password: Enter the credentials that the
administration server or WLST will use to authenticate with Node Manager. Note
that these are not the same as the WebLogic Server administrator username and
password.
• Then click Next.

Oracle WebLogic Server 12c: Administration I 9 - 11


Configuring the Java-Based Node Manager

1. Define machines in the domain to represent each


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

computer. Note that some of the


configuration can be
2. Under each machine configuration: done when creating
the domain.
A. Assign servers to the machine.
B. Set the Java Node Manager type to Plain or SSL.
C. Set the listen address to the Node Manager computer’s IP
n s e
address or its host or DNS name. Select a listen port.
lice
3. In each managed server configuration, set the server start
r a ble
parameters and the monitoring and restart parameters
n sfe
used by Node Manager. (If not set by you, these
n - tra
parameters have default values.)
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re that you use the SSL type of the Java-based Node Manager in a
ru environment. Configuring SSL involves obtaining identity and trust for the Node
It is recommended
C
eneManager and each administration and managed server with which the Node Manager will be
production
R communicating, and then configuring the Node Manager, the admin server, and the managed
servers with the proper identity and trust. For more information, see “Configuring SSL” in the
Administering Security for Oracle WebLogic Server document.

Oracle WebLogic Server 12c: Administration I 9 - 12


Configuring Server Start and
Health Monitoring Parameters
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Server Start parameters are the kinds of things you can set in server start scripts. They are:
C
e ne • Java Home: Where the JVM is located to use for running this server. Enter the parent
R directory of the JDK bin directory.
• Java Vendor: The Java vendor. This needs to be entered if different Java vendors are
used in the same cluster.
• BEA Home: The home directory of “BEA” products
• Root Directory: The server’s root directory. The domain directory is used if this is not
specified.
• Class Path (not shown): The CLASSPATH for this server
• Arguments (not shown): Arguments to use when starting the server (for example, JVM
memory arguments)
• Security Policy File (not shown): The Java security policy file and the path to it
• User Name (not shown): The username to use when starting this server
• Password (not shown): The password to use when starting this server. Note that the
password is stored in the configuration encrypted.
Note that if these attributes are left blank, they are set to default values.

Oracle WebLogic Server 12c: Administration I 9 - 13


Health Monitoring parameters:
• Health Check Interval: The server monitors the health of its subsystems every Health
Check Interval seconds and changes the server's overall state if it changes.
• Auto Kill If Failed: Specifies whether Node Manager should automatically kill this server if
its health state is “failed”
• Auto Restart: Specifies whether Node Manager should automatically restart this server if
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

it crashes or otherwise goes down unexpectedly


• Restart Interval: The number of seconds during which Node Manager can try to restart
this server
• Max Restarts Within Interval: The number of times that Node Manager tries to restart
this server within the time specified in Restart Interval
• Restart Delay Seconds: The number of seconds Node Manager must wait before trying
to restart this server
n s e
Note that if these attributes are left blank, they are set to default values.
lice
r a ble
n sfe
n - tra
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s
r u z@ se th
n e ฺc to u
z (re
C ru
R ene

Oracle WebLogic Server 12c: Administration I 9 - 14


Configuring the Java-Based Node Manager

4. Install WebLogic Server on the computers where you plan


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

to run Node Manager (and managed servers).


5. *Create a directory for Node Manager on each computer:
A. Copy the startNodeManager.sh script to the directory
from <WL_HOME>/server/bin.
B. Edit the script and set NODEMGR_HOME to the current path.
n s e
C. Create and edit a text file named
lice
These are done for

Manager is setle
you if Node
nodemanager.properties. up
r a b
fe
ans
D. Set (at least) the following properties: through the

tr
Configuration
ListenAddress=value
n -
no
— Wizard.
— ListenPort=value
s eฺ a
h a
) directory d the domain directory.
iunder
x u
mconfigured tG
* The default Node Manager home is the nodemanager
This is the location used when Node Managerฺis
o m e n during domain creation by using the

ro ฺc tud
Configuration Wizard and the “Per Domain” Node Manager type is selected.

se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z re directory for Node Manager is not a requirement, but a recommended
(unique
C ru and the default for the Java-based “per domain” Node Manager.
Creating a

ene
practice,
R When you start the Node Manager configuration during domain creation by using the
Configuration Wizard, the default Node Manager Type is “Per Domain.” The default location of
Node Manager Home is the nodemanager directory under the domain directory. The
nodemanager.properties file is created and placed under that directory, and the values
for the ListenAddress and ListenPort properties are set for you. If you set them yourself
or change the values, ensure that they match the values set in the machine configuration.

Oracle WebLogic Server 12c: Administration I 9 - 15


Configuring the Java-Based Node Manager

6. On each computer, enroll Node Manager with the domain.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

7. Start Node Manager by running startNodeManager.sh.


8. *Set up a UNIX daemon to start Node Manager
automatically on computer startup.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x u
o m ฺm
e n tG
ฺc tud
* Not required, but recommended

ro
e is S
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
More on enrolling Node Manager with a domain is found later in this lesson.
C
e neSetting up a UNIX daemon (or a Windows service) to start Node Manager is not a
R requirement, but a recommended practice.

Oracle WebLogic Server 12c: Administration I 9 - 16


Other Node Manager Properties

The nodemanager.properties file has many properties:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Property Description
AuthenticationEnabled Node Manager authenticates the admin server
against the credentials defined in the domain.
StartScriptEnabled Start servers by using a script.

e
StopScriptEnabled Stop servers by using a script.
n s
StartScriptName Name of the script used to start servers
lice
Name of the script used to stop servers ble
ra
StopScriptName
f e
safter
CrashRecoveryEnabled Automatically restart failed servers
r a n
machine restart.
o n -t
Max times to try and a n a failed server
s
RestartMax restart
h a spend d ฺ a restart
etrying
) i
mx ntchecks Gu of a server’s state
RestartInterval Amount of time to
Timem in ฺbetween
o ude
StateCheckInterval
o ฺ c
ser is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
There uz (re
CrManager” chapter of Node Manager Administrator’s Guide for Oracle WebLogic Server.
are many more properties than those listed in the slide. See the “Configuring Java

en e
Node
R

Oracle WebLogic Server 12c: Administration I 9 - 17


Node Manager Files

Under the Node Manager home directory:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• nodemanager.properties: Is used to set Node


Manager attributes
• nodemanager.domains: Stores the domains with which
this Node Manager communicates
• nm_data.properties: Is used by Node Manager to
n s e
ce
store its encryption key
li
• nodemanager.log: Is used by a running Node Manager
r a ble
to log information about its work
n sfe
Under the domain’s config/nodemanager directory: n - tra
a no encrypted Node
• nm_password.properties: Stores
h a s eฺthe
Manager username/password x ) the
that u idNode Manager
mฺmitself ntot G
client uses to authenticate
ฺ co ude Node Manager
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
Note that the domain directory being discussed in this and the next few slides is the domain
C
ne
directory on the machine where Node Manager and the managed servers it controls are
R e running.

Oracle WebLogic Server 12c: Administration I 9 - 18


Node Manager Files

Under the domain’s security directory:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• SerializedSystemIni.dat: Is used by Node Manager


for encryption and decryption
Under the domain’s directory called
servers/servername/data/nodemanager:
• boot.properties: Is created by Node Manager to hold
n s e
a server’s encrypted credentials lice
• startup.properties: Keeps track of server startra ble
and
n sfe
ra
health monitoring options
• servername.lck, servername.pid, o n - t
n
ainternally
servername.state: Are files used
a s e ฺ by Node
x) h uid
Manager to track a server it started
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uzthe boot.properties file used by Node Manager is created automatically by
Note that
e C Manager. It is not the same file (or in the same location) as a boot.properties file
n
Node
R e you can create and place in a server’s security directory.

Oracle WebLogic Server 12c: Administration I 9 - 19


Node Manager Files

Under the domain’s directory called


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

servers/servername/logs:
• servername.out: Is the log file for a server started by
Node Manager that contains stdout and stderr
messages generated by that server

e
– You cannot set up “rotation” for this file, as you can with a
n s
ce
server log file, which can be an issue. An easy solution:
li
—For servers that are started by Node Manager, set the standard
r a ble
out “severity level” to Critical or higher. Then very few
n sfe
tra
messages go into this file.
n -
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
c ou
neฺ
Copyright

e t
z (r
Cr u
e ne
R

Oracle WebLogic Server 12c: Administration I 9 - 20


Enrolling Node Manager with a Domain

Enrolling Node Manager with a domain copies files required by


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Node Manager to the remote computer (or updates existing


files). Then the Node Manager running on this machine can
accept requests from that domain. To enroll with a domain:
1. Start WLST on the computer where you plan to run Node
Manager.
n s e
2. Run the connect() command to connect to the
lice
administration server of the domain: ble ra
fe
s')
connect('username', 'pw', 't3://host:port
r a n
o n -t
3. Run the nmEnroll() command: a n
nmEnroll('domain_home', 'h a s eฺ
x ) u id
node_mgr_home ')

m ฺm nt G
Domain location
ฺ co u d e Node Manager home

sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re command, the first two arguments are the username and password of an
For theuconnect()
Cr
eadministrator.
n The nmEnroll() command downloads two files from the administration server to this
The third argument is the URL to access the administration server.
Re
computer: nm_password.properties and SerializedSystemIni.dat.
The Node Manager “secret file,” nm_password.properties, contains the encrypted
username and password used by the administration server to authenticate itself to the Node
Manager process. This file is placed under the domain directory in config/nodemanager/.
The file used for encryption and decryption, SerializedSystemIni.dat, is placed under
the domain directory in security/.
Also, the nmEnroll() command creates the nodemanager.domains file (or updates an
existing file) found in the Node Manager home directory. It adds the current domain to the list
of domains with which this Node Manager communicates.

Oracle WebLogic Server 12c: Administration I 9 - 21


When Not to Use nmEnroll()

• nmEnroll() is for registering Node Manager with a


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

“WebLogic Server only” domain on a remote machine. It


can be part of the process of preparing that machine for
running the managed servers of the domain.
– You should not use nmEnroll() if your domain uses other
FMW components, because it is insufficient to ready a
machine to run the managed servers in such a domain.
n s e
lice
ble
— The nmEnroll() command does not transfer the required
r a
sfe the
FMW component–specific files to the new machine.
• Using nmEnroll() is not needed if you haveacopied n
domain to the new machine by using theopack n -tr and unpack
s an ฺ
utilities.
) h a ide
ฺ m x G u
om uden t
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
There u
(re
isza scenario in which you use nmEnroll() after the pack and unpack utilities have
e Crused to copy the domain to a remote machine. If, after the domain has been copied
en over, the Node Manager username and password are changed, the credentials in the file on
been
R the remote machine (nm_password.properties) will be out-of-date. This means that the
administration server fails when it tries to contact this Node Manager. However, if you issue
the nmEnroll() command from the remote machine, the command updates the credentials
in that file.

Oracle WebLogic Server 12c: Administration I 9 - 22


Reminder: Pack

1. On the machine where the domain files reside (and the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

administration server runs), use the pack.sh script with


the –managed=true option:
cd <MW_HOME>/oracle_common/common/bin
./pack.sh –domain=domain_path/domain_name
–template=name.jar
n s e
-template_name=somename
lice
-managed=true
r a ble
n sfe
t plan to run
-you r a
o
2. Move the archive file to the machine where n
s a n ฺ(and the
) ha ide
Node Manager and the managed servers
x
products are already installed). u
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz of readying a machine for running managed servers in a domain that contains
For details
C Middleware Components (beyond WebLogic Server), see the Enterprise Deployment
eFusion
n Guide for that component. For example, for Oracle SOA Suite, see the chapter titled “Creating
Re a Domain for an Enterprise Deployment” in the Enterprise Deployment Guide for Oracle SOA
Suite. This document details preparing the network, file system, and database for SOA Suite.
It covers product installation, domain creation (the chapter referenced above), domain
extension for SOA Suite (and other components), setting up Node Manager, and more.

Oracle WebLogic Server 12c: Administration I 9 - 23


Reminder: Unpack

3. Before running the unpack.sh script, ensure that the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

directory exists in which to place the domain: new_path


4. Run the unpack.sh script:
cd <MW_HOME>/oracle_common/common/bin
./unpack.sh –domain=new_path/domain_name
–template=name.jar
n s e
-app_dir=new_path/applications
e lice
abl
-nodemanager_home=nodemgr_home_dir
fer
an s
n -
– The -app_dir argument is optional. It specifies tr the
a no components).
s isealso
application directory (used by some FMW
ha d ฺ optional. Use
– The -nodemanager_home argument )
xsomewherei
u other than the
ฺ m
m den
this to place Node Manager t G
ฺco u/nodemanager.
ero is St
default location: <domain>
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r uz
The -app_dir option specifies the full path to the directory used to store the applications
C in the template.
edefined
n The -nodemanager_home option specifies the full path to the Node Manager home
Re
directory. If not used, it defaults to the nodemanager directory under the domain.

Oracle WebLogic Server 12c: Administration I 9 - 24


Controlling Servers Through Node Manager

After the configuration is set and Node Manager is running on


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the remote machines, servers can be started by using the


WebLogic Server administration console or WLST.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Depending upon the settings of Node Manager, servers that it starts can be monitored and
C
ne
automatically restarted if they fail.
R e

Oracle WebLogic Server 12c: Administration I 9 - 25


Node Manager: Best Practices

• Do not place the Node Manager home under the


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WebLogic Server installation directories.


– The default location for the per-domain Java-based Node
Manager is under the domain directories.
• Use the Java-based Node Manager.

e
– It is portable and has the latest features.
n s
• Use the “per domain” Node Manager.
lice
– The default with the Java-based Node Manager
r a ble
n sfe
tra
– Allows each domain to have a different Node Manager
n -
no
configuration
• Use Node Manager to start the administration s a ฺ server, too
a
) h uid restart it.
– If it fails, Node Manager canxautomatically e
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re to be able to start the administration server, you must use WLST. For
u
rinformation
For Node
C
Manager

e n e
more about how to do that, see the section titled “Using Node Manager to Start
R Servers on a Machine” in Understanding the WebLogic Scripting Tool.

Oracle WebLogic Server 12c: Administration I 9 - 26


Node Manager: Best Practices

• Use a start script to start servers.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Use the script to set WebLogic Server parameters or prepare


resources before the server starts.
– The default for StartScriptEnabled is true.
– The default StartScriptName is startWebLogic.sh.
• In production, use SSL between the admin server and the
n s e
Java-based Node Manager.
lice
– This is one-way SSL.
r a ble
– Set up SSL by obtaining and configuring Identity and
n sfe Trust
keystores on the admin server.
n - tra
a naospecific IP, not “all
s eฺ
– Configure the admin server to listen on
local addresses.”
) h a id
x
ฺm innt G u
– Set SecureListener=true
co m d e
o ฺ tu
er i s S
nodemanager.properties.
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
r u
The parameters that can be set in a script are JVM and WebLogic Server options. Other
C
neFor more information about setting up SSL, see the “Configuring SSL” chapter in Securing
things could be done in the script as well (for example, mounting a drive used by the server).
R e
Oracle WebLogic Server.
Because of host name verification, the admin server needs to be configured to listen on a
specific IP address, rather than the default of “all local addresses.” Otherwise, SSL
communication can fail and Node Manager reject the admin server commands.
If you have configured an admin port for the domain, SSL must be configured for all servers in
the domain. Communication to the servers is through the secure admin port, including
communication from Node Manager.

Oracle WebLogic Server 12c: Administration I 9 - 27


Quiz

To configure a Node Manager by using the admin console,


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

what resource is selected before you click its Node Manager


tab?
a. A managed server
b. The administration server
c. A machine
n s e
d. A cluster lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzc
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 9 - 28


Quiz

When you shut down a managed server by using the admin


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

console, Node Manager is involved:


a. Each time
b. If the managed server cannot be reached by the admin
server
c. Never
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzb
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 9 - 29


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Configure WebLogic Server machines


• Set up and configure Node Manager
• Start managed servers through Node Manager

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 9 - 30


Practice 9-1 Overview:
Configuring and Using Node Manager
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Configuring the Java-based Node Manager


• Starting Node Manager
• Starting servers through Node Manager by using the
administration console

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 9 - 31


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

R e ne
C r uz(
re n e
r u
ฺc to u
s
o ฺ
z@ se th
co m
er i s S tu
x
d
)
e
ha
ฺm nt G u
a
id
no
s eฺ
n- tr
a n sfer a ble
lice n s e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Deploying Applications

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R
Objectives

After completing this lesson, you should be able to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Deploy an application
• Test a deployed application
• Monitor a deployed application
• Load test an application
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 2


Deploying Applications to WebLogic Server

2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Managed
The administrator uses a tool, Server
such as the admin console, to
1 communicate with the admin Clients

e
server, and starts the deployment.
n s
ce
The deployment is pushed
l
out to the target servers.i
3 The archive is uploaded to
a ble
The deployed application
r
the admin server and the
sfe
is “turned on” to start
n
Developers develop the deployment is targeted.
- tra
servicing client requests.
application and provide The admin server updates
no n
the archive file to the the domain configuration.
s eฺ a
Admin ) ha id
administrator.
x u
o m ฺm update
Server
e n tG
ro ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
1. First, an application must be developed, tested, and packaged (usually as an application
C
ne
archive).
R e 2. The application archive file is placed where an administrator in charge of deployment
has access to it. A deployment tool, such as the administration console, is used to
communicate with the administration server of the domain, which is in charge of any
configuration changes, including application deployment.
3. The deployment tool gives the administration server access to the application, and
allows the deployment administrator to target a server (or servers) on which to run the
application. The administration server updates the domain’s configuration.
4. The administration server pushes the application’s code out to the target server (or
servers). After the application is “activated” (told to start servicing requests), it can be
accessed by clients.

Oracle WebLogic Server 12c: Administration I 10 - 3


Software Life Cycle and WebLogic Server

Node Machine Test Production


Machine
Mgr
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Prod Domain
Test Domain Oracle DB
Oracle Admin
Cluster Machine DB Server

Server Test Domain


Admin Node Machine Node Machine
Server
s e
Mgr Mgr

n
Server
Prod Domain lice
ble
Prod Domain
Cluster
fer a
Development
a n s
tr
Machine Server Server
n -
Dev Domain
a no
s
Server Server
Admin
) h a ideฺ
ฺ m x Server G u
t
Server Server
om uden
Other DB

ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

e n e
z (rare
r u
Applications
C
created by developers, who are responsible for unit-level testing. After the

e n e
developers are satisfied with individual components, those components are combined and
R moved into a test environment. The system is tested there by a quality organization. After the
application has passed the system-level quality tests, it is moved into production.
With WebLogic Server, each environment has its own domain:
• A development-time domain often defines only the required administration server. The
portion of the application being developed by a single developer is deployed to the
admin server, which is running on a local machine. The database used may be from a
different vendor than the production database. No managed servers or clusters are
created or tested. Completed development elements are combined on a shared
machine, almost always by using a version control system. After all development
elements are completed and put together on the shared machine, the system is moved
to the test environment.
• A test domain mimics production as closely as possible, although on a smaller scale.
Rather than have as much hardware or as many instances of WebLogic Server, it
defines a small cluster, perhaps all servers running on one machine. The database is
the same vendor as production, but contains a much smaller amount of data than its
production counterpart. Test users and groups are created that differ from actual
production users and groups.

Oracle WebLogic Server 12c: Administration I 10 - 4


Java EE Deployments

• Java Platform, Enterprise Edition deployment units:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Java EE Deployment Archive Name Archive File Extension


Web application Web archive .war

Enterprise JavaBeans (EJBs) EJB Java archive .jar

Web service Web archive or .war / .jar


n s e
EJB JAR
lice
Resource adapter Resource archive .rar
r a ble
n sfe
Optional package Java archive .jar a - tr
no n
Enterprise application Enterprise archive .ear
s eฺ a
) h a id
x
ฺm nt G u
m
A collection of web applications, EJBs, and resource adapters

ฺ co ude
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013, e tOracle
ฺc to u
Copyright

n e
A webu z (re can contain static files (such as images and HTML pages) as well as
Cr
application

e n e
JavaServer Pages (JSPs), Servlets, and other Java code.
R EJBs are the Java Enterprise Edition component architecture. They are often used as
containers of custom business logic for middleware.
Web services are part of service-oriented architecture (SOA) and are deployed either as a
web application or as an EJB JAR file, depending upon how the web service was
implemented.
Resource adapters implement the Java EE Connector Architecture to allow Java EE
components to access Enterprise Information Systems. Examples of Enterprise Information
Systems include enterprise resource planning systems or mainframe transaction processing
systems.
An optional package is the Java Enterprise Edition unit for sharing code. It allows you to share
the code in a Java Archive (JAR) file. An optional package can be referenced from any Java
Enterprise Edition module.
An enterprise application is a collection of web applications, EJBs, and resource adapters. It
makes deployment easier by allowing you to deploy one element that contains many separate
entities.

Oracle WebLogic Server 12c: Administration I 10 - 5


WebLogic Server Deployments

• WebLogic-specific deployment units:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Enterprise applications, web applications, or Java archives


as shared libraries
– JMS and JDBC modules

WLS Deployment Archive Name File Extension


Shared library Enterprise .ear /.war / .jar
n s e
application, web
lice
application, or Java
r a ble
archive
n sfe
.xml
- a
tr
n
JMS module/JDBC module XML file

a no
h a s application.
eฺ
)
These can be included in an enterprise
x u i d
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
Oracle WebLogic Server has some deployment units of its own. WebLogic Server has a
C
ne
deployable unit, very similar to a Java optional package, called a shared library. A shared
R e library is a web application, an enterprise application, or a JAR file that is deployed so that
web applications and enterprise applications can share its code.
You can deploy JMS and JDBC modules to define JMS and JDBC resources. These modules
can also be packaged within an enterprise application.
There is another type of WebLogic-specific module not listed here, the WLDF module. These
modules contain WebLogic Diagnostic Framework components, such as data harvesters.

Oracle WebLogic Server 12c: Administration I 10 - 6


Other Deployments
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Product Deployment Archive Archive File


Name Extension
Oracle Application ADF application Enterprise .ear
Development application
Framework (ADF)
Oracle SOA Suite SOA Suite composite Single Single: .jar or
application (SAR composite .sar
n s e
stands for SOA application or Multiple: .zip
lice
archive) multiple
r a ble
composite
n sfe
applications
a - tr
Oracle WebCenter WebCenter application Enterprise
no n .ear
a
as ideฺ .gar
application
Coherence artifacts ) hGrid archive
Oracle Coherence
ฺ m x G u
om uden t
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re Development Framework (ADF) is an end-to-end Java EE framework built
OracleuApplication
onC
r
e
en can be deployed by using the development environment, JDeveloper, or can be placed in an
JavaServer Faces (JSF). JSF is a user interface framework for Java EE. ADF applications
R enterprise application archive (EAR) and deployed with WLST or the admin console.
Oracle SOA Suite composite applications can also be “deployed” by using JDeveloper, or can
be placed in a JAR file or a SAR file (for a single composite application) or a ZIP file (for
multiple composite applications) and deployed by using WLST. A SAR (SOA archive) file is a
special JAR file that requires the prefix of sca_. Note that SOA composite applications are
not Java EE applications, but rather instructions “registered” with the SOA Suite infrastructure.
Therefore, “deploying” a SOA composite application does not change the domain
configuration, nor is the administration server involved. Oracle Service Bus (OSB) resources,
such as a proxy service, are similar, in that they do not modify the domain’s configuration.
(However, unlike SOA composite application deployment, OSB resource changes are
accomplished through the administration server.)
Oracle WebCenter applications are deployed as enterprise application archives (EARs), but
the EAR must be specially prepared, and the target environment must contain WebCenter
Shared Libraries. Also the Metadata Services (MDS) repository must be created and
registered. MDS is a repository for Fusion Middleware Component metadata.

Oracle WebLogic Server 12c: Administration I 10 - 7


Coherence is integrated within WebLogic Server as a container subsystem. Like other Java EE
containers, the Coherence container supports its own application module, which is called a Grid
Archive (GAR). The GAR contains the artifacts of a Coherence application and includes a
deployment descriptor. Coherence is typically set up in tiers. A proxy server tier should be set
up by using Coherence*Extend. An HTTP session tier should be set up by using
Coherence*Web. WebLogic managed servers that are associated with a Coherence cluster are
referred to as managed Coherence servers. Managed Coherence servers in each tier can be
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

individually managed, but are typically associated with respective WebLogic Server clusters. A
GAR must be deployed to each data and proxy tier server. The same GAR is then packaged
within an EAR and deployed to each application server and client tier server.

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 8


Deployment Terms

• Deploy:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Developers provide application files, usually as an archive, to


an administrator, who moves the file to a desired location.
2. An administrator adds the application to the domain
configuration and target servers (or clusters). The
deployment is distributed to those servers.
3. An administrator starts the application (so the application n s e
lice
ble
starts servicing requests).
• Undeploy:
fer a
n s
1. An administrator stops the application (making
n - trait unavailable
to clients).
a no
h a s eฺfrom the
id
2. An administrator removes the application
x ) u
configuration.
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (re
r u
Deploying an application:
C
e ne 1. Developers package tested application files, usually in an archive. They provide the
R application to an administrator in charge of deployment. The administrator moves the file
to a location from which it can be accessed by the deployment tool.
2. The deployment administrator uses a tool that adds the deployment to the domain
configuration. Part of deploying is choosing deployment targets, either servers or
clusters. As part of this process, the deployment is distributed to the targeted servers.
3. An administrator (the one that deployed the application, or another) starts the
application. Normally the application starts servicing all requests (requests from clients).
It is also possible, if the domain has an administration port, to start the application so
that it only services administration requests (also called starting the application in
administration mode). This allows administrators to test the application before it is made
available to clients.

Oracle WebLogic Server 12c: Administration I 10 - 9


Undeploying an application:
1. An administrator uses a tool to stop the application (making it no longer accessible to
clients).
2. An administrator uses a tool to remove the deployment from the configuration. Note that
this does not mean that the deployment files (or the archive file) are deleted.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 10


Deployment Terms

• Redeploy:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Developers provide a new version of the application.


2. An administrator copies over the deployment files (or archive
file) of the deployed application with the new version.
3. An administrator deploys the new version of the application.
Note that with redeployment there is no explicit “start the
s e

application” step, because the application is automatically


ce n
li
ble
started.
WebLogic Server has a strategy called “Production r a
fe to be
s

n
-tra
Redeployment” that allows both versions of the application
active simultaneously.
n o n
• Distribute: Similar to deploy, but thea application is not
h a s toeits ฺ targets, ready
started. The application is pushed
x ) out
u i d
ฺ m t G
om uden
to be started later.
ฺ c
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (rean Application:
ru
Redeploying
C
ene
1. Developers create and test a new version of the application. Once tested, they provide it
R to an administrator in charge of deployment.
2. The administrator copies over the deployment files (or archive file) with the new version
of the application.
3. The administrator uses a tool to redeploy the application, so that the new version is now
the version used.
- Note that with redeployment, the application does not have to be explicitly started,
it starts servicing requests automatically.
- WebLogic Server has a redeployment strategy called “production redeployment.”
Using this strategy, an application has an explicit version number. When a
versioned application is redeployed, the old version of the application remains
active, if any clients are using it. The new version of the application is also active
and is used by all new clients. Eventually, as existing clients finish using the old
version, it is retired and all clients are using the new version.
Distributing an application prepares it for deployment by copying its deployment files to all
target servers and validating it. This is the same as deploying without starting the application.

Oracle WebLogic Server 12c: Administration I 10 - 11


Deployment Descriptors

• Deployment descriptor: An XML file packaged within a


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

deployment that sets properties of the application


– Each Java EE deployment has both a standard and a
WebLogic-specific deployment descriptor.
– Since Java EE 5, deployment descriptors can be replaced
with annotations in the application code.
web.xml weblogic.xml
n s e
lice
... ...
<web-app ... > <weblogic-web-app ...>
<session-descriptor>rab
le
<servlet>
<cookie-path> nsf
e
benefits -tra
<servlet-name>

on
BenefitsServlet
</servlet-name> Developers are responsible for
a ฺn
</cookie-path>
a s
creating the deployment descriptors

ide
) h<context-root>
<servlet-class> (or code annotations)</session-descriptor>
x u
as part of

mฺm ... nt G
stcurr.BenefitsServlet
application development.
...
ฺ co ude
o
er is St
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
Each Java EE deployment unit has a standard and a WebLogic-specific deployment
C
ne
descriptor:
R e • Web application: web.xml and weblogic.xml
• Web service: webservices.xml and weblogic-webservices.xml
• Enterprise JavaBean: ejb-jar.xml and weblogic-ejb-jar.xml
• Resource adapter: ra.xml and weblogic-ra.xml
• Enterprise application: application.xml and weblogic-application.xml

Oracle WebLogic Server 12c: Administration I 10 - 12


Deployment Plans

• A WebLogic Server deployment plan is an XML document


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

that can override an application’s configuration


(deployment descriptors). A deployment plan is:
– Optional
– Used to update deployment descriptor values

e
– Useful when moving an application from one environment to
n s
ce
another (such as from development to test or test to
li
ble
production)
– A separate file, outside of the deployment archive fera
a n s
plan.xml
n-tr
o
<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan ... >
s an ฺ
) ha ide
<application-name>timeoff.war</application-name>
ฺ m x G u
<variable-definition>
<variable> ... om en t
ro ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
For more information about deployment plans, see the section “Understanding WebLogic
C
ne
Server Deployment Plans” in the Administering Server Environments for Oracle WebLogic
R e Server document.
Deployment plans are covered in the Oracle WebLogic Server 12c: Administration II course.

Oracle WebLogic Server 12c: Administration I 10 - 13


Exploded Versus Archived Applications

• An application can be deployed as a set of directories and


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

files. This is called an “exploded directory” application.


• An application file and directory structure can be placed
within the appropriate archive file, and that single file can
be deployed.
• Exploded directory applications are most often used during
n s e
development, and archived applications during test and
lice
production. ble a
sfer
afilen
– There is nothing that prevents exploded application
- tr
non
deployments in test and production or archive
deployments during development, however.
s a ฺ
) h uidea
x
ฺm nt G
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 14


Autodeploy

• A development mode domain can automatically deploy


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

applications:
1. Place the application’s exploded directories and files or
archive file in the domain’s autodeploy directory.
2. The administration server watches that directory. When it
detects a new application, it automatically:
n s e
ce
A. Adds the application to the configuration
l i
B. Targets the application to itself, the admin server
le
C. rab
Starts the application (the application starts servicing requests)
fe
n s
• Autodeploy is a convenient feature for developers,
n - tra which
allows them to quickly deploy and test an
a no application.
h a s mode eฺ domain.
• Autodeploy is disabled in a production
x ) u i d
ฺ m t G
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re
C r u
Note that autodeployment works to redeploy an application, too. When you copy over an

e n e
application archive file in the autodeploy directory, the administration server notices the
R new timestamp and automatically redeploys the application. To achieve the same automatic
redeployment of an exploded directory application, create a file called REDEPLOY and place it
in the WEB-INF or META-INF directory of the application. When that file’s timestamp
changes, the administration server knows to redeploy the application.

Oracle WebLogic Server 12c: Administration I 10 - 15


Server Staging Mode

The Staging Mode of a server determines how the server


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

accesses deployed applications:


• stage: During the deployment process the application is
pushed out to the remote server’s Staging Directory.
• nostage: The server accesses the application from an
accessible location (often shared storage). You must
n s e
lice
ensure the application is placed in this location. The
location is specified during deployment.
r a ble
• external_stage: Similar to stage, except thesfe
- tr an
application must be copied into the Staging
n o n Directory
s a ฺ(manually or by
before beginning the deployment process
)h a ide
some other tool).
ฺ m x G u
om uden t
c
The Staging Mode’s default is stage.

sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Staging Mode of a server is found in the admin console under the server’s Configuration
C
ne
> Deployment tab.
R e The default Staging Directory is the stage directory under the server’s directory under the
domain. This can be modified, if desired.
When deploying an application, the Staging Mode of the target servers can be overridden.

Oracle WebLogic Server 12c: Administration I 10 - 16


WebLogic Server Deployment Tools

The following tools can be used to deploy applications:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Administration console
• WLST
– Can be used interactively or to run a script
– Example:
deploy('app', '/apps/app.ear', targets='cluster1')
n s e
lice
ble
• The weblogic.Deployer class
fer a
s
– For command-line deployment
a n tr
– Example:
n -
java weblogic.Deployer
a no
-adminurl http://host01.example.com:7001
h a s eฺ
x ) Welcome1 u id
ฺm nt G-targets cluster1
-username weblogic -password
o
-deploy -source /apps/app.ear
c m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (reusing the administration console is shown later in this lesson.
C ru
Deploying by

ene
The WebLogic Scripting Tool (WLST) has many commands related to the deployment of
R applications:
• deploy(): Deploys an application, targets it, distributes it, and starts it
• redeploy(): Redeploys a previously deployed application
• distributeApplication(): Distributes the application to the targets, but does not
start it
• startApplication(): Starts an application, so it can service requests
• stopApplication(): Stops an application from servicing requests
• And more
To use the weblogic.Deployer class, ensure that the Java Virtual Machine executable is
in the PATH and the WebLogic Server classes have been added to CLASSPATH. The latter
can be accomplished by running the setWLSEnv.sh script found in the
<WL_HOME>/server/bin directory. For more information about the weblogic.Deployer
class, see the chapter titled “Deploying Applications and Modules with weblogic.Deployer” in
the Deploying Applications to Oracle WebLogic Server document.

Oracle WebLogic Server 12c: Administration I 10 - 17


WebLogic Server Deployment Tools

The following tools can be used to deploy applications:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Ant
– It is an Apache open-source, Java-based “make utility”
– Ant and WebLogic-specific Ant tasks come with the
WebLogic Server installation.

e
The wldeploy task is the Ant version of the
s

weblogic.Deployer utility.
ce n
li
• Maven
r a ble
– It is an Apache open-source tool for managing Java
n sfeprojects.
– A plug-in is available with the WebLogic Server
n - trainstallation.
• Enterprise Manager Cloud Control a n
o
h a s eฺ
– Cloud Control can deploy, undeploy, x ) u id redeploy
and
applications to WebLogic
o m ฺm
e
Server. n tG
r o ฺc tud
se is S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (risean open-source Java library designed to build projects. WebLogic Server
C ruwith an Ant installation, and provides custom Ant tasks. To use Ant, ensure that the
Apache Ant

eneAnt executable (or batch file) is in the PATH and the WebLogic Server classes have been
comes
R added to the CLASSPATH. The Ant executable (for Linux) or batch file (for Windows) can be
found here: <WL_HOME>/oracle_common/modules/org.apache.ant_1.7.1/bin.
(Note that the exact directory name may change with other releases of WebLogic Server.)
Setting the CLASSPATH can be accomplished by running the setWLSEnv.sh script found in
the <WL_HOME>/server/bin directory.
Apache Maven is an open-source software management tool. WebLogic Server comes with
two Maven plug-ins. One of them came out with WebLogic Server 11g and is essentially the
Maven version of the weblogic.Deployer class. The second plug-in is new with WebLogic
Server 12c and provides enhanced functionality to not only deploy applications, but also start
and stop servers, create domains, run WLST scripts, and more. For how to configure and use
either Maven plug-in for deployment, see the appendix titled “Using the WebLogic Maven
Plug-In for Deployment” in the Deploying Applications to Oracle WebLogic Server document.
Enterprise Manager Cloud Control is part of Oracle Enterprise Manager, Oracle’s integrated
enterprise cloud management product line. Cloud Control enables you to monitor and
manage the complete Oracle IT infrastructure from a single console.

Oracle WebLogic Server 12c: Administration I 10 - 18


Starting and Stopping an Application

• Newly deployed applications must be started. There are


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

two possible “start levels:”


– Start servicing all requests: This gives regular users access
to the application
– Start servicing only administration requests: The application
is available only to administrators through the domain
administration port
n s e
ce
A special port set up for inter-server communication

li
• Applications must be stopped before they are undeployed.
a ble
– When work completes: Allows current users of the fe r
a n s
application to complete their work and disconnect
n -t r
n o
a
– Force stop now: Stops the application immediately, whether
or not it is being used
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
When u z re an application, you have two options:
(start
r you
e •C Servicing all requests: WebLogic Server makes the application immediately available
R en to all clients.
• Servicing only administration requests: WebLogic Server makes the application
available in administration mode only. This means that administrators have access to
the application through the target servers’ administration port. The administration port is
a domain option. (In the admin console, select the domain and then click the
Configuration > General tab. Select the Enable Administration Port check box. Then
enter the Administration Port number.) The administration port uses SSL, so enabling it
requires that SSL is configured for all servers in the domain. After the administration port
is configured, all communication between the administration server and managed
servers is through this secure port. Also, the administration console can be reached only
through this secure port. For more information about the administration port, see the
“Configuring Network Resources” chapter in the Administering Server Environments for
Oracle WebLogic Server document.

Oracle WebLogic Server 12c: Administration I 10 - 19


When you stop an application, there are three options:
• When work completes: WebLogic Server waits for the application to finish its work and
for all currently connected users to disconnect. It also waits for all HTTP sessions to time
out.
• Force stop now: WebLogic Server stops the application immediately, regardless of the
work that is being performed and the users that are connected.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Stop, but continue servicing administration requests: WebLogic Server stops the
application after all its work has finished, but then puts the application in administration
mode. Note that the application has not actually stopped, but has been placed in
administration mode. That means that the application cannot be undeployed at this time.

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 20


Deploying an Application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4
n s e
lice
r a ble
2
n sfe
- tra
no n
s eฺ a
) h a id 5
3 x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
z (the configuration.
1.
C r u
Lock

e ne 2. In the Domain Structure, select Deployments.


R 3. Above the Deployments table, click the Install button.
4. Enter the path and name of the deployment in the Path field, or use the links to navigate
to the location of the deployment.
5. If using the links to navigate to the deployment, after you have found a deployable unit,
an option button appears next to it. Select the deployment.

Oracle WebLogic Server 12c: Administration I 10 - 21


Deploying an Application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
7 r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
6. After the deployment is selected, click Next.
C
e ne 7. Select Install this deployment as an application and click Next. (The other option is
R to install the application as a library.)
8. Select the targets and click Next.

Oracle WebLogic Server 12c: Administration I 10 - 22


Deploying an Application

Security roles (who) and policies


(what they can do) for the 9
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

application are determined by the


deployment descriptors.

Security roles are created by using


the admin console. Security policies

e
are defined in the deployment

n s
ce
descriptors.

li
r a ble
n sfe
a tr
Security roles and policies are
created by using the admin console.
n -
a no
h a s eฺ
x ) u id
ฺm nt G
This option is provided for backward
compatibility with WebLogic Server
co m d e
versions before 9.0.
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z (re of the wizard contains optional configuration items. If the defaults are
u
Cracceptable,
9. This page

ne
click Next. Otherwise, enter or select the following, and then click Next:
R e - Name: The name of the deployment as it is displayed in the admin console
- Security model (There is more information on security roles and polices in the
lesson titled “WebLogic Server Security.”):
• DD Only: Security roles (who) and policies (what they are allowed to do)
come from the application deployment descriptors. This is the default and
usually the option you want.
• Custom Roles: Security roles are created by using the admin console, but
policies come from the deployment descriptors.
• Custom Roles and Policies: Ignore the deployment descriptors. Roles and
policies are created by using the admin console.
• Advanced: It is provided for backward compatibility with earlier versions of
WebLogic Server (prior to 9.0).

Oracle WebLogic Server 12c: Administration I 10 - 23


• Source accessibility:
- Use the defaults defined by the deployment’s targets: This is the default and
the recommended option.
- Copy this application onto every target for me: This ignores the Staging Mode
defined by the targets and does a copy to each target’s Staging Directory. This is
the same as each server’s Staging Mode being set to stage.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

- I will make the deployment accessible from the following location: This option
indicates that the deployment will be placed in a central location that is accessible
to all targets. You must ensure the deployment is copied to that location. This is for
the nostage Staging Mode. If this option is selected, the Location (that all targets
can reach) must be entered.
• Plan source accessibility (for the deployment plan, which is optional):
- Use the same accessibility as the application.
n s e
- Copy this plan onto every target for me.
lice
- Do not copy this plan to targets.
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 24


Deploying an Application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

10

11

n s e
lice
r a ble
n sfe
12
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
10. Choose whether to view the deployment configuration screen next or not, review the
C
ne
deployment, and click Finish.
R e 11. In the Change Center, click Activate Changes.
12. To start the application, select the new deployment in the Deployments table. Click the
Start button, and select Servicing all requests. When asked to confirm the application
start, click Yes. The State of the application is changed to “Active.”

Oracle WebLogic Server 12c: Administration I 10 - 25


Undeploying an Application

Note: A running application


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

cannot be undeployed.
1

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
3
) h a id
x
ฺm nt G u 4
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
1. In the Domain Structure, select Deployments.
C
e ne 2. Select the deployment. Click the Stop button and select either When work completes
R or Force Stop Now. A running application cannot be undeployed. Stopping an
application when work completes can take quite a while. For example, with a web
application, it will be at least as long as the session timeout.
3. When asked if you are sure, click Yes.
4. Lock the configuration.

Oracle WebLogic Server 12c: Administration I 10 - 26


Undeploying an Application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

n s e
lice
6
r a ble
n sfe
a - tr
no n
s eฺ a
Note that although the deployment is
) h a id
x u
no longer in the configuration, the 7
deployment files (or the archive file)
m ฺm nt G
have not been deleted.
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z (rethe application is stopped and the configuration is locked, select the
u
Crapplication
5. Now that

ne 6.
in the Deployments table again. Then click the Delete button.
R e When asked if you are sure, click Yes.
7. In the Change Center, click Activate Changes.

Oracle WebLogic Server 12c: Administration I 10 - 27


Redeploying an Application

1 $> cp /uploaded/timeoff.war /apps/timeoff.war


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

3
2
n s e
lice
r a ble
n sfe
- tra
4 no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
re
z (over the current application with the new version.
1.
C r u
Copy

e ne 2. Lock the configuration.


R 3. In the Domain Structure, select Deployments.
4. Select the deployment. Click the Update button.

Oracle WebLogic Server 12c: Administration I 10 - 28


Redeploying an Application

It is an error when
5
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

redeploying to
move the
deployment files,
so do not use this.

You can move (or


n s e
ce
add) a deployment
li
ble
plan, however.

fe r a
The applicationsdoes
n
trastarted.
n -
not need to be

no
manually

s eฺ a
)7 h a id
6 x
ฺm nt G u
c o m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz Finish. (The Next button takes you to a review screen with essentially the same
5. Click
C information.)
e ne 6.
R In the Change Center, click Activate Changes.
7. The application should automatically be active. (You do not need to explicitly start it.)
Note: Redeploying an application like this could interrupt current users of the application. This
in-place redeployment should be used for applications that are first taken offline. To redeploy
a new version of an application, while leaving the old version available to current users,
consider using Production Redeployment. For more information about Production
Redeployment, see the chapter titled “Redeploying Applications in a Production Environment”
in the Deploying Applications to WebLogic Server document.

Oracle WebLogic Server 12c: Administration I 10 - 29


Monitoring Deployed Applications:
Admin Console
The administration console allows you to monitor applications:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Select the name of the deployed application in the


Deployments table.
2. Select the Monitoring tab.
3. Select the subtab of interest.

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The subtabs under Monitoring (for a web application) are:
C
e ne • Web Applications: Information about web applications including the context root of the
R application, the server on which it is running, the application state, the number of
Servlets, the number of active HTTP sessions, and so on
• Servlets: A list of the Servlets and the number of times each has been invoked,
reloaded, and so on
• Sessions: Information about the HTTP sessions
• PageFlows: Information about page flows (A page flow is part of the retired Apache
Beehive web application framework that acted as a front-end to the Apache Struts
framework.)
• Workload: Information about work managers, threads, and so on
• Web Service Clients: Information about clients of web services that are part of this web
application
• JAX-RS Applications: Information about the JAX-RS applications that are part of this
application. JAX-RS is the Java API for RESTful web services. REST is
Representational State Transfer, a software architecture that allows client/server calls
based on URLs.

Oracle WebLogic Server 12c: Administration I 10 - 30


Monitoring Information Available
from the Admin Console
Application Monitoring Information Available
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Type
Web Targeted servers, context root, number of Servlets, the number of
application times each Servlet has been invoked, average execution time of each
Servlet, the number of active HTTP sessions, creation time of each
session, work manager and thread information, and more

e
EJB Targeted servers, total number of EJBs that have been activated,
n s
ce
current number of beans in use from the pool, total number of times a
li
ble
bean has been accessed from the cache, current number of beans in

a
the cache, for a message-driven bean if it is connected to its
fer
s
destination, and more
a n
tr
Web service
n -
Web service name, number of servers where the service is active,
no
number of service errors, total number of times the service has been
a
a s eฺ
invoked, average service response time, and more
h
Web application, web service,xand ) EJB monitoring
u id
Enterprise

m de tm
above, as well as JDBC and JMSnmodule G as described

o
application monitoring

r c
oฺ Stu
e
s this
u z @ e Oracle and/or its affiliates. All rights reserved.
cr u s
eฺ
Copyright © 2013,

r e n to
( console online Help for a full list of available information.
zadmin
r
See the
C u
e n e
R

Oracle WebLogic Server 12c: Administration I 10 - 31


Monitoring Deployed Applications:
Monitoring Dashboard
1. In the View List, expand the 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

server and select the built-in


view called Application Work
Managers on servername.
2. Click the start button.
3. Find the charts for the
n s e
ce
1
application of interest.
li
r a ble
n sfe
- tra
no n
3
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The two charts for each application in this built-in view are the completed requests by the
C
ne
application’s work manager, and the pending requests/stuck thread count for the application’s
R e work manager. In this example, the work manager is the default work manager.
What is a work manager? WebLogic Server uses a self-tuning thread pool. WebLogic Server
does prioritize work and allocate threads based on an execution model that takes into account
administrator-defined parameters, however. Administrators can configure a set of thread-
scheduling guidelines by defining work managers. Work managers are optional, and if not
created, the default work manager is used, as in the examples in the slide. Work managers
are covered in the Oracle WebLogic Server 12c: Administration II course.

Oracle WebLogic Server 12c: Administration I 10 - 32


Application Errors

• WebLogic Server errors generally show up in the server


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

log as messages from some troubled subsystem.


• Application errors often show in the server log as a Java
Exception followed by a stack trace.
– A stack trace shows all the methods that were interrupted
when the error occurred.
n s e
lice
– Stack traces are used by developers to track down their
faulty code. le a b
r
Exception
####<...> <Error> <HTTP>…Servlet failed with sf e
- tr an
on 3
an Exception
java.lang.ArrayIndexOutOfBoundsException:
a ฺ n
a s
) h uide
at stcurr.BadClass.causeError(BadClass.java:9)
x
at jsp_servlet._vision._jspService(_vision.java:7)
... Package
o m ฺm nSource
e t G file
c d
Class Method Line number

e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
z ( trace shows all the methods that were executing when an uncaught exception or
A Javaustack
r
C occurred. The stack trace is listed from the last method that was running to the first.
eerror
n Developers look through the trace looking for code they wrote that caused the problem. The
Re error and stack trace are written to the server’s log file, as well as system out.
Here is the code that caused the error above (see line 9):
01 package stcurr;
02
03 public class BadClass {
04
05 public void causeError() {
06 int[] intArray = {1,2,3};
07 // this loop goes beyond the last array element
08 for (int i=0; i <= intArray.length; i++) {
09 System.out.println(intArray[i]);
...

Oracle WebLogic Server 12c: Administration I 10 - 33


Application Testing

• The administration console displays test URLs based on


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the application configuration. Select the deployment from


the Deployments table, and then click the Testing tab.
– If a link works:
— The application is deployed and started
Remember, however, that this is a minimal test, and it is
e

possible that there are still issues with the application


n s
lice
ble
– If a link does not work:
— It could indicate a
fer a
deployment problem
a n s
It is also possible that
n - tr
no

a
the application is OK
and accessed through
h a s eฺ
some other URL x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 34


Performance Testing Methodology

1. Define the expected workload.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2. Define performance objectives.


3. Select the subsystems to study.
4. Create and perform a test to create an initial benchmark
(baseline performance data).
5. Modify one system attribute.
n s e
lice
ble
6. Perform the test again.
fer a
7. Analyze the results.
n s
8. Repeat steps 5–7. -tra on
a ฺ n
a s
x ) h uide
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
eฺc to u
Copyright

( r en
r uz performance depends on good design, good implementation, defined
Good system
e C
n
performance objectives, and performance tuning. Performance tuning is an ongoing process.
R e Use tools that provide performance metrics that you can compare against performance
objectives. The goal is to meet the performance objectives, not to eliminate all bottlenecks.
Resources within a system are finite; therefore, some resource (CPU, memory, or I/O) will be
a bottleneck in the system. Tuning allows you to minimize the impact of bottlenecks on your
performance objectives.
When testing, ensure that benchmarks are realistic; otherwise, there will be unexpected
results when the application goes into production. If an application accesses a database,
ensure that it accesses the database during the load or stress test.

Oracle WebLogic Server 12c: Administration I 10 - 35


Load and Stress Testing

• Load testing measures performance for a system at


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

different levels of concurrent request loads.


• Stress testing measures a system’s limits. For example:
– Extremely high number of concurrent users
– Extremely high data volume
• Performance testing a WebLogic Server application
n s e
requires:
lice
– Measurable performance goals, often stated as Service
r a ble
Level Agreements (SLAs)
n s fe
n - tra for the
noshould be within 5
—Example SLA: “The 90th percentile response time
application under two times a normal load
s eฺ a
seconds.”
) h a id data needed
– Load testing tools that can x
ฺm nt G
generate uthe
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z re verifies that an application demonstrates the correct behavior under certain
(testing
ruwhereas load testing determines whether an application can support a specified load
Functional
C
ene(for example, 500 concurrent users) with specified response times. Load testing is used to
inputs,
R create benchmarks.
Stress testing is load testing over an extended period of time. Stress testing determines
whether an application can meet specified goals for stability and reliability, under a specified
load, for a specified time period.
It is often possible to begin a stress-testing plan by taking the existing use cases for the
application to be tested. Because use cases provide a description of how the application will
typically be used when in production, they can often be translated directly into test scripts that
can be run against the application.

Oracle WebLogic Server 12c: Administration I 10 - 36


Load Testing Tools

Many commercial and open-source load testing tools are


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

available, including:
• The Grinder
• JMeter
• HP LoadRunner
• RadView WebLOAD
n s e
• Oracle Load Testing (part of Oracle Application Testing e lice
r a bl
Suite) e sf
tr a n
n -
a no
h a s eฺ
x ) u id
m ฺm nt G
ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
JMeter is an Apache Jakarta project that can be used as a load-testing tool for analyzing and
C
ne
measuring the performance of a variety of services, with a focus on web applications. JMeter
R e can be used as a unit test tool for JDBC database connections, web services, JMS, and
HTTP. JMeter also supports assertions to ensure that the data received is correct.
LoadRunner is a performance and load testing product by Hewlett-Packard for examining
system behavior and performance, while generating actual load. Working in LoadRunner
involves using three different tools: Virtual User Generator (VuGen), Controller, and Analysis.
RadView WebLOAD is a software for performance testing Internet applications. It consists of
three main parts: WebLOAD IDE (the authoring environment), WebLOAD Console (the
execution environment), and WebLOAD Analytics (the analysis tool).
Oracle Load Testing is part of Oracle Application Testing Suite. It can load test web
applications and web services by simulating thousands of virtual users accessing the
application simultaneously. It is deployed to WebLogic Server and comes with a web-based
interface that allows you to configure load tests, run tests, and view the results.

Oracle WebLogic Server 12c: Administration I 10 - 37


The Grinder

• The Grinder:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Is an open source load-testing tool based on Java and


Python
– Supports a distributed, agent-based load simulation model
– Provides a graphical console to manage agents and view
results
n s e
lice
– Supports HTTP/S (links, forms, cookies, and so on) but can
be extended to support additional protocols le a b
fer
ans
• A Grinder agent:
n-
– Uses a specific number of processes and workertr threads
o
a n thread
– Executes a supplied test script with each
s eฺ
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
eฺc to u
Copyright

( r en
r uz is a Java load testing framework that makes it easy to run a distributed test using
The Grinder
C “load injector” machines. It is freely available under a BSD-style open-source license,
emany
n and is based on other open source technologies such as Jython, HTTPClient, and
Re XMLBeans.
Each test context runs in its own “worker” thread. The threads can be split over many
processes depending on the requirements of the test and the capabilities of the load injector
machine. The Grinder makes it easy to coordinate and monitor the activity of processes
across a network of many load injector machines from a central console.
Scripts can be created by recording actions of a real user by using the TCPProxy utility. The
script can then be customized by hand. Input data (for example, URL parameters or form
fields) can be dynamically generated. The source of the data can be flat files, random
generation, a database, or previously captured output.
The Grinder has special support for HTTP that automatically handles cookie and connection
management for test contexts.

Oracle WebLogic Server 12c: Administration I 10 - 38


The Grinder Architecture

CPU
1 Start test
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Agent

Test
Worker
Report results Script
Thread
Worker
Thread 2
CPU 3 Thread
Grinder System
n s e
ce
HTTP
i
under
l
Console
ble
CPU test
Agent
fer a
a n s
tr
1 Start test
n -
no
Test
Worker
a
Workerhas
Script
Thread
) i d eฺ
x u
Thread
Report results 3
ฺ m
Thread
t G 2
ฺ com uden
sero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Grinder is a framework for running test scripts across a number of machines. The
C
ne
framework has three types of processes (or programs): worker processes, agent processes,
R e and the console. Worker processes interpret Jython test scripts and perform tests using a
number of worker threads. Agent processes manage worker processes. The console
coordinates the other processes, and collates and displays results. Because The Grinder is
written in Java, each of these processes run in a JVM.
For heavy duty testing, you start an agent process on each of several “load injector”
machines. The worker processes that they launch can be controlled and monitored using the
console. There is no reason to run more than one agent on each load injector, but you can.
Each worker process sets up a network connection to the console to report statistics. Each
agent process sets up a connection to the console to receive commands, which it passes on
to its worker processes. The console listens for both types of connections on a particular
address and port.
A test is a unit of work against which statistics are recorded. Tests are uniquely defined by a
test number and also have a description. Users specify which tests to run by using a Jython
test script. The script is executed many times in a typical testing scenario. Each worker
process has a number of worker threads, and each worker thread calls the script a number of
times. A single execution of a test script is called a “run.”

Oracle WebLogic Server 12c: Administration I 10 - 39


The Grinder Proxy

• The Grinder tests are Python scripts, which can be:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Coded manually
– Recorded using the TCPProxy
• To use TCPProxy:
– Configure your web browser to proxy requests through the
TCPProxy and then use your web application
n s e
– TCPProxy creates a script that includes all GET and POST
lice
requests, cookies, and user “think times” ble ra
fe
- trans
no n
a
TCPProxy

h a s eฺ
x ) u id
m ฺm nt G
Generates
ฺ co u d e
o t
a script

ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The TCPProxy is a proxy process that you can place in a TCP stream, such as the HTTP
C
ne
connection between your web browser and a server. It filters the request and response
R e streams, sending the results to the terminal window (stdout). You can control its behavior by
specifying different filters. The TCPProxy’s main purpose is to automatically generate HTTP
test scripts that can be replayed with The Grinder’s HTTP plug-in.
The TCPProxy appears to your web browser just like any other HTTP proxy server, and you
can use your web browser as you normally would. If you open a web page with your web
browser, it displays the page, and the TCPProxy outputs all the HTTP interactions between
the web browser and the website. It is important to remember to remove any “bypass proxy
server” or “No proxy for” settings that you might have, so that all the traffic flows through the
TCPProxy and can be captured.
Having finished your web application run-through, click Stop on the TCPProxy console and
the generated script is written to the grinder.py file. The grinder.py file contains
headers, and requests. It groups the requests logically into “pages,” for the recorded test
script. The script can also be edited manually to suit your needs.

Oracle WebLogic Server 12c: Administration I 10 - 40


Agent Properties

• Agents are configured by using the


grinder.properties file, which has settings for:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– The location of The Grinder console


– The test script to run
– The number of worker processes to start
– The number of threads to start in each worker process
n s e
lice
– The number of times that each thread should run the test

ble
– Think time adjustments (speed up or slow down)
fer a
– Output and logging levels
anagent is s
If The Grinder console is not available when-tanr
on

n
a ฺ
started, it starts running tests immediately.
a s

x ) h uidtoe agents by using
Test script files can also be distributed
the console. mฺm nt G
co ude
o ฺ
ser is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z( re
r u
The Grinder worker and agent processes are controlled by setting properties in the
C
ne
grinder.properties file. All properties have default values. If you start a Grinder agent
R e process without a grinder.properties file, the agent communicates with the console by
using default addresses and uses one worker process, one thread, and makes one run
through the test script found in the grinder.py file. The available properties include:
• grinder.processes: The number of worker processes that the agent should start
• grinder.threads: The number of worker threads that each worker process spawns
• grinder.runs: The number of runs of the test script that each thread performs. A
value of 0 means “run forever.” Use this value when you are using the console to control
your test runs.
• grinder.processIncrement: If set, the agent ramps up the number of worker
processes, starting the number specified every
grinder.processesIncrementInterval milliseconds. The upper limit is set by
grinder.processes.
• grinder.duration: The maximum length of time, in milliseconds, that each worker
process should run. The grinder.duration attribute can be specified in conjunction
with grinder.runs, in which case the worker processes are terminated if either the
duration time or the number of runs is exceeded.

Oracle WebLogic Server 12c: Administration I 10 - 41


The Grinder Console

Manage agents
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Distribute
test scripts

n s e
lice
r a ble
n sfe
a - tr
n
noResults for
a
s individual ฺ requests
h a d e
Overall results
ฺ m x) Gui
m dent
for the entire test
c o
e roฺ Stu
@ s this
r u z s e Oracle and/or its affiliates. All rights reserved.
eฺ c u
Copyright © 2013,

r e n to
r uz(
The “Start processes,” “Reset processes,” and “Stop processes” menu items send signals to
C
ne
The Grinder processes that are listening. These controls are disabled if no agents are
R e connected to the console. On the Processes tab, you can check whether any agents are
connected.
The “Start processes” control signals to worker processes that they should move into the
running state. Processes that are already running ignore this signal. Processes that are in the
finished state exit. The agent process then rereads the properties file, and launches new
worker processes in the running state. The “Reset processes” control signals all the worker
processes to exit. The agent process then rereads the properties file and launches new
worker processes.
The “sample controls” determine how the console captures reports from the worker
processes. It is important to understand that these control only the console behavior. They do
not adjust the frequency at which the worker processes send reports. The slider controls how
the console takes a sample. This involves adding up all the reports received over that sample
interval and calculating the Tests per Second (TPS (the number of tests that occurred) /
(interval length)). It is also the period at which the console statistics are updated.
Each time the worker processes run, they generate a new set of logs. Logs from previous
runs are renamed. The number of logs to keep is set with grinder.numberOfOldLogs.

Oracle WebLogic Server 12c: Administration I 10 - 42


Finding Bottlenecks

• A CPU-bound system cannot process additional workload


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

because the processor is too busy (at or near 100%).


– Possible causes include:
— Too frequent garbage collection
— Excessive memory allocation—resulting in paging
• An I/O bound system’s processor is not fully utilized
(< 75%). The performance remains the same regardless of ense
ic
the client load. le l a b
fer
ans
– Common culprits include:
Accessing remote disks too frequently
n - tr
no

— Database issues
a
squerieseฺ
)
Too few connections, poorly written
h a id
x u

m ฺm nt G
Insufficient network bandwidth

ฺ co u d e
o
er i s S t
s h and/or its affiliates. All rights reserved.
r u z@ © s2013,
e tOracle
ฺc to u
Copyright

n e
z( re
r u
After the CPU is bound, the application server cannot do any more work. Possible causes of a
C
ne
CPU-bound system include too frequent garbage collection, excessive paging, and poorly
R e designed applications. You can monitor the JVM garbage collection to see whether or not it is
a problem. You can also use Java profilers to monitor your applications to see whether they
have issues. Typically, profilers show method-level performance (execution time), showing
the total execution time and number of invocations for each method. They can also analyze
the memory usage of the application.
There are many possible causes of a database bottleneck. Sometimes, the number of
connections is too low, and concurrent clients block, waiting for a connection. The solution
there is to create and use more database connections. Sometimes, queries take too much
time. In this case, the solution may be to create secondary indexes on certain fields. If your
database server’s machine is too slow, look for better hardware, or move the database to a
dedicated machine. If these solutions do not resolve the problem, look into vendor-specific
tuning options for your database. Many of the solutions to a database bottleneck reside with
the developers. Perhaps they can make more efficient trips to the database by obtaining
needed information in one query instead of multiple queries.
The network can be your bottleneck if it gets saturated. Monitor your network to determine
how much bandwidth is being used. The easiest fix is to buy more bandwidth.

Oracle WebLogic Server 12c: Administration I 10 - 43


Correcting Bottlenecks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Issue Resolution

Garbage collection Try changing JVM garbage collection options, such as the
type of collector or the size of the generations.
Memory Try modifying JVM memory arguments.

Code performance Use a Java profiler to find the methods that run most often
n s e
ice
and take the longest to run. Developers should make
l
ble
those methods more efficient.
r a
e have
fall
s
Web application Precompile JSPs. Ensure that Servlet Reload Check,
performance Resource Reload Check, and JSP Page Check n
traresources,
n -
nosparingly.
the value of -1. Session replication takes
developers should use the session
a
s the efficiency
) h a i d eฺ of their queries.
xthe database. u
Database performance Developers should increase

DBAs should tunem t G
ฺ com uden
s ero is St
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z re JVM has more than one collection algorithm and many options with
(HotSpot
ruyou can experiment. See the Oracle documentation as well as whitepapers in the
The Oracle
C
eneOracle Technology Network (http://www.oracle.com/technetwork).
which
R
The lesson titled “Starting Servers” covers setting JVM memory arguments.
The first time a JavaServer Page (JSP) is accessed, it is translated into a class and compiled.
This translation and compilation can be done ahead of time, and makes JSPs load faster the
first time they are accessed.
Java profilers can monitor applications. Typically, they show the total execution time and
number of invocations for each method. They can also analyze the memory usage of the
application. The methods that run the most should be made as efficient as possible. The
methods that take the longest to run are sometimes poorly written and should be made more
efficient, too. Java VisualVM is a profiler that comes with the Oracle HotSpot JDK
(<JDK>/bin/jvisualvm).

Oracle WebLogic Server 12c: Administration I 10 - 44


During development, WebLogic Server periodically (how often is configurable) checks to see
whether Servlets, JSPs, and other resources have been updated. If they have, it loads the new
versions. Resources are needed to do these checks. The default in production is to set the
values of how often to check to -1, which means to never check. Application deployment
descriptors can override those defaults, so it is good to ensure these attributes have their
production values.
Most web applications store objects in the HTTPSession. To provide failover, session data is
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

replicated. This takes resources. The larger the session, the more resources the session
replication takes. Therefore, developers should store objects in the session sparingly, and try
not to store very large objects in the session.
When a system is profiled, often the methods that run the longest are the ones that access the
database. Developers should ensure the efficiency of their database queries. They should work
with DBAs to ensure that the tables being used are properly indexed.

n s e
lice
r a ble
n sfe
- tr a
no n
a
s eฺ
) ha id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
r u z@ se th
n e ฺc to u
z( re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 45


Quiz

An application must be stopped to be undeployed.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. True
b. False

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruza
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 10 - 46


Quiz

A redeployed application must be manually restarted before it


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

can be used.
a. True
b. False

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
(re
ruzb
Answer:
C
R ene

Oracle WebLogic Server 12c: Administration I 10 - 47


Summary

In this lesson, you should have learned how to:


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Deploy an application
• Test a deployed application
• Monitor a deployed application
• Load test an application
n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 48


Practice 10-1 Overview:
Deploying an Application
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Deploying an application
• Redeploying an application
• Undeploying an application

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 49


Practice 10-2 Overview:
Load Testing an Application
This practice covers the following topics:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Using The Grinder to load test WebLogic Server


• Viewing the load test results in The Grinder console

n s e
lice
r a ble
n sfe
- tra
no n
s eฺ a
) h a id
x
ฺm nt G u
co m d e
o ฺ tu
ser i s S
z@ © s2013,
e h and/or its affiliates. All rights reserved.
tOracle
r u
ฺc to u
Copyright

n e
z(re
C r u
e ne
R

Oracle WebLogic Server 12c: Administration I 10 - 50

You might also like