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

Aula Matriz SฺAฺSฺ

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

ble
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this
a ( j u se
r to
u cuaOracle
s e WebLogic Server 12c:
t o D icen
es l
Ern Administration I
u a n
J

Student Guide - Volume I


D80149GC20
Edition 2.0 | December 2016 | D94536

Learn more from Oracle University at education.oracle.com


Aula Matriz SฺAฺSฺ

Authors Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

Al Saganich Disclaimer

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

in part without the express authorization of Oracle.

The information contained in this document is subject to change without notice. If you find any
Technical Contributors problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway,
and Reviewers Redwood Shores, California 94065 USA. This document is not warranted to be error-free.
Mark Lindros Restricted Rights Notice
Will Lyons
If this documentation is delivered to the United States Government or anyone using the
Serge Moiseev documentation on behalf of the United States Government, the following notice is applicable:
Matthew Slingsby
U.S. GOVERNMENT RIGHTS
Angelika Krupp The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose
Kevin Tate these training materials are restricted by the terms of the applicable Oracle license agreement
bl e
Takyiu Liu
and/or the applicable U.S. Government contract.
fe r a
Tom Eliason Trademark Notice
t r ans
Oracle and Java are registered trademarks of Oracle and/or its affiliates.n
Jenny Wongtangswad
o - names may be
Other
trademarks of their respective owners.
Juan Quezada
s an
Radek Felcman
) ha ฺ
Matt Heimer
c o m ide
Saskia Nehls ฺ
ail nt Gu
Juan Adauco Quezada m
g de
Eric Gross r a @ tu
a S
d u cu this
Editors
a ( j u se
r
Nikita Abraham
u cua nse to
o D lice
Aju Kumar

e s t
r n
Graphic Editor
EDharmalingam
a n
Prakash
Ju
Publishers
Pavithran Adka
Sumesh Koshy
Raghunath M
Aula Matriz SฺAฺSฺ

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

1 Oracle WebLogic Server 12c: Administration I


Objectives 1-2
Target Audience 1-3
Introductions 1-4
Course Schedule 1-5
Course Practices 1-7
Classroom Guidelines 1-8
ble
For More Information 1-9
fe r a
Related Training 1-10
t r ans
o n-
an
2 WebLogic Server: Overview
Objectives 2-2 s
ha ฺ
Distributed Systems 2-3 )
m ide
ฺ c o
ail nt Gu
Java Platform Enterprise Edition 2-4
Oracle WebLogic Server 2-5 m
g de
JVM 2-6
r a @ tu
a S
System Architecture 2-7
d u cu this
( j
WebLogic Server Domain 2-8
a u se
r
cua nse to
Administration Server 2-9
u
Managed Servers 2-10
s t o D lice
Node Manager 2-11
rn e
Machines and Clusters 2-12
n E
J u a WebLogic Server Application Services 2-13
WebLogic Server Application: Example 2-14
WebLogic Server Administrative Tools 2-15
WebLogic Server Administration Console 2-17
Fusion Middleware Control 2-18
WebLogic Scripting Tool 2-20
WebLogic Diagnostic Framework 2-21
WebLogic Diagnostics Framework Dashboard 2-22
Enterprise Manager Cloud Control 2-23
WebLogic Server and RESTful Management 2-24
Cloud Computing 2-25
Self Service 2-26
Infrastructure as a Service (IaaS) 2-27

iii
Aula Matriz SฺAฺSฺ

Platform as a Service (PaaS) 2-28


Java Cloud Service 2-29
JCS Instance 2-30
Creating a JCS Instance 2-31
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Java Cloud Service: Default Ports 2-32


Java Cloud Service: Default Domain Configuration 2-33
Quiz 2-34
Summary 2-37

3 Installing and Patching WebLogic Server


Objectives 3-2
Determining Supported System Configurations 3-3
Ensuring Your System Meets Requirements 3-4
ble
When Not All FMW Is the Same Version 3-5 fe r a
WebLogic Server Installers 3-6
t r ans
WebLogic Server Generic Installer 3-7 on-
WebLogic Quick Installers 3-8
s an
Fusion Middleware Infrastructure Installer 3-9 ) ha ฺ
What Is Oracle Coherence? 3-10
c o m ide
FMW Installation Flow 3-11

ail nt Gu
m
g de
r a @
WebLogic Server Installation Modes 3-12
tu
a S
cu this
Installing WebLogic Server on Linux Graphical Mode 3-13
j d u
Installation Problems 3-19
r a ( u se
Sample Installation Directory Structure 3-20
u cua nse to
Uninstalling WebLogic Server 3-21
t o D lice
Applying Patches by Using OPatch 3-22
s
rn e
Zero Down Time Patching 3-23
n E ZDT Patching Workflows 3-24
J u a Zero Down Time Patching Application Patching Overview 3-25
Quiz 3-26
Summary 3-28
Practice 3-1 Overview: Installing WebLogic Server 3-29
Practice 3-2 Overview: Patching WebLogic Server 3-30

4 Creating Domains
Objectives 4-2
Domain Planning Questions 4-3
Virtual IP Address and Virtual Host Name 4-6
Domain Mode: Development 4-7
Domain Mode: Production 4-8
Domain Creation Tools 4-9

iv
Aula Matriz SฺAฺSฺ

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
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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-31
Creating the Domain Archive: Pack 4-32
Using the Domain Archive: Unpack 4-33
What Is WebLogic Server 12c Multitenancy? 4-34
WebLogic Server Multitenancy Components 4-35
ble
WebLogic Server Multitenancy Partition Isolation 4-36 fe r a
What Is a Domain Partition? 4-37
t r ans
What Are Resource Groups? 4-38 o n-
What Are Resource Group Templates? 4-39
s an
Virtual Targets 4-41 ) ha ฺ
Quiz 4-44
c o m ide
Summary 4-46

ail nt Gu
m
g de
r a @
Practice 4-1 Overview: Creating a New Domain 4-47
tu
a S
cu this
Practice 4-2 Overview: Copying a Domain to a New Machine 4-48
j d u
5 Starting Servers ra
( u se
cua nse to
Objectives u5-2
t o DServer
WebLogic
s l i ceLife Cycle 5-3
r n e
Starting WebLogic Server with a Script 5-5
n E Customizing the Scripting Environment 5-6
J u a Creating a Boot Identity File 5-8
Stopping WebLogic Server 5-9
Suspend and Resume 5-10
Customizing Standard Scripts 5-11
WebLogic Server Options 5-12
Changing the JVM 5-14
JVM Options 5-15
Modifying the CLASSPATH 5-16
WebLogic Server Startup Issues 5-19
Failed Admin Server 5-20
Restarting a Failed Admin Server: Same Machine 5-21
Restarting a Failed Admin Server: Different Machine 5-22
Restarting a Failed Managed Server: Same Machine 5-23

v
Aula Matriz SฺAฺSฺ

Restarting a Failed Managed Server: Different Machine 5-24


Quiz 5-25
Summary 5-27
Practice 5-1 Overview: Starting and Stopping Servers 5-28
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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
ble
Advanced Console Options 6-9 fe r a
Administration Console Change Center 6-11
t r ans
Multiple Edit Sessions 6-12 o n-
Admin Console: Creating Domain Resources 6-14
s an
Creating a Resource Example: New Server 6-15 ) ha ฺ
Modifying a Resource Example: Server 6-18
c o m ide

ail nt Gu
Admin Console: Monitoring Domain Resources 6-20
m
g de
r a @
Admin Console: Controlling Domain Resources 6-21
tu
a S
cu this
Enterprise Manager Cloud Control 6-22
Quiz 6-23
j d u
Summary 6-25 r a ( u se
u cua nse to
Practice 6 Overview: Using the Administration Console for Configuration 6-26

s t o D lice
rn
7 e
Configuring JDBC
n E Objectives 7-2
Jua JDBC: Overview 7-3
WebLogic JDBC Drivers 7-4
Global Transactions: Overview 7-5
Two-Phase Commit 7-6
JDBC Data Source 7-7
Java Naming and Directory Interface (JNDI) 7-9
JNDI Duties of an Administrator 7-10
Deployment of a Data Source 7-11
Targeting of a Data Source 7-12
Types of Data Sources 7-13
JCS Default Data Source 7-15
Creating a Generic Data Source 7-17
Non-XA Driver Transaction Options 7-19

vi
Aula Matriz SฺAฺSฺ

Creating a Generic Data Source 7-20


Connection Pool Configuration 7-23
Connection Properties 7-25
Testing a Generic Data Source 7-26
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Oracle Real Application Clusters: Overview 7-27


GridLink Data Source for RAC 7-28
GridLink, FCF, and ONS 7-29
GridLink and Services 7-30
GridLink and Single Client Access Name (SCAN) 7-31
Creating a GridLink Data Source 7-32
Common Data Source Problems 7-38
Basic Connection Pool Tuning 7-42
Quiz 7-45
ble
Summary 7-47 fe r a
Practice 7-1 Overview: Configuring a JDBC Data Source 7-48
t r ans
on-
8 Monitoring a Domain
s an
Objectives 8-2 ) ha ฺ
WebLogic Server Logs 8-3
c o m ide
WebLogic Server Log Locations 8-5

ail nt Gu
m
g de
Log Message Severity Levels 8-6
r a @ tu
a S
cu this
Understanding Log File Entries 8-8
j d u
Accessing the Logs from the Admin Console 8-9
r a ( u se
Configuring Server Logging 8-11
u cua nse to
Error Messages Reference 8-14
t o D lice
Log Filters 8-15
s
rn e
Creating a Log Filter 8-16
n E Applying a Log Filter 8-19
J u a Subsystem Debugging 8-20
Debug Scopes 8-21
Debug Scopes: Examples 8-22
Admin Console: Monitoring Domain Resources 8-23
Monitoring the Domain 8-24
Monitoring All Servers 8-25
Monitoring Server Health 8-26
Monitoring Server Performance 8-27
Monitoring Data Source Health 8-28
Example Data Source Performance Attributes 8-29
JMX, MBeans, Managing, and Monitoring 8-30
Monitoring Dashboard 8-31
Monitoring Dashboard Interface 8-32

vii
Aula Matriz SฺAฺSฺ

Views 8-33
Built-in Views 8-34
Creating a Custom View 8-35
Anatomy of a Chart 8-36
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Current or Historical Data 8-37


Enterprise Manager Cloud Control: Review 8-38
Quiz 8-39
Summary 8-41
Practice 8-1 Overview: Working with WebLogic Server Logs 8-42
Practice 8-2 Overview: Monitoring WebLogic Server 8-43

9 Node Manager
Objectives 9-2
ble
Node Manager 9-3 fe r a
Types of Node Manager 9-5
t r ans
Node Manager Architecture: Per Machine 9-6 on-
Node Manager Architecture: Per Domain 9-7
s an
How Node Manager Starts a Managed Server 9-8 ) ha ฺ
c o m ide
How Node Manager Can Help Shut Down a Managed Server 9-9

ail nt Gu
Configuration Wizard and Node Manager 9-10
m
g de
r a @
Configuring the Java-Based Node Manager 9-12
tu
a S
cu this
Configuring Server Start and Health Monitoring Parameters 9-13
j d u
Configuring the Java-Based Node Manager 9-15
r a ( u se
Other Node Manager Properties 9-17
u cua nse to
Node Manager Files 9-18
t o D lice
Enrolling Node Manager with a Domain 9-21
s
rn e
When Not to Use nmEnroll() 9-22
n E Reminder: Pack 9-23
J u a Reminder: Unpack 9-24
Controlling Servers Through Node Manager 9-25
Node Manager: Best Practices 9-26
Quiz 9-28
Summary 9-30
Practice 9-1 Overview: Configuring and Using Node Manager 9-31

10 Deploying Applications
Objectives 10-2
Deploying Applications to WebLogic Server 10-3
Software Life Cycle and WebLogic Server 10-4
Java EE Deployments 10-5
WebLogic Server Deployments 10-6

viii
Aula Matriz SฺAฺSฺ

Other Deployments 10-7


Deployment Terms 10-9
Deployment Descriptors 10-12
Deployment Plans 10-13
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Exploded Versus Archived Applications 10-14


Autodeploy 10-15
Server Staging Mode 10-16
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
ble
Monitoring Information Available from the Admin Console 10-31 fe r a
Monitoring Deployed Applications: Monitoring Dashboard 10-32
t r ans
Application Errors 10-33 on-
Application Testing 10-34
s an
Performance Testing Methodology 10-35 ) ha ฺ
Load and Stress Testing 10-36
c o m ide
Load Testing Tools 10-37

ail nt Gu
m
g de
The Grinder 10-38
r a @ tu
a S
cu this
The Grinder Architecture 10-39
j d
The Grinder Proxy 10-40 u
r a (
Agent Properties 10-41 u se
u cua nse to
The Grinder Console 10-42
t o D lice
Finding Bottlenecks 10-43
s
rn e
Correcting Bottlenecks 10-44
n E Quiz 10-46
J u a 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


Objectives 11-2
Default WebLogic Networking 11-3
Additional Networking Scenarios 11-5
Dedicating Network Interfaces to Specific Servers 11-6
Using Multiple Ports on a Single Server 11-7
Isolating Administrative Communication 11-8
Isolating Cluster Communication 11-9
Network Channel 11-10

ix
Aula Matriz SฺAฺSฺ

Channel Selection 11-11


Creating a Channel 11-12
Channel Network Settings 11-15
Monitoring Channels 11-16
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Administration Port 11-17


Configure the Domain’s Administration Port 11-18
Server Override of the Administration Port 11-19
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
ble
Run the Application Using the Virtual Host 11-26 fe r a
Quiz 11-27
t r ans
Summary 11-29 on-
Practice 11-1 Overview: Configuring a Network Channel 11-30
s an
) ha ฺ
Practice 11-2 Overview: Configuring the Administration Port 11-31
c
Practice 11-3 Overview: Creating a Virtual Host 11-32 o m ide

ail nt Gu
m
g de
r a @
12 Clusters: Overview, Creation, and Configuration
tu
Objectives 12-2 a
u this S
Cluster: Review 12-3 duc
a j
(12-5 use
r
Benefits of Clustering
to
u cua Cluster
Basic (Single-Tier) s e Architecture 12-6
t o
Multi-Tier
l en
DClustericArchitecture 12-7
e s
Ern
Architecture Advantages and Disadvantages 12-8

u a n Cluster Communication 12-10


J Creating a Cluster: Configuration Wizard 12-12
Creating a Cluster: Administration Console 12-13
Adding Servers to the Cluster: Administration Console 12-14
Server Templates and Dynamic Clusters 12-15
Creating a Dynamic Cluster 12-17
Editing the New Dynamic Cluster 12-21
Editing the New Server Template 12-22
Dynamic Server Calculated Attributes 12-23
Dynamic Server Calculated Attributes: Example 12-25
Comparing Configured and Dynamic Clusters 12-26
Creating a Server Template 12-27
Server Templates and Configured Servers 12-29
Quiz 12-30

x
Aula Matriz SฺAฺSฺ

Summary 12-32
Practice 12-1 Overview: Configuring a Cluster 12-33
Practice 12-2 Overview: Configuring a Dynamic Cluster 12-34
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

13 Clusters: Proxies and Sessions


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-6
Configuring OHS as the Cluster Proxy 13-8
httpd.conf and mod_wl_ohs.conf 13-9
mod_wl_ohs.conf 13-10
ble
Select Plug-In Parameters 13-11 fe r a
Starting and Stopping OHS 13-13
t r ans
Verifying that OHS Is Running 13-14 o n-
Oracle Traffic Director 13-15
s an
Oracle Traffic Director (OTD): Features 13-17 ) ha ฺ
Administration Architecture 13-19
c o m ide
High Availability Architecture 13-21

ail nt Gu
m
g de
Comparing OHS and OTD 13-22
r a @ tu
a S
cu this
Failover: Detecting Failures and the Dynamic Server List 13-23
j d u
HTTP Session Failover 13-25
r a ( u se
Configuring Web Application Session Failover: weblogic.xml 13-26
u cua nse to
In-Memory Session Replication 13-29
t o D lice
In-Memory Replication: Example 13-30
s
rn e
Configuring In-Memory Replication 13-33
n E Machines 13-34
J u a Secondary Server and Replication Groups 13-35
Replication Groups: Example 13-36
Configuring Replication Groups 13-37
File Session Persistence 13-38
Configuring File Persistence 13-39
JDBC Session Persistence 13-40
JDBC Session Persistence Architecture 13-41
Configuring JDBC Session Persistence 13-42
JDBC Persistent Table Configuration 13-43
Configuring a Hardware Load Balancer 13-45
Hardware Load Balancer Session Persistence 13-46
Passive Cookie Persistence and the WebLogic Server Session Cookie 13-47
Quiz 13-48

xi
Aula Matriz SฺAฺSฺ

Summary 13-49
Practice 13-1 Overview: Installing OHS (Optional) 13-50
Practice 13-2 Overview: Configuring a Cluster Proxy 13-51
Practice 13-3 Overview: Configuring Replication Groups 13-52
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

14 Clusters: Communication, Planning, and Troubleshooting


Objectives 14-2
Review: Cluster Communication 14-3
How Multicast Works 14-4
How Unicast Works 14-5
Considerations for Choosing Unicast or Multicast 14-7
Configure Multicast 14-8
Configure Unicast 14-11
ble
Replication Channel 14-12 fe r a
Configure Replication Channels: Servers 14-13
t r ans
Configure Replication Channels: Cluster 14-16 on-
Configure Replication Channels 14-17
s an
Planning for a Cluster 14-18 ) ha ฺ
Managing a Cluster 14-22
c o m ide

ail nt Gu
Dynamic Clusters, Elasticity, and WLDF 14-23
m
g de
r a @
Automated Elasticity for Dynamic Clusters 14-24
tu
a S
cu this
Scale Up a Cluster 14-26
j d u
Scale Down a Cluster 14-27
r a ( u se
Troubleshooting a Cluster 14-28
u cua nse to
Monitoring a Cluster: Admin Console 14-29
t o D lice
WebLogic Server and OHS Logs 14-30
s
rn e
Common OHS to WLS Connectivity Issues 14-31
n E Multicast Communication Issues 14-33
J u a Cluster Member Uniformity 14-34
Session Failover Issues 14-35
Quiz 14-36
Summary 14-37
Practice 14-1 Overview: Configuring a Replication Channel 14-38

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
Transaction States when Committing 15-7
Transaction States when Rolling Back 15-8

xii
Aula Matriz SฺAฺSฺ

Java Transaction API (JTA) 15-9


Configuring Transactions 15-10
JTA Configuration Options 15-11
WebLogic Extension of JTA 15-15
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

JDBC Reminder 15-16


Logging Last Resource and Performance 15-17
LLR: Example 15-18
Transaction Log (TLog) 15-19
Configuring the Default Store 15-20
Configuring a JDBC Transaction Log 15-21
Comparing File Store to JDBC Store 15-22
Monitoring Transactions 15-23
ble
Viewing Transaction Statistics for a Resource 15-25
fe r a
Forcing a Commit or Rollback 15-27
t r ans
n-
Troubleshooting Transactions 15-30
o
an
Quiz 15-32
Summary 15-34 s
ha ฺ
)
m ide
Practice 15-1 Overview: Configuring Transaction Persistence 15-35
ฺ c o
m ail nt Gu
16 WebLogic Server Security
@ g de
Objectives 16-2
a r a S tu
Some Security Terms 16-3 cu is
j d u t h
r a (
Some Security Terms: Graphically
u se16-4
c uaSecurity
WebLogic Server
e to 16-5
Realm
What theD u
Providers eDo s
n 16-6
t o l i c
r n es Stores 16-9
Security

n E Default Security Store Implementation 16-10


J u a Default Security Configuration 16-11
Security Customization Approaches 16-12
Authentication Providers 16-13
Available Authentication Providers 16-14
Lightweight Directory Access Protocol (LDAP) 16-16
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
Configuring the LDAP Provider: Users 16-24

xiii
Aula Matriz SฺAฺSฺ

Configuring the LDAP Provider: Groups 16-25


Configuring the LDAP Provider: Subgroups 16-27
Configuring the LDAP Provider: Dynamic Groups 16-28
LDAP Failover 16-29
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

LDAP Caching 16-30


Multiple Authentication Providers 16-31
Control Flags 16-32
Administration Groups 16-34
Troubleshooting Authentication 16-35
Auditing Provider 16-36
Security Audit Events 16-37
Configuring the Auditing Provider 16-38
ble
Security Realm Debug Flags 16-39
fe r a
Common LDAP Issues 16-40
t r ans
n-
Quiz 16-41
o
an
Summary 16-44
s
ha ฺ
Practice 16-1 Overview: Configuring an Authentication Provider 16-45
)
m ide
ฺ c o
17 Backing Up a Domain and Upgrading WebLogic
m ail nt Gu
Server
Objectives 17-2
@ g de
Backup and Recovery 17-3
a r a S tu
Backup Solution 17-4
d u cu this
Types of Backups 17-6
a ( j u se
When to Back Up
r
ua 17-8se to
u c
Limitations
t o l c en
D andiRestrictions for Online Backups 17-9

r n es
Performing Full Offline Backup 17-10

n E Performing Full Online Backup 17-12


J u a Impact of Administration Server Failure 17-14
Automatically Backing Up a Domain Configuration 17-15
Recovery Operations 17-16
Directories to Restore 17-18
Recovery After Disaster 17-19
Recovery of Homes 17-20
Recovery of a Managed Server 17-21
Recovery of the Administration Server 17-22
Restarting the Administration Server on a New Computer 17-23
Managed Server Independence 17-25
Upgrading WebLogic Server 11g to 12c 17-26
Run the Reconfiguration Wizard 17-29
Upgrade the Managed Server Domains 17-30

xiv
Aula Matriz SฺAฺSฺ

Upgrading WebLogic Server 11g to 12c 17-31


Quiz 17-32
Summary 17-33
Practice 17-1 Overview: Backing Up and Restoring a Domain 17-34
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

18 Oracle Cloud
Agenda 18-2
What is Cloud? 18-3
What is Cloud Computing? 18-4
History – Cloud Evolution 18-5
Components of Cloud Computing 18-6
Characteristics of Cloud 18-7
Cloud Deployment Models 18-8
ble
Cloud Service Models 18-9 fe r a
Industry Shifting from On-Premises to the Cloud 18-13
t r ans
Oracle IaaS Overview 18-15 on-
Oracle PaaS Overview 18-16
s an
Oracle SaaS Overview 18-17 ) ha ฺ
Summary 18-18 c o m ide

ail nt Gu
19 Oracle Java Cloud Service Overview@g
m
r a t u de
Objectives 19-2
c u a is S
j du 19-3
Introducing Java Cloud Service
( e th
Java Cloud Service:ra
a o us 19-4
Three Options
t
cu nMain
Java ClouduService seUse Cases 19-5
Javato D e
ic Feature: Provisioning 19-6
e s l
Cloud Service

Ern
Java Cloud Service Feature: Patching 19-7

u a n Java Cloud Service Feature: Backup / Restore 19-8


J Java Cloud Service Feature: Scaling 19-9
Oracle Coherence Option: Data Caching & Scaling 19-10
Oracle Coherence Option: Your Cloud Data Grid 19-11
How You Interact with Java Cloud Service 19-12
Speaking of Dev Environments… Developer Cloud Service 19-13
Java Cloud Service On-Premises! 19-14
Summary 19-15

xv
Aula Matriz SฺAฺSฺ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

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

Oracle
O l WebLogic
W bL i Server
S 12c:
12
Administration I
ble
Course Overview fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this course, you should be able to:


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

• Create and configure basic WebLogic Server resources


• Start and stop WebLogic Server
• Monitor
M it WebLogic
W bL i Server
S resources
• Configure, start, and use Node Manager to remotely start WebLogic
Server
• Deploy Java Enterprise Edition applications to WebLogic Server
a b le
• Replace WebLogic Server’s default authentication provider with an fer
external LDAP product
t r ans
• Back up and restore a WebLogic domain o n -
n a
a s
m ) h eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 1 - 2


Aula Matriz SฺAฺSฺ

Target Audience

• This course is for administrators who will be responsible for


administering Oracle WebLogic Server 12c.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Prerequisite skills include:


– Some system administration experience
– Basic knowledge of UNIX commands and navigation

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua whether to your experience fulfills the course prerequisites, ask the
If you are concerned
u cabout s e
instructor. to D
l i c en
r n es
nE
Jua

Oracle WebLogic Server 12c: Administration I 1 - 3


Aula Matriz SฺAฺSฺ

Introductions

Introduce yourself and tell us about your:


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

• Experience with WebLogic Server


• Experience with other Oracle products

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 1 - 4


Aula Matriz SฺAฺSฺ

Course Schedule

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

1 AM 1. Course Overview
2. WebLogic Server: Overview
3. Installing and Patching WebLogic Server

PM 4. Creating Domains
5. Starting Servers

2 AM 6. Using the Administration Console


7. Configuring JDBC e
r a bl
PM 8. Monitoring a Domain
nsfe
9 N
9. Node
d MManager
t r a
9. Node Manager (continued) no n-
3 AM a
10. Deploying Applications
h a s
m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
uadepending to upon the instructor and the students in the class. The
The schedule might u cvary s e
instructor will
t o D updates.
provide
l i c en
r n es
nE
Jua

Oracle WebLogic Server 12c: Administration I 1 - 5


Aula Matriz SฺAฺSฺ

Course Schedule

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

3 AM 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
13.

PM 14. Clusters: Communication, Planning, and Troubleshooting


15. Transactions

5 AM 16. WebLogic Server Security


ble
17. Backing Up a Domain and Upgrading WebLogic Server fe r a
PM
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rne
n E
J u a

Oracle WebLogic Server 12c: Administration I 1 - 6


Aula Matriz SฺAฺSฺ

Course Practices

• Topics will be reinforced with hands-on exercises.


• Many exercises include a scripted solution to aid the students
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

who fall behind.

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cua nsbyea tlater
Any practice that isurequired practice has a scripted solution.
to D e
e s lic
rn
nE
Jua

Oracle WebLogic Server 12c: Administration I 1 - 7


Aula Matriz SฺAฺSฺ

Classroom Guidelines

• The instructor starts each session at the scheduled time.


• Ensure that cell phones are silent.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• When you ask questions, be respectful of the topic at hand


and the interest of other students.

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sehelp tothe class proceed smoothly and enable you to get the
We hope that these
u cguidelines
o
maximum benefit
t Dfromithe
l c encourse.
r n es
nE
Jua

Oracle WebLogic Server 12c: Administration I 1 - 8


Aula Matriz SฺAฺSฺ

For More Information


Topic Website
Oracle University http://oracle.com/education
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Oracle Learning Library http://oracle.com/oll

Product Documentation http://www.oracle.com/technetwork/documentation

Product Downloads http://www.oracle.com/technetwork/indexes/downloads

Product Articles http://www.oracle.com/technetwork/articles

Product Support http://oracle.com/support

Product Forums http://forums.oracle.com


ble
Product Tutorials/Demos http://www.oracle.com/technetwork/tutorials
fe r a
t r ans
Sample Code http://www.oracle.com/technetwork/indexes/samplecode
no n-
WebLogic Blog http://blogs.oracle.com/weblogicserver
s a
WebLogic on Facebook h
) eฺ
http://www.facebook.com/oracleweblogic
a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua seattempt to to address any questions that you might ask. Oracle
This course and theu cinstructor
o D of channels
provides a variety
t l i c en for developers and administrators to access additional
r n es
information.
nE
Jua

Oracle WebLogic Server 12c: Administration I 1 - 9


Aula Matriz SฺAฺSฺ

Related Training

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

Oracle WebLogic Server 12c: Administration II


Oracle WebLogic Server 12c: JMS Administration

Oracle WebLogic Server 12c: Troubleshooting Workshop

Oracle WebLogic Server 12c: Performance Tuning Workshop

Oracle WebLogic Server 12c: Enterprise Manager Management Pack


ble
Oracle Fusion Middleware12c: Multitenancy fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Your instructor canuprovide s e to information about the availability and contents of the
cua nadditional
courses listed
s t oinDthe slide.
l i ce
r n e
nE
Jua

Oracle WebLogic Server 12c: Administration I 1 - 10


Aula Matriz SฺAฺSฺ

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

WebLogic Server: Overview


ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


• Define WebLogic Server terms─domain, server, and cluster
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Describe the difference between the administration server and


managed servers
• List WebLogic Server tools
• Describe Paas, IaaS, and Java Cloud Service
• Enumerate the features and functions of Java Cloud Service
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 2 - 2


Aula Matriz SฺAฺSฺ

Distributed Systems

• Distributed systems divide their work across similar modules.


• As demand increases, more modules can be added to the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

system. This makes the system more scalable.


• The failure of a single module has less impact on the overall
system,
t which
hi h makes
k th the system
t more available.
il bl

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to is to better manage the complexity and resulting cost of
cua nsesystem
The main goal of audistributed
s t o Davailable
providing highly
l i ceand scalable systems.
r n e is how well a system can adapt to increased demands. When a distributed
Scalability
n E capacity is reached, new equipment can be added fairly easily. These new modules
system’s
J u a 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 down time.
High availability requires that a system is up and running as close to 24/7/365 as possible.
Thi iis achieved
This hi dbby using
i lloaddbbalancing
l i and d ffailover
il ttechniques.
h i

Oracle WebLogic Server 12c: Administration I 2 - 3


Aula Matriz SฺAฺSฺ

Java Platform Enterprise Edition

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


standard for distributed, enterprise computing.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The Java EE platform consists of:


– A Java Virtual Machine (JVM)
– Java Platform Standard Edition (Java SE)
– A Java EE application server
– Java EE Application Programming Interfaces (APIs)
ble
fe r a
t r ans
Application
Java
no n-
SE/EE
Server
s a
APIs
h
) eฺa
Java Virtual Machine
o m
Clients Hardware
a ilฺc t Guid Back-endSystems
g m en
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a ethat to converts compiled Java code into the machine code of
cumachine
The JVM is a software
u s
n machine runs. Because Java source code is compiled into
o
the platformton D the
which i c evirtual
the code ethat l
s runs on the virtual machine, that compiled code is portable.
r n
E Platform Standard Edition (SE) is a platform for developing portable, object-oriented
nJava
Juaapplications. 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
th JJava EE standards.
the t d d It contains
t i ttwo maini parts:
t
• 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
server-side
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


Aula Matriz SฺAฺSฺ

Oracle WebLogic Server

Oracle WebLogic Server (WLS):


• Is a Java EE application server hosting Java EE applications
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Is a completely compliant with Java EE 7


• Provides clustering for load balancing and high availability
• Offers an extensible security realm for authentication,
authorization, and so on
• Runs the “Java components” of Oracle Fusion Middleware
(FMW). These include Oracle SOA Suite, Oracle Service Bus, able
Oracle WebCenter Suite,, and some Oracle Identityy s f er
Management components - t r an
n on
• Runs “System components” of FMW, such as s a
Oracle HTTP Server (OHS) ) ha ฺ
m co uide
i l ฺ
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Oracle WebLogic Server
u e to enterprise-ready, Java Enterprise Edition application
cuaisnasscalable,
s t o DServer
server. WebLogic
l i ceenables enterprises to deploy mission-critical applications in a
e highly available, and scalable environment. These features enable enterprises
robust,nsecure,
r
n E
to configure clusters of WebLogic Server instances to balance workload, provide extra
J a
u 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 t andd system
t components.
t Java
J components t generally
ll are deployed
d l d tto W
WebLogic
bL i
Server as one or more Java Enterprise Edition applications and a set of resources. FMW 11g
system components are not deployed as Java applications. Instead, system components are
managed by the OPMN server. FMW 12c system components are deployed as part of a
specialized WebLogic Server domain. OHS 12c runs as a WebLogic-managed system
component either within a regular WebLogic domain or within a standalone domain that is
dedicated to running OHS.

Oracle WebLogic Server 12c: Administration I 2 - 5


Aula Matriz SฺAฺSฺ

JVM

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


• The JVM and its settings can significantly affect WebLogic
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Server performance.
– For example, the memory available to WebLogic Server and its
applications is contained within the memory assigned to the
JVM.
• Oracle provides the Oracle Hotspot JVM.
• JVM configuration options are set when the JVM starts. e
r a bl
– This can be done by updating the scripts used to fe
start
t t WebLogic
W bL i Server.
S t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sethat to executes the bytecode in compiled Java class files on a
ccomputer”
The JVM is a “virtual
u
o
physical machine.
t l entune your JVM affects the performance of WebLogic Server and
D Howicyou
r n es on it. Use only production JVMs on which WebLogic Server has been
the applications
E Check the documentation for the latest list of JVMs and operating systems. The
certified.
n
J a
u 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
startup, by employing various combinations of the startup options.
options

Oracle WebLogic Server 12c: Administration I 2 - 6


Aula Matriz SฺAฺSฺ

System Architecture

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

Cluster
WebLogic
Server
Back-end
Systems
and

Machine
Load WebLogic Databases
Balancer Server e
r a bl
Web
nsfe
Cli t
Clients
t r a
WebLogic
no n-
Server a
h a s
Firewall Machine ) eฺ
o m id
a ilฺc t GuCompany Network

@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to contain:
A possible systemu cua nsemight
architecture
• Clientsto
D ce Wide Web to access your applications
using theliWorld
e s
• rAnfirewall (hardware or software designed to prevent unauthorized access to or from a
n E private network by using filtering or blocking ports)
J u a
• 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 - 7


Aula Matriz SฺAฺSฺ

WebLogic Server Domain

A domain is a collection of WebLogic Server resources.


• How many domains there are and how they are organized is
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

completely up to you.

Machine Machine Machine

Domain A Domain A Domain B Domain B


Admin
ble
Admin Server Server Server
fe r a
Server Server tran
s
Server
o n -
a n
Product a s Product
h Installation
Installation Product Installation )
m ideฺ
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
A domain is a collection
u s e to Server resources. There are different kinds of resources
cuaof nWebLogic
in a domain,to D iWebLogic
including ce Servers, deployed applications, clusters, security providers,
and Java e s
Message
l
Service and Java Database Connectivity elements.
r n
Emany domains you have and how you organize them is completely left to you. For
u a n
How
J 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 run.

Oracle WebLogic Server 12c: Administration I 2 - 8


Aula Matriz SฺAฺSฺ

Administration Server

• A domain must have exactly one instance of WebLogic Server


acting as the administration server. An administration server is
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

part of exactly one domain.


• The administration server is:
– Th
The central
t l point
i t th
through
h which
hi h you configure
fi andd manage allll
domain resources
– Solely in charge of the domain’s configuration. It distributes
configuration changes to other servers in the domain.
– An instance of WebLogic Server and, therefore, a fully a b le
functional Java Enterprise Edition application server s f er
an - tr
n o n
Domain A s a
a
) h eฺ
m
Admin Serverail
ฺco Guid
g m ent
a r a@ Stud
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a server to called the administration server. You use the
All domains contain u ca uspecial
s e
administration
t o server
l en and manage all of the domain resources. Any other
D toicconfigure
WebLogic
r n esServers in the domain are called managed servers.
n E domains, the applications are deployed to the managed servers. The administration
In most
J u aserver 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
d i i t ti server.

Oracle WebLogic Server 12c: Administration I 2 - 9


Aula Matriz SฺAฺSฺ

Managed Servers

• A domain can have zero or more managed servers.


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

– Is managed by the administration server


– Is an instance of WebLogic Server and, therefore, a fully
f
functional
ti l Java
J Enterprise
E t i Edition
Editi application
li ti server
– Is where your Java Enterprise Edition applications run
— Web applications, EJBs, web services, enterprise applications
– Can be clustered with other cooperating managed servers for e
availability, scalability, and automatic failover r a bl
nsfe
t r a
Domain A no n-
s a
h a
Managed m) Managed
Managed Managed
ฺ c o i d eฺ
Server Server
m ail nt Gu
Server Server

@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to server is not the only server defined in the domain.
a administration
In almost all domains,
u cuthe s e
Other serverst oare
l c en These others are called managed servers, because they are
Dalsoidefined.
managedn s the administration server.
eby
E r
u a n
A company’s web applications, EJBs, web services, and other resources are deployed and
J 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 - 10


Aula Matriz SฺAฺSฺ

Node Manager

• Is a separate process that accepts remote commands to start,


stop, or suspend servers on its machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Monitors server availability and can restart failed servers


• Can be used to migrate servers on a failed machine to
another
th machine
hi

Machine ble
Server
fe r a
Node Start/stop
p
t r ans
Manager Monitor/
Serverno
n-
restart a
a s
m ) h eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua se Server to production environment are often distributed across
Server instances inuacWebLogic
o
multiple domains,
t Dmachines,
l i c en and geographic locations. Node Manager is a WebLogic Server
r n esenables you to start, shut down, and restart both administration server and
utility that
E server instances from a remote location. Although Node Manager is optional, it is
nmanaged
Juarequirements.
recommended if your WebLogic Server environment hosts applications with high-availability
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
N d M Manager starts
t t a server and d that
th t server later
l t fails,
f il Node
N d M Manager can bbe sett tto
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
g command-line interface.

Oracle WebLogic Server 12c: Administration I 2 - 11


Aula Matriz SฺAฺSฺ

Machines and Clusters

A machine:
• Is defined within a domain to represent physical hardware
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• 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,
which provides for failover
• With HTTP clients requires a cluster proxy that provides load a b le
balancing s f er
Proxy an - tr
n o n
s a
a
) h eServer
Cluster Server Server
o m d ฺ
ฺ c i
Machine
m a nt Gu Machine
Machine il

@ g de
a r a S tu
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to a computer with the managed servers that it hosts.
a toeassociate
A machine definition u cisuused s
n within the context of a machine. Machine definitions, and
Node Manager t o Dalways
is i c edefined
which nservers
l
es are assigned to them, are also used by a clustered managed server in selecting
theE
r
best location for storing replicated session data.
u a n
J 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.
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.
Th proxy provides
The id lload
dbbalancing
l i and d enables
bl ffailover
il b
by avoiding
idi ffailed
il d servers. Cl
Clusters
t
that provide EJB or JMS applications do not require a cluster proxy.

Oracle WebLogic Server 12c: Administration I 2 - 12


Aula Matriz SฺAฺSฺ

WebLogic Server Application Services

• Java Database Connectivity (JDBC)


– The API for accessing relational databases
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Data source objects are configured to provide database


access.
• Java
J Message
M Service
S i (JMS)
– The API for and implementation of an enterprise messaging
system
– Multiple resources must be configured in WebLogic Server for e
JMS. r a bl
nsfe
• Java Transaction API (JTA) t r a
no Server
– When transactions need to span resources, WebLogic n-
a
can act as the transaction manager. as ) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 2 - 13


Aula Matriz SฺAฺSฺ

WebLogic Server Application: Example

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

Web
Application
2 3

EJB
Application
Persistence
4 e
Web Service
r a bl
XML
Application Message Queue WebLogic
nsfe
Server
t r a
5 WebLogic Server no n-
s a
h a
Other Systems )
c o
or Applications
m ideฺ

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
uaa web to
1. Users interactu cwith s e application by using a browser. The web application is
o
responsible
t l i c en the website and for capturing user input through buttons,
Dfor rendering
r n es links, and so on. It is possible that the web application contains all of the
forms,
n E necessary business logic to perform the tasks that users request.
J u a 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
4. Aft the
th order
d isi written
itt tot the
th database,
d t b an EJB uses the
th Java
J Message
M Service
S i (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 - 14


Aula Matriz SฺAฺSฺ

WebLogic Server Administrative Tools

WebLogic Server can be administered and monitored by using:


• The WebLogic Server administration console
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Fusion Middleware Control


• The WebLogic Scripting Tool (WLST)
• The WebLogic Diagnostic Framework (WLDF) and Monitoring
Dashboard
• Enterprise Manager Cloud Control
• RESTful Management Services a b le
s f er
• Java Management Extentions (JMX) ran n - t
n o
s a
a
) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to includes a wide range of tasks which can be handled
cuaadministration
WebLogic Server system
u s e
o Dof tools,
by using a variety
t l i c enincluding:
n esog c Se
eb
• rWebLogic Server
e Administration
d st at o Co
Console:
so e A full-featured
u eatu ed console
co so e which
c suppo
supports
ts bot
both
E
uan
administration and monitoring capabilities, but is focused purely on WebLogic Server
J • Fusion Middleware Control: A web-based management system for administering
Oracle Fusion Middleware products. Fusion Middleware Control enables you to manage
services in your enterprise, including hosts, databases, listeners, application servers,
HTTP Servers, and web applications, as one cohesive unit.
• WebLogic Scripting Tool (WLST): A command-line scripting environment that you can
use to
t create,
t manage, and d monitor
it WebLogic
W bL i domains.
d i It is
i bbased
d on th
the JJava scripting
i ti
interpreter, Jython.
• WebLogic Diagnostic Framework (WLDF): A monitoring and diagnostic framework
that defines and implements a set of services that run within WebLogic Server
processes and participate in the standard server life cycle. Using WLDF, you can create,
collect, analyze, archive, and access diagnostic data.
• Enterprise Manager Cloud Control (EMCC): A suite of integrated enterprise
information technology management products, which provides comprehensive solutions
for testing, deploying, operating, monitoring, diagnosing, and resolving problems in
today’s complex IT environments.

Oracle WebLogic Server 12c: Administration I 2 - 15


Aula Matriz SฺAฺSฺ

• RESTFul Management Services: A comprehensive public interface for configuring,


monitoring, and administering the Oracle WebLogic Server platform in all supported
environments.
• Java Management
g Extensions: A technology
gy for managing
g g applications,
pp objects,
j
devices, and other resources that are known as managed beans (MBeans). A MBean is
a Java bean that provides a Java Management Extensions (JMX) interface. JMX is the
J2EE solution for monitoring and managing resources on a network. Like SNMP and
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

other management standards, JMX is a public specification and many vendors of


commonly used monitoring products support it. WebLogic Server provides a set of
MBeans that you can use to configure, monitor, and manage WebLogic Server
g JMX.
resources through

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 2 - 16


Aula Matriz SฺAฺSฺ

WebLogic Server Administration Console

• The Oracle WebLogic Server administration console is a web


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

monitoring the resources of a domain.


• The console application runs on the administration server.
• It is
i partt off the
th normall installation
i t ll ti off W
WebLogic
bL i S Server.

ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
a administration
The Oracle WebLogicu cuServer
n s e console (admin console) is a
D e
toadmin console
web browser–based, ic application
domain. e s
The
lgraphical user interface that can be used to manage a WebLogic Server
runs on the administration server. The admin console
r n
canEbe used to:
u a n
J • Configure, start, and stop instances of WebLogic Server
• Configure clusters
• Configure database connectivity (JDBC)
• Configure messaging (JMS)
• g
Configure WebLogic g Server securityy
• Deploy applications
• Monitor server and application performance
• View server and domain log files

Oracle WebLogic Server 12c: Administration I 2 - 17


Aula Matriz SฺAฺSฺ

Fusion Middleware Control

Fusion Middleware Control includes


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

• Oracle Traffic Director: Create and


manage OTD MT configurations.
• WebLogic
W bL i Server:
S C t and
Create d
manage WLS and Coherence MT,
including domains, partitions,
applications, caches, and more. e
• Health: Monitor WebLogic Domains, r a bl
nsfe
C h
Coherence Cl
Clusters,
t Oracle
O l Traffic
T ffi t r a
directory, and other tools to examine no n-
health and performance. s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua n(FMW)
Fusion MiddlewareuControl s e tois a web browser-based, graphical user interface that you
s t o D andlicadminister
can use to monitor e your domain. It can manage an Oracle WebLogic Server
domain
r n e
with its Administration Server, one or more Managed Servers, clusters, the Oracle
E Middleware components that are installed, configured, and running in the domain, and
nFusion
Juaperformance
the applications you deploy. Fusion Middleware Control organizes a wide variety of
data and administrative functions into distinct, web-based home pages for the
domain, servers, components, and applications. The Fusion Middleware Control home pages
make it easy to locate the most important monitoring data and the most commonly used
administrative functions—all from a web browser.
The followingg functionality
y is available in Fusion Middleware Control:
• Create WebLogic Server clusters, server instances, domains, machines, and server
templates
• Configure applications and libraries
• Create and configure UCP and proxy data sources

Oracle WebLogic Server 12c: Administration I 2 - 18


Aula Matriz SฺAฺSฺ

• Create and configure JMS servers, Store-and-Forward agents, JMS modules, JMS
resources, path services, messaging bridges, and messaging bridge destinations
• Create and configure security realms
• Manage WebLogic Server diagnostics
• Configure elasticity for dynamic clusters
• Manage WebLogic Server in a multi-tenant environment
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 2 - 19


Aula Matriz SฺAฺSฺ

WebLogic Scripting Tool

The WebLogic Scripting Tool (WLST) is:


• A scripting tool for creating, configuring, administering, and
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

monitoring the resources of a WebLogic Server domain


• Included with the installation of WebLogic Server
• Capable of performing all the tasks available in the
administration console, and more

$> . . . ble
$> java weblogic.WLST fe r a
I iti li i
Initializing W
WebLogic
bL i S Scripting
i ti T
Tool
l (WLST) ...
t r ans
wls:offline> connect('username', 'password', 'localhost:7001')
no n-
. . .
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to is a command-line scripting interface that system
cuaTool
The WebLogic Scripting
u s e
(WLST)
administrators
t o D operators
and
l i c en use to monitor and manage WebLogic Server instances and
domains.
n s is based on the Java scripting interpreter, Jython. In addition to supporting
eWLST
r
E Jython features such as local variables, conditional execution, and flow control
nstandard
Juastatements, 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).
WebLogic Server developers and administrators can extend the WebLogic scripting language
to suit their environmental needs byy following
g the Jython
y language
g g syntax.
y
To call WLST with a script, simply append the fully qualified path to the script to the WLST
command.
$> java weblogic.WLST myscript.py
Calling WLST without a script, as shown in the slide, puts WLST into interactive mode.

Oracle WebLogic Server 12c: Administration I 2 - 20


Aula Matriz SฺAฺSฺ

WebLogic Diagnostic Framework

• Is a monitoring and diagnostic framework


• Creates, collects, analyzes, and archives diagnostic data
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Runs within WebLogic Server processes


• Participates in the standard server life cycle
• Installed with WebLogic Server WLDF is configured and used
through the administration
WLDF supports: console or WLST!
• Diagnostic images: Create snapshots of the
server’s configuration and runtime metrics. a b le
s f er
• Harvesters: Periodically collect and record
- t r an
metric data. n on
• Policies and Actions: Compare data to set has
a
conditions and send notification when met. m ) eฺ
l o
ฺc Guid
• More a i
m nt g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sfor to
The WLDF provides u cfeatures e generating, gathering, analyzing, and persisting diagnostic
o D Server
data from WebLogic
t l i c eninstances and from applications deployed to them. Some WLDF
features
n s configured as part of the configuration for a server in a domain. Other features
eare
r
nareEconfigured as system resources (diagnostic modules) that can be targeted to servers (or
Juaclusters).
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
notification. A diagnostic image zip file includes the server’s
server s
configuration, log cache, JVM state, work manager state, JNDI tree, and most recent
harvested data.

Oracle WebLogic Server 12c: Administration I 2 - 21


Aula Matriz SฺAฺSฺ

WebLogic Diagnostics Framework Dashboard

• Is accessed from the WLS Administration Console


• Graphically presents the current and historical state of
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WebLogic Server, and hosted applications and resources


• Includes information gathered by the built-in diagnostic system
modules
d l
• Includes tools for organizing and displaying diagnostic data

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
The Monitoring Dashboard
u s e to the current and historical operating state of WebLogic
cua ndisplays
s t o D applications
Server and hosted
l i ce by providing visualizations of metric runtime MBean attributes,
which n
r e some of the more critical runtime performance metrics and the change in those
surface
E over time. Historical operating state is represented by collected metrics that have
nmetrics
Juabeen persisted into the Archive. To view collected metrics from the Archive, you must
configure the Harvester to capture the data you want to monitor.
The Monitoring Dashboard displays metric information in a series of views. A view is a
collection of one or more charts that display metrics. The Monitoring Dashboard includes a
predefined set of built-in views of available runtime metrics for all running WebLogic Server
instances in the domain
domain. Built-in
Built in views surface some of the more critical runtime WebLogic
Server performance metrics and serve as examples of the Monitoring Dashboard's graphic
capabilities.

Oracle WebLogic Server 12c: Administration I 2 - 22


Aula Matriz SฺAฺSฺ

Enterprise Manager Cloud Control

• Provides a comprehensive IT management infrastructure for


both Oracle and non-Oracle hardware and software
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Offers insight into the health of all the components in your


enterprise or private cloud
• Supports
S t private
i t cloud
l d managementt and d self-service
lf i (I(IaaS,
S
PaaS, DBaaS, and MWaaS)
• Is designed for flexibility and customization
• Runs on WebLogic Server but requires a relational database ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Oracle Enterprise u cua nCloud
Manager s e toControl is Oracle’s integrated, enterprise information
s t oD
technology (IT)
l i ce product line, which provides the industry’s only complete,
management
r n e and business-driven enterprise cloud management solution. Oracle Enterprise
integrated,
E creates business value for IT by leveraging the built-in management capabilities of
nManager
Juathe Oracle stack for traditional and cloud environments, thus enabling customers to achieve
unprecedented efficiency gains while dramatically increasing service levels.
Enterprise Manager Cloud Control (EMCC) also provides on-demand access to servers and
storage in a self-serviced, elastically scalable, and metered manner. The EMCC private cloud
models can be divided into two primary categories:
• Infrastructure as a Service (IaaS),
(IaaS) which allows users to request virtualized compute
compute,
storage, and network resources to run applications
• Platform as a Service (PaaS), which provides the specific database (DBaaS) and
middleware (MWaaS) components required by applications
Oracle Cloud Management Pack for Oracle Middleware delivers MWaaS capabilities that
span the entire middleware cloud life cycle. It enables cloud administrators to identify pooled
resources,, configure
g role-based access,, define the service catalog,
g, and define the related
chargeback plans. It enables cloud users to request middleware services and consume them
on demand.

Oracle WebLogic Server 12c: Administration I 2 - 23


Aula Matriz SฺAฺSฺ

WebLogic Server and RESTful Management

WebLogic RESTful management services:


• Provide a public interface for configuring, monitoring,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

deploying, and administering WebLogic Server


• Are supported in all environments
• Are based on WebLogic MBeans and descriptor interfaces
• Support configuration, management, and reporting of:
– Domains, Partitions, Servers,
and other environments ble
REST API WebLogic
fe r a
– Multitenant environments
GET
Domain
t r ans
– And others
no POST
n-
PUT as
a
m ) h eฺ
DELETE
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cua nse tservices
WebLogic RESTfulumanagement provide a comprehensive public interface for
o D e
e s
environments. This
licdeploying,
configuring, tmonitoring,
lesson describes
and administering WebLogic Server in all supported
the RESTful management services supported by
r n
E Server.
nWebLogic
JuaThe 12.2.1 release of RESTful management services provides comprehensive support for
WebLogic Server administration through the dynamic generation of REST resources based
on WLS MBeans and descriptor interfaces. There are resources to support the configuration
and monitoring of partitioned and nonpartitioned environments, life cycle management
resources, and legacy resources from 12.1.3.

There are two main bean types:


• Configuration: Used to configure WebLogic Server
• Runtime: Used to monitor WebLogic Server and for some operations, control WebLogic
Server (for example, starting and stopping servers, and shrinking data source
connection pools).
For more information,, see Oracle® Fusion Middleware Administering
g Oracle WebLogic
g
Server with RESTful Management Services.

Oracle WebLogic Server 12c: Administration I 2 - 24


Aula Matriz SฺAฺSฺ

Cloud Computing

• Delivers software functionality as remote services


• Relies on a shared infrastructure whose location and
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

implementation are transparent to users


• Consolidates IT resources for multiple business units or
organizations
i ti
• Strives to optimize resource utilization and reduce power
consumption
• May also provide integrated metering and billing ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a approachto decouples the users of applications from the
At the highest level,
u ca ucloud s e
o D iceInnother words, users no longer install software in their local
applicationstthemselves.
e
environments and have
l no idea where their applications are really running. The concept of
n
Ercomputing
ncloud has been around for many decades, and it gained momentum with the
Juasuccess of the Internet.
Now, however, the right hardware and software are available to implement a high-
performance and scalable cloud infrastructure. Smaller organizations can eliminate their IT
infrastructure by leveraging a public cloud to run their applications. Alternatively, public clouds
may not be able to meet the capacity and security requirements of larger organizations,
which therefore
which, therefore, create and use their own private cloud infrastructure instead.
instead
It is critical for both public and private clouds to track the resource utilization of the services
that they host. Public clouds may need to bill customers, and private clouds may need to
cross-charge expenses to different business units. Both types of clouds may implement
service-level agreements that limit the resource utilization of certain services.

Oracle WebLogic Server 12c: Administration I 2 - 25


Aula Matriz SฺAฺSฺ

Self Service

• Is a core pillar of any good cloud platform


• Provides a simple, intuitive web interface
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Avoids creating IT tickets to provision resources


• Hides the underlying details of the infrastructure
• Limits the rights or resource usage of different organizational
units or applications
• Automates complex setup tasks
ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
A cloud computinguplatform s e tooffer a unified, intelligent interface for interacting with the
cua nshould
s t o D luse,
platform to configure, i ceand optimize infrastructure resources. Administrative self-service
r n e be able to manage and monitor resource supply, configuration, and utilization of
users should
ntheEcloud. Other users should be able to quickly provision, manage, and monitor their own
Juaresources in the cloud.

Oracle WebLogic Server 12c: Administration I 2 - 26


Aula Matriz SฺAฺSฺ

Infrastructure as a Service (IaaS)

• IaaS focuses on server, storage, and network virtualization


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

• Users of an IaaS cloud service:


– Provision new servers (VMs), storage, and networks as needed
– Are responsible for configuring and maintaining the VM guest
operating system, including the installation of other required
software

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a direct toaccess to the virtualized hardware infrastructure on which
An IaaS service gives u cuusers s e
n provision virtual machines (VMs) and deploy to them any
your cloud isto D Users
built. i c ecan
software
l
eofstheir choice. This also means that users are responsible for maintaining the entire
r n
E stack within their VMs. To deploy their applications, users must install, configure,
nsoftware
Juathe
and patch all the appropriate software, including the operating system. IaaS users also control
networks and storage devices to which their VMs are connected.

Oracle WebLogic Server 12c: Administration I 2 - 27


Aula Matriz SฺAฺSฺ

Platform as a Service (PaaS)

• PaaS services:
– Provide a complete platform to build, test, and deploy custom
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

applications
– May or may not expose the underlying VMs and server
software to users
– May target developers or business users
• A PaaS provider:
– Provisions the OS and server software for users e
– Often includes supporting services like databases r a bl
nsfe
– Offers
Off high-availability,
hi h il bilit security,
it andd t r a
maintenance features no n-
– May include various development tools s a
h a ) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to infrastructure from users. They expose a particular
PaaS services hide u cua ofnthe
more s ecloud
s t o Don which
software platform
l i ce to deploy custom applications. A database service would provide
users with
r n e the ability to create tables, import data, and so on. PaaS eliminates many of the
n E
installation and maintenance tasks associated with the platform and its underlying operating
J a
u system.

Oracle WebLogic Server 12c: Administration I 2 - 28


Aula Matriz SฺAฺSฺ

Java Cloud Service

• Is a self-service platform for Oracle middleware


• Enables users to rapidly:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Provision WebLogic Server, Coherence, and Traffic Director on


multiple VMs
– Scale
S l in i or outt off their
th i WebLogic
W bL i or Coherence
C h clusters
l t
– Back up or restore their environment
– Apply or roll back a patch
• Provides full access to the underlying guest OS and b le
middleware configuration f er a
an s
• Requires a relational database - t r
n on
• Offers a web UI and REST API sa
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to platform and infrastructure cloud solution for
cua nissaecomplete
Oracle Java ClouduService
s t o D and
building, deploying,
l i e
cmanaging Java EE applications. Use Java Cloud Service to rapidly
provision
r n ean application environment with Oracle WebLogic Server as the application
E Oracle Coherence as a caching and data grid tier, and Oracle Traffic Director as
container,
n
J a
u the software load balancer. All of these service components run on top of infrastructure
provided by Oracle Compute Cloud Service.
When provisioning a Java Cloud Service instance, you can choose the WebLogic Server
software edition and version, the CPU and memory capacity of the VMs, and the initial size of
your cluster. Also, with a single click in the JCS web interface, you can perform common
lifecycle operations on demand like starting and stopping the instance,
instance backing it up
up, and
scaling it out to meet new capacity requirements.
JCS provides users with full access and control over the underlying components that
comprise a service instance, including the VMs, the WebLogic domain, and the Traffic
Director load balancer configuration. You can administer the instance with familiar tools like
the WebLogic Server Administration Console, the Fusion Middleware Control, and the
WebLogic Scripting Tool.

Oracle WebLogic Server 12c: Administration I 2 - 29


Aula Matriz SฺAฺSฺ

JCS Instance

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

JCS Instance

VM WebLogic WebLogic WebLogic


Admin Server WebLogic WebLogic
Coherence
Traffic Director WebLogic
(optional) VM VM
(optional)
VM WebLogic VM VM
VM VM

ble
fe r a
Private
DBCS
t r ans
Network no
Instance
n-
s a
h a
) MDS
o m d e ฺ schema
ilฺc t Gu i (required)
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 2 - 30


Aula Matriz SฺAฺSฺ

Creating a JCS Instance


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

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 2 - 31


Aula Matriz SฺAฺSฺ

Java Cloud Service: Default Ports


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

Admin JCS Instance


VM
HTTPS:7002 WebLogic Admin 7001
Server
8001 WebLogic
WebLogic
W bL i 8001 WebLogic
HTTPS:8989 M
Managed
dSServer
8002 Managed Server

Private Network
Managed Server
8002 VM
VM
HTTPS:443
Load Balancer
Public Network

VM ble
End User
fe r a
t r ans
no Instance 1521 n- DBCS

s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e totoadministrators and end users will vary depending on the
The network channels
u cuavailable
n s
topology youto D iwhen e
e
you createds a
selected
brand
l c JCSyouinstance
new
created the JCS instance. In this first scenario, let’s say that
with multiple managed servers and with the load
r n
E option. As an administrator, you have remote access to the administration consoles
nbalancer
Juaby using HTTPS. To access the WebLogic or Fusion Middleware console, use port 7002, and
to access the load balancer console, use port 8989. End users access your applications by
using the default HTTPS port of the load balancer. After you have connected to one of these
public endpoints via SSH or HTTPS, you can access the remaining components of the
instance by using a private network. Managed servers listen on ports 8001 and 8002, with the
q g SSL.
latter requiring

Oracle WebLogic Server 12c: Administration I 2 - 32


Aula Matriz SฺAฺSฺ

Java Cloud Service: Default Domain Configuration


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

cluster
server_1 server_2 server_3

Data Sources Server Template


p JRF/ADF Deployments
p y

adminserver Node Manager Node Manager

Data Sources machine_2 machine_3


MDS
Schema Embedded LDAP ble
fe r a
Node Manager
t r ans
machine_1 nodomain n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a ethattohosts servers in this WebLogic domain is represented in
Each VM in your JCS u cuinstance
n s
D e
to first managed
the domain as
servern e
andsthe a
lic server.
machine. The first machine in a JCS domain always hosts the administration
The security realm for the domain uses an LDAP server
r
nthatEis embedded within the administration server. As you scale out the JCS instance,
Juaadditional machines and managed servers are added to the domain. These managed servers
are grouped together as a cluster and also inherit attributes from a shared server template. All
of the servers in the domain, including the administration server, connect to your database in
the Oracle cloud. This database connectivity is defined as a set of WebLogic data sources.

Oracle WebLogic Server 12c: Administration I 2 - 33


Aula Matriz SฺAฺSฺ

Quiz
Q
Which of the following statements are true about Node Manager?
a. Node manager is a separate process that accepts remote
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

commands to start, stop, or suspend servers on its machine.


b. It monitors server availability and can restart failed servers.
c. It can be used to submit remote command to a WebLogic
Server administrative server to modify domain configuration.
d. It can be used to migrate servers on a failed machine to
another machine. ble
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: a,b,d u cua nse to
WebLogics t o D Tool
Scripting l i ce(WLST) can be used to submit remote commands to modify domain
r n e All others are true
configuration
configuration. true.
n E
Jua

Oracle WebLogic Server 12c: Administration I 2 - 34


Aula Matriz SฺAฺSฺ

Quiz
Q
What is the minimum number of administrative servers in a
WebLogic domain?
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. 0
b. 1
c. 2
d. 3

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: b u cua nse to
s t
There is only ooneDadministrative
l i ce server in a WebLogic domain.
e
n Ern
Jua

Oracle WebLogic Server 12c: Administration I 2 - 35


Aula Matriz SฺAฺSฺ

Quiz
Q
What are the minimum requirements for using Fusion
Middleware Control?
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. An administration server must be defined.


b. An administration server and a managed server must be
d fi d
defined.
c. The domain must be configured to support Fusion Middleware
Control when created.
d. All of the above ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: c u cua nse to
t D domain,
o the i ce the Fusion Middleware Control must be enabled.
s
When creating
e l
E r n
a n
Ju

Oracle WebLogic Server 12c: Administration I 2 - 36


Aula Matriz SฺAฺSฺ

Summary

In this lesson, you should have learned how to:


• Define WebLogic Server terms─domain, server, and cluster
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Describe the difference between the administration server and


managed servers
• List WebLogic Server tools
• Describe Paas, IaaS, and Java Cloud Service
• Enumerate the features and functions of Java Cloud Service
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 2 - 37


Aula Matriz SฺAฺSฺ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

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

IInstalling
t lli and
dPPatching
t hi
WebLogic Server
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


• Determine supported configurations for WebLogic Server
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Install WebLogic Server


• Apply a patch to WebLogic Server

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 2


Aula Matriz SฺAฺSฺ

Determining Supported System Configurations

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


2. Download the System Requirements and Supported Platforms
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

spreadsheet for the version of FMW you plan to use.


3. Start on the “FMW on WLS - System” sheet. Find your
operating
ti system
t iin th
the “OS Version”
V i ” column.
l
– Which version of FMW? Which JDK? What DB and version?

JDK
Installation Version Processor
OS Version
Oracle FM
Vendor
JDK 32/64 Oracle
ble
Type supported Type 32/64 bit
Version
bit Database
fe r a
ALL 11gR1 X64 Oracle 64 Oracle 64 t r a
…ns
Linux 6 JDK
no n- Oracle
s a
1.7.0_02 11.2.0.1+
h
) eฺa +
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a ethere to are multiple rows for each version of an operating
On each spreadsheet u cu“sheet,”
s
system. In thet o D onicWLS
“FMW
l en - System” sheet, each row shows the operating system and its
version,
r n ethes version of FMW supported, which JDKs are supported, which Oracle databases
areE
n supported, and so on.
J u aNote 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
prod cts incl
products include
de Oracle Access Management
Management, Oracle Virt
Virtual
al Director
Directory, and others
others.

Oracle WebLogic Server 12c: Administration I 3 - 3


Aula Matriz SฺAฺSฺ

Ensuring Your System Meets Requirements

1. Ensure that your system meets the minimum requirements for


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

– At least a 1 GHz CPU


– Sufficient disk space (~3.9 GB for a complete installation)
— At installation,
i t ll ti 2
2.5
5 x 3.9
3 9 GB off ttemporary space iis needed.
d d
– Sufficient memory (1 GB of RAM is minimum, 2 GB is
recommended)
2. If using other FMW components, ensure that your system e
meets their added requirements: r a bl
sfe
– For example,
e ample Oracle SOA Suite
S ite requires
req ires a d
dual-core
al core processor
- t r an
1.5 GHz or better, 15 GB of disk space, and a minimum
n onof 2
sa
GB of physical memory with 4 GB of available memory.
ha ฺ
)
m ide
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 4


Aula Matriz SฺAฺSฺ

When Not All FMW Is the Same Version

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


Requirements and Supported Platforms spreadsheet for the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WebLogic Server version you plan to use.


2. Start on the “System” sheet. Find your operating system in the
OS Version
“OS Version” column.
column

Oracle
JDK JDK
Installation Version Processor OS FM Oracle
Vendor 32/64
Type Supported Type Version 32/64 Database
Version bit
ble
bit
fe r a
ALL 11gR1 X64 Oracle 64 Oracle JDK 64 Oracle
t r ans
Linux 6 1.7.0_02+
no n-
11.2.0.1+

a
sversion.
3. Use the “WLS - WebServer” sheet for the OHS h
) eฺa
o m
4. Use the “Id&Access” sheet for OID &ilฺOAM
a uid
c versions.
G
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a ethere to can be multiple rows for each version of an operating
On each spreadsheet
u cu“sheet,”
s
system. In the
t o“System”
l en each row shows the operating system and its version, the
D icsheet,
esWebLogic Server supported, which JDK is supported, which Oracle databases are
versionnof
r
n E
supported, and so on.
J u aNote 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


Aula Matriz SฺAฺSฺ

WebLogic Server Installers

Generic Complete installer for all platforms, Requires a 1.8 or better


installer including Linux and Windows. JDK
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Contains binaries, examples, and


similar components ~ 830MB

Quick installer g g installer that contains all


Lightweight Requires
q a 1.8 or better
the necessary artifacts to develop JDK
and test applications ~ 220MB

Supplemental Optional supplemental quick Must be installed after the


installer installer. Contains samples, quick installer
ble
examples, and other similar
fe r a
components
t r ans
Fusion Adds Fusion Middleware Control and Must be installed o n - the
after
Middleware Java Required Files (JRF) for generic or a n installers
quick
Infrastructure managing Multitenant domains with ha ฺs
installer multiple partitions
)
m ide
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to ways, including:
ua sein multiple
WebLogic Server is u cpackaged
• Generic t o D icThe
l
installer: en generic installer is a jar file packaged inside a .zip file and
r n etas s all
contains
co a binaries
b a es as well e as examples,
e a p es, sa
samples,
p es, aandd ot
other
e required
equ ed files.
es The e ge
generic
e c
E
n installer can be run interactively with and without a GUI, as well as silently. The generic
Jua installer file is approximately 830MB in size.
• Quick installer: The quick installer is targeted at developers and contains only those
files required for running and developing with WebLogic Server. The quick installer is
approximately 220MB in size.
• Supplemental installer: The supplemental installer contains samples, examples, and
other
th files
fil packaged
k d separately
t l from
f the
th quick
i k installer.
i t ll The Th supplemental
l t l iinstaller
t ll mustt
be run on top of or after the quick installer.
• Fusion Middleware Infrastructure installer: The Fusion Middleware Infrastructure
installer contains files and features for expanding a prior installation to include support
for ADF-based application and multitenant domains. Install the FMW infrastructure
installer after installing the quick or generic installers.
All WebLogic Server 12.2.1 installers require a 1.8 or better JDK.

Oracle WebLogic Server 12c: Administration I 3 - 6


Aula Matriz SฺAฺSฺ

WebLogic Server Generic Installer

• Is production focused
• Can be used on Linux, Windows, and others
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Requires pre-installed JDK 1.8_u40 or later


• Can be run silently or via GUI
• Contains:
– WebLogic Server
– Coherence
– Administrative tools ble
fe r a
– Database support
t r ans
– Examples
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tois a production-focused installer designed to be used with
cua installer
WebLogic Server generic
u s e
o
Linux, Windows,
t Dand other
l i c enoperating systems which support Java. The generic installer for
12.2.1n
r es Java JDK 1.8U40 or later. The installer can be used to install:
requires
n • E Core WebLogic Server runtimes and all required components
J u a
• Coherence: Coherence is an in-memory data management system for application
objects shared across multiple servers.
• Administrative tools include the administration console, the Configuration Wizard, the
Template Builder, WLDF, and WLST.
• Database support including third-party JDBC drivers and an evaluation Derby database.
The Apache Derby project is an open source relational database implemented entirely in
Java.
• Various examples. Including example applications for WebLogic Server, and
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 the 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


Aula Matriz SฺAฺSฺ

WebLogic Quick Installers

• Are development and testing focused


• Have a much smaller download and install footprint
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

(~220MB)
• Does not include a GUI interface
• Defaults to installing in current directory
• Includes quick and supplemental installer
– WebLogic Server core (runtime)
– Samples, Derby DB, and others ble
fe r a
• Are patchable via OPatch
t r ans
Full support for silent installation no n-
s a
$> .../jdk1.8.0_40/bin/java -d64 h
) eฺ a
-jar fmw_12.2.1.0.0_wls_quick.jar
o m
ORACLE_HOME=/opt/oracle/
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua searetoa set of two installers focused on developers. The
The WebLogic Quick u cinstallers
installers areto
both
l i c en as .zip files, which contain executable jar files. As with the
D downloadable
generic
r n es a JDK 1.8u40 or later is required. The two installers are:
installer,
n • E Quick installer: The quick installer is a lightweight installer that contains all the
J u a necessary artifacts to develop and test Java applications. The quick installer is run
directly from the command line. Installations performed with the quick installer can be
patched using the standard Oracle patching tool, OPatch. This version of Oracle
WebLogic Server and the quick installer requires JDK 1.8 version. Ensure that you have
the proper JDK version installed and ready for use before starting. The quick installer file
name is fmw_12.2.1.0.0_wls_quick.jar
fmw 12.2.1.0.0 wls quick.jar
• Supplemental quick installer: The supplemental quick installer is a lightweight installer
that contains all the necessary artifacts to develop and test sample Java applications on
Oracle WebLogic Server. The optional supplemental quick installer has components
such as the sample applications and Administration Console additional language help
files. The supplemental quick installer file name is
fmw_12.2.1.0.0_wls_supplemental_quick.jar

Oracle WebLogic Server 12c: Administration I 3 - 8


Aula Matriz SฺAฺSฺ

Fusion Middleware Infrastructure Installer

• Is a supplemental installer
• Is required by many layered products, such as Enterprise
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Manager
• Adds support for Multitenant domains
• Adds support for ADF and other components
• Is patchable via OPatch
• Must be installed into an existing WebLogic Server installation
ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to installer is technically a supplemental installer, but is
The Fusion Middleware u cuaInfrastructure
n s e
often requiredt o Dlayered
for i c eproducts such as Enterprise Manager. The FMW Infrastructure
installer e s
installs into
l
an existing WebLogic Server installation directory a variety of
E r n
ncomponents, including Fusion Middleware Control and Java Required Files (JRF), for
Juamanaging Multitenant domains with multiple partitions.

Oracle WebLogic Server 12c: Administration I 3 - 9


Aula Matriz SฺAฺSฺ

What Is Oracle Coherence?

Oracle Coherence:
• Provides a distributed, in-memory data caching solution
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Offers high performance and scalability


• Is based on a cluster of cache servers
• Automatically distributes (partitions) cached data across the
Coherence cluster
• Can be installed and managed independently or as part of a
WebLogic Server domain ble
fe r a
t r ans
no n-
s a
Get data Cache data
h a
) eฺ Cluster
Applications Coherence
m
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cuaofnOracle
One of the primaryuuses s e toCoherence is to cluster an application’s data. This means
s t oD
that the objects and data
l i cethat an application delegates to Coherence clusters are
r n e available to and accessible by all servers in the application cluster. None of the
automatically
E or data are lost in the event of server failure. Coherence thereby solves many of the
objects
n
J a
u 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.
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
h andd iincorporate
t CCoherence*Web
h *W b ffor session
i management. t

Oracle WebLogic Server 12c: Administration I 3 - 10


Aula Matriz SฺAฺSฺ

FMW Installation Flow

Installing Oracle Fusion Middleware products generally involves


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

1. Install the JDK.


2. Create the database schemas
required
i db by th
the FMW products
d t bbeing
i iinstalled
t ll d b
by using
i ththe
Oracle Repository Creation Utility (RCU).
3. Install Oracle WebLogic Server.
4. Install other Oracle Fusion Middleware products. ble
fe r a
t r ans
Configure
Install Oracle n o n-
Start Install JDK
FMW product
WebLogic s a Install FMW
End
schemas by
using RCU
Server h
) eฺa products

o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tometadata for some Oracle Fusion Middleware
cua contains
The Metadata Repository
u s e
n WebCenter. It can also contain metadata about the
components, t forD
o example,i c eOracle
l
es of some Oracle Fusion Middleware components. Developers can also write
configuration
r n
E so that it can hold metadata for their own applications. The Metadata Repository can be
ncode
Juadatabase 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.
Note: RCU requires an installed JDK in order to execute. If a JDK is installed on the machine
by default, then you can install a different JDK after running RCU.

Oracle WebLogic Server 12c: Administration I 3 - 11


Aula Matriz SฺAฺSฺ

WebLogic Server Installation Modes

• Graphical:
– An interactive, GUI-based method of installation
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Silent:
– A noninteractive, command-line method of installation
– Request silent mode with the -silent option
– Installation configuration information must be placed in a file
and referred to with the -responseFile option

ble
$> java -d64 -jar wls_generic.jar fe r a
-silent
silent
t r ans
on-
-responseFile /path/file.rsp
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cufileawith
To create a response
u n s e
the
tcorrect format, install in graphical mode. On the “Installation
D
to click e
Summary” screen,
e s licthe Save button, which saves your responses in a response file.
rn
nE
Jua

Oracle WebLogic Server 12c: Administration I 3 - 12


Aula Matriz SฺAฺSฺ

Installing WebLogic Server on Linux


Graphical Mode
1. Determine that your system is supported and meets
requirements.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2. Log in as the user you want to use for installation. (Do not use
root.)
3 D
3. Download
l d th
the appropriate
i t JDK tarball
t b ll file
fil and
d th
the W
WebLogic
bL i
Server generic installer.
4. Install the JDK.
a. Create a directory for the JDK ble
b. Extract the JDK archive file into the new JDK directory. fe r a
t r ans
$> mkdir /u01/app/fmw/jdk
no n-
$> s a
mv /download/name.tar.gz /u01/app/fmw/name.tar.gz
$> cd /u01/app/fmw/jdk h a
) eฺ
$> tar -zxvf name.tar.gz c o m id
a ilฺ t Gu
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cua where
The name of the directory
u n s e tfiles have been downloaded can be anything.
D
to file name e
The JDK archive
e s lic changes depending upon the version of the JDK downloaded.
You rn put the JDK in the directory of your choice.
Ecan choice
n
uaIn the tar command, the options are:
J
• 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 - 13


Aula Matriz SฺAฺSฺ

Installing WebLogic Server on Linux


Graphical Mode
5. Run the WebLogic Server generic installer.
a. Set file permissions.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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
$> export PATH=$JAVA_HOME/bin:$PATH
$> cd /download
ble
$> java -jar fmw_12.2.1.0.0_wls.jar
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a theefiletomode creation mask to effect the permissions of newly
The umask command u cusetsn s
andDdirectories.
created filesto e
permissione sof
lic ---Itand
is set to 027, which results in new files having the default
new directories having the default permission of rwx r-x
r n rw- r--
n---.E
JuaThe -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 - 14


Aula Matriz SฺAฺSฺ

Installing WebLogic Server on Linux


Graphical Mode
6. On the Welcome screen 7. On the Installation Location
click Next. screen, select a location and
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

click Next.

ble
fe r a
t r ans
If this is the first Oracle product
no n-
installed, the Specify Oracle Inventory
s a
Directory screen appears before the
Welcome screen. Enter h
) eฺa
<MW_HOME>/oraInventory and
o m
click Next.
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
ua se(oraInventory)
The Oracle Inventoryu cdirectory
n stores an inventory of all Oracle products
D
o system. e
installed on tthe
e s licIt is required and shared by all Oracle products.
rn Middleware documentation uses /home/Oracle/Middleware as the Fusion
The Fusion
E
uan
Middleware “Oracle Home” directory. This is an example, and the location of the installation is
J up to you.

Oracle WebLogic Server 12c: Administration I 3 - 15


Aula Matriz SฺAฺSฺ

Installing WebLogic Server on Linux


Graphical Mode
8. On the Installation Type 9. On the Prerequisite Check
screen, select a type and screen, at 100% success,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

click Next. click Next.

Choose
“complete”
to get
sample
code.

ble
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
The choices for theutype s e to are:
cuaofninstallation
• WebLogic
s t o DServer
l i e
cInstallation: WebLogic Server, Coherence, Web 2.0 Pub-Sub
rn e
Server,
Se e , WebLogic
eb og c SC
SCA (Sp
(Spring),
g), WebLogic
eb og c client
c e t Jars,
Ja s, Administrative
d st at e tools,
too s, tthird-party
d pa ty
E
uan
party JDBC drivers, the Derby evaluation database, open source tools (Jackson, Jersey,
J 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 third-party JDBC drivers.

Oracle WebLogic Server 12c: Administration I 3 - 16


Aula Matriz SฺAฺSฺ

Installing WebLogic Server on Linux


Graphical Mode
10. On the Security Updates 11. On the Installation Summary
screen, enter a support screen, click Install.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

email and password, and


click Next.

ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to not enter security update information, because you do
cua nyou
In the practice environment,
u s e will
s t o D lyour
not want to associate i ce email with a classroom installation.
r n e
nE
Jua

Oracle WebLogic Server 12c: Administration I 3 - 17


Aula Matriz SฺAฺSฺ

Installing WebLogic Server on Linux


Graphical Mode
12.On the Installation 13. On the Installation Complete
Progress screen, at 100%, screen, click Finish.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

click Next.

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 18


Aula Matriz SฺAฺSฺ

Installation Problems

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


system meets requirements and lists any issues.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– If you have determined your system is supported ahead of time,


there should be no problems.
• If the generic installer does not come up
up, ensure that you
have set the JAVA_HOME environment variable to the correct
JDK and added the bin directory under it to the PATH.
• If you are having problems installing, create a verbose log file e
during the installation with the -logFile option: r a bl
nsfe
t r a
no n-
$> java -d64 -jar wls_generic.jar -logFile /path/fn.log s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 19


Aula Matriz SฺAฺSฺ

Sample Installation Directory Structure

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

 u01/app Oracle base

 db12c Database home

 fmw Middl
Middleware h
home

 coherence Coherence home

 jdk1.8.0_60 Java home


ble
 oracle_common Oracle common home fe r a
t r ans
 web Web home (OHS)
no n-
 wlserver WebLogic Server home s a
) eฺh a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
uaOracle to
When you install the
u cfirst n s e Fusion Middleware product in a system, a directory referred
o
to as middleware
t Dhomeicisecreated. (In the practice environment, it is the fmw directory.) The
e
path tonthis
l
sdirectory and its name is determined by the person installing the product.
n Er middleware home, Oracle home directories are created for each FMW product that is
Within
J ua 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 - 20


Aula Matriz SฺAฺSฺ

Uninstalling WebLogic Server

1. Shut down any running


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

2. Run the uninstall script:


<MW_HOME>/ oui/bin/
deinstall sh
deinstall.sh.
3. Go through the screens,
selecting the components
to uninstall. By default, all e
are selected. r a bl
nsfe
t r a
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to be started by using the Windows Start menu: Start >
cua ncan
In Windows, the uninstaller
u s ealso
Programs >to D WebLogic
Oracle i ce > Uninstall Oracle WebLogic.
s l
e the uninstaller script, if your system supports a graphical user interface, it starts
Whenrn running
E
nin graphical mode. If not, it starts in console mode.
JuaYou 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 - 21


Aula Matriz SฺAฺSฺ

Applying Patches by Using OPatch

• To apply a patch, perform the following steps:


a. Contact Oracle Support.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

b. Check for existing patches.


c. Obtain the necessary patch from Oracle Support.
d. Determine the Oracle
O home.
e. Read the patch README file.
f. Apply the patch by using OPatch.
g. Based on the patch README file, perform postinstallation
ble
steps. fe r a
• OPatch example: t r ans
no an n-
– You can use the OPatch rollback command toaremove
existing patch. has ) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o for Windows) is found in the OPatch directory under
cua(ornbatch
The OPatch executable
u s e tfile
t o D lice
<MIDDLEWARE_HOME>.
s
r n ethe patch, you can contact your Oracle Support representative, or you can go to My
To obtain
E Support (formerly OracleMetaLink) at http://support.oracle.com/.
nOracle
JuaIf 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 - 22


Aula Matriz SฺAฺSฺ

Zero Down Time Patching

• Is designed to eliminate downtime due to updates


• Automates the rollout of updates to clusters or domains
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Shields users when updates are in progress


• Can update applications, infrastructure, or JVMs
• Works with Oracle Traffic Director to:
– Take node down
– Apply patch 1. Bring instance down
– Restart node 2. Apply Patch ble
OTD routes traffic
to running instances OTD 3. Restart
fe r a
t r ans
no n-
a
s WLS
WLS WLS) ha
Instance o m ideฺ Instance
Instance
c

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
Zero Down Time (ZDT)u cuaPatching
n s e tallows the rollout of distributed patches to multiple clusters
D
todomain
or to an entire e
c a single command, all without causing any service outages or loss
of sessione s
data for
liwith
end users. ZDT patching takes what was once a tedious and time-
E r n
consuming task and replaces it with a consistent, efficient, and resilient automated process.
a n
u ZDT Patching automates the rollout of out-of-place patching or updates across a domain,
J while allowing your applications to continue servicing requests. After defining a patching
strategy, use either WLST or the WebLogic Server Administration Console to roll out updates
across some or all of the servers in a domain.
Although WebLogic Server has supported rolling upgrades since version 9.2, the process has
always been manual
manual. Automating this process drastically reduces the amount of human
involvement required and can verify the input that is given before making any changes. This
results in huge impacts to patching consistency and reliability.
ZDT is resilient in that it can retry steps when there are errors, pause for problem resolution
and resume where it left off, or if desired, revert the entire environment back to its original
state.
ZDT Patching automates this process by using workflows that you define. You can patch or
update
d t any number b off nodesd iin a ddomain
i with
ith littl
little or no manuall iintervention.
t ti Ch
Changes are
rolled out to one node at a time, allowing a load balancer such as Oracle Traffic Director to
redirect incoming traffic to the remaining nodes until the node has been updated.

Oracle WebLogic Server 12c: Administration I 3 - 23


Aula Matriz SฺAฺSฺ

ZDT Patching Workflows

• Workflows define what patch operations can be performed.


• Workflows are combinations of tasks.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Tasks include:
– Moving servers to a patched Oracle Home: Swap a WLS node
to a patched Oracle home
– Updating to a new Java version: Update the JDK
– Deploying updated applications: Update an application
– Performing a rolling restart of servers: Restart application
ble
instances fe r a
t r ans
no n-
a
WLS
V1.0 V1.1 1.8 1.8 Home Home ) h
asInstance
u40 u51 o2m d ฺ
eRestart
1
ฺ c i
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a eoftoworkflows. Workflows are simply the set of tasks that are
cuconcept
ZDT Patching usesuthe
n s
to D e
normally done
e s during
lic
an update operation. Examples of tasks include:

E nep oy app
• rDeploy application:
cat o Replace
ep ace a an eexisting
st g app
application
cat o witht a
an updated version
e so

J uan• Java: Replace the current Java version with a newer version
• Oracle Home: Replace the current version of a Oracle Home with an updated version of
a java home
• Restart Servers: Restart server instances

Oracle WebLogic Server 12c: Administration I 3 - 24


Aula Matriz SฺAฺSฺ

Zero Down Time Patching


Application Patching Overview
ZDT Application patching:
• Must meet domain requirements
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Must follow a prescribed sequence of steps


3
1 Create JSON {"applications":[ {
Create describing the update "applicationName":"MyApp"
updated , "patchedLocation":"/. .
application . /MyAppv2.war",
"backupLocation": "/. . .
/MyAppv1.war" }
Administration ]}
ble
Server
fe r a
2
tra ns
Stage on
$> java weblogic.WLST
n -
admin server
Can also be copied
. . .
a no
to instances by hand ha ฺ s myDomain
rolloutApplication
(not staged) 4 )
m ide
Using WLST or the
l ฺ c o
Admin
u
outi the updateG
console, roll a
m
g den t
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to forms, one of which is application patching. Before
cua ntakes
Zero Down Time Patching
u s e many
o D licthe
patching an tapplication,
s
e cluster must meet certain minimum requirements, including:
n
• rThe e
e do
domain
a mustust be ddistributed
st buted ac
across
oss aall nodes
odes a and d must
ust be sto
stored
ed in tthe
e sa
same
e
E
uan
location on all nodes
J • Oracle Home must be in the same location on all nodes
• Node Manager must be running on all nodes
• All Managed Servers in all clusters that will be included in the rollout must be running
In general, perform the following to update an application:
1 Create an updated war file
1. file.
2. Stage the updated war to the administration server. Note that you can also copy the file
to those hosts to be updated (consider not staged).
3. Create a JSON file which describes the update. Multiple applications can be included in
a single JSON update.
4. Using WLST or the WebLogic Administration console, start the update workflow.

Oracle WebLogic Server 12c: Administration I 3 - 25


Aula Matriz SฺAฺSฺ

Quiz
Q
The name of the WebLogic home directory is _____________.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a.wlserver_12.2
b.wlserver_12c
c.wlserver_12.2.1
d.wlserver

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: d u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 26


Aula Matriz SฺAฺSฺ

Quiz
Q
The ZIP installer is OK to use for production installation in a
32-bit system.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. True
b. False

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: b u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 27


Aula Matriz SฺAฺSฺ

Summary

In this lesson, you should have learned how to:


• Determine supported configurations for WebLogic Server
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Install WebLogic Server


• Apply a patch to WebLogic Server

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 28


Aula Matriz SฺAฺSฺ

Practice 3-1 Overview: Installing WebLogic Server

This practice covers the following topics:


• Installing the JDK
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Installing WebLogic Server

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 29


Aula Matriz SฺAฺSฺ

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ฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 3 - 30


Aula Matriz SฺAฺSฺ

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

Creating Domains
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


• Describe a domain’s file system
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• 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
• Describe WebLogic 12c Multitenancy concepts
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 2


Aula Matriz SฺAฺSฺ

Domain Planning Questions

• How many domains?


– A domain is an arbitrary, administrative boundary.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Possible domain boundaries include:


— Business unit
— Cost center
— Data center location
— Administrator or administrative group
— Application or application type (for example, one domain for end-
user functions and another for back-end accounting)
a b le
Size (breaking up a large domain into smaller ones to manage sfe
r

n
them more efficiently) -tra on
a n
h a s
m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 3


Aula Matriz SฺAฺSฺ

Domain Planning Questions

• For each domain:


– What other FMW products are running in the domain?
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

— What extra requirements do they impose?


— See the Fusion Middleware Enterprise Deployment Guides which
provide p
p product installation recommendations.
– What applications are running in the domain?
— Do we need them to be highly available?
— Will we be using WebLogic clustering or Coherence?
— Do we need a database?
ble
— Do we need a highly available database like Oracle RAC?
fe r a
— Do our applications
D li ti use JMS?
t r ans
Do our applications contain EJBs? o n-
an

s
ha ฺ
)
m ide
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 4


Aula Matriz SฺAฺSฺ

Domain Planning Questions

– What is the topology?


How many computers?
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

— 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 hardware
load balancer?

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 5


Aula Matriz SฺAฺSฺ

Virtual IP Address and Virtual Host Name

• Virtual IP
– A network interface card typically binds to a single IP address.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

It can be set up to listen on extra addresses. These are called


virtual IP (VIP) addresses.
– Use VIP addresses when defining WebLogic Servers
Servers.
— If the server must be brought up on new hardware, the VIP address
can be moved over to the new hardware.
• Virtual host name
– A host name is the primary name of a machine in the Domain bl e
fe r a
y
Name System ((DNS).
) Other ((virtual)) host names can be n s
assigned to the same machine. n - tra
– Use a virtual host name for each component in FMW. a noThat
way, if a component needs to be relocated, h a
no
sURLs used to
m ) eฺ
access that component must change. ฺc o id
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tIPo address that belongs to the same subnet as the host’s
A virtual IP address
u cisuanaunused
s e
o
primary IP address.
t l en to a host manually and Oracle WebLogic managed servers
D It isicassigned
r n es to listen on this virtual IP address rather than a physical IP address. In the
are configured
E of failure of the machine where the IP address is assigned, the virtual IP address is
event
n
J a
u 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 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
hi along
l with
ith th
the componentt bibinaries
i andd configurations.
fi ti Th
Then, whatever
h t componentst
were running on the failed hardware are brought up on the new machine.

Oracle WebLogic Server 12c: Administration I 4 - 6


Aula Matriz SฺAฺSฺ

Domain Mode: Development

• Development mode
– It allows applications to be auto-deployed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– 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.
server
– The admin console auto-locks the configuration by default.
– Often no managed servers are defined in the domain.
The admin server handles administration and runs applications.

ble
fe r a
M hi
Machine Development
t r ans
no n-
Dev Domain
s a
Admin h
) eฺ a
Server o m
Other
a
c
ilฺDB G uid
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to server watches the directory in the domain called
a administration
In development mode,
u cuthe s e
autodeploy.t o IfD
you move
l i c enan application archive file into that directory, the administration
servern
r es it, deploys that application to itself, and starts the application servicing
detects
E
nrequests.
JuaYou 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


Aula Matriz SฺAฺSฺ

Domain Mode: Production

• Production mode Production


Machine
– Auto-deploy is disabled.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Prod Domain
– You should not use the
Oracle Admin
demo certificates for SSL. DB Server
– You are prompted for a
username and password
Node Machine Node Machine
to start (or stop) servers. Mgr Mgr

– The admin console does


not allow auto-locking of
Prod Domain Prod Domain
ble
Cluster fe r a
g
the configuration.
Server Server t r ans
no n-
Server a
s Server
h
) eฺa
o m
ilฺc t Guid
Server Server
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuashould
Note that a test domain
u s e mirror production as closely as possible. Sometimes fewer
n data in the test database, and so on.
o Dthereiciseless
servers are tused,
es l
E r n
u a n
J

Oracle WebLogic Server 12c: Administration I 4 - 8


Aula Matriz SฺAฺSฺ

Domain Creation Tools

• The Configuration Wizard: Is the graphical domain creation


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

• WebLogic Scripting Tool (WLST): Can create domains


interactively or by running a WLST script
• Pack
P k and d unpack k utilities:
tiliti A used
Are d tto copy an existing
i ti
domain to another machine

ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Note that console u cuaof ntheseConfiguration
mode Wizard no longer exists. To create domains from
the command D e
toline, uselica WLST script.
e s
Ern that
Also note
ndirectories
there is a Configuration Wizard script under the WebLogic Server installation
here: <MW_HOME>/wlserver/common/bin. However, that script just calls the
Juaone 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
i d code.
d
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


Aula Matriz SฺAฺSฺ

Domains Are Created from Templates

• Domains are created from domain templates.


– Domain templates based on FMW products are supplied with
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

those products.
– You can create custom domain templates by using the
Template Builder tool
tool.
• Domains can be extended with extension templates.
– Extension templates based on FMW products are supplied with
those products.
– You can create custom extension templates by using the a b le
Template Builder tool
tool. s f er
an - tr
• The Template Builder graphical tool is found at: n o n
– <MW_HOME>/oracle_common/common/bin/ s a
h a
config_builder.sh m) eฺ o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Note that console u cuaof ntheseConfiguration
mode Wizard no longer exists. To create domains from
the command D e
toline, uselica WLST script.
e s
Ern that
Also note
ndirectories
there is a Configuration Wizard script under the WebLogic Server installation
at <MW_HOME>/wlserver/common/bin. However, that script just calls the one
Juaunder 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
i d code.
d
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 - 10


Aula Matriz SฺAฺSฺ

Creating Domains

domain create new


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

Configuration
extension Wizard extend existing

Domain
input for extension 

input 
 ble
Template  fe r a
t r ans
no n-
Domain a
create input s
(domain or extension)
Template
Builder ) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cuabynusing
Domains can be created
u s e tothe Configuration Wizard, which guides you through the
s t o Dprocess.
domain creation
l i ceIt starts with either a template (a JAR file) or with built-in templates
based noneproducts. When you start the Configuration Wizard, it asks whether you want to
r
E a new domain or extend an existing domain. You create a new domain with a domain
create
a n
u template or prebuilt templates based on products selected from a list. You extend a domain
J 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
templates, for creating new domains,
domains or extension templates
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


Aula Matriz SฺAฺSฺ

Where to Place the Domain

Each computer that has WebLogic Servers running on it will have


a domain directory.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The administration server domain directory is created by the


Configuration Wizard.
– It is
i a best
b t practice
ti tot place
l the
th directory
di t outside
t id th
the iinstallation
t ll ti
directories.
— This separates the product from your domain, which makes
product upgrades and patching easier.
ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e tServer o
All computers thatu cuWebLogic
run
n s have a domain directory.
• Do notto
D c e
place thelidomain directory under the product installation directories, even though
n e
trthat
at
s
is
s the
t e default.
de au t This
s sepa
separates
ates the
t e product
p oduct from
o you
your do
domain,
a ,a and
d sshould
ou d make
a e
E
uan
product upgrades and patching go more smoothly.
J • 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


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard


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

Run the configuration wizard


script. ble
fe r a
1. Select Create a new
domain and enter a t r ans
domain location. Click
no n-
Next.
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to the domain files in the Domain Location. Oracle
cua nyou
When you create audomain, s e place
recommends
s t oyouDdo not
l i ceplace a domain under the installation directories.
Chooser n eUpdate an existing domain to extend a domain. In this case, the Domain Location is
ntheElocation of a domain that already exists.
Jua

Oracle WebLogic Server 12c: Administration I 4 - 13


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard


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

2. The Basic WebLogic e


Server Domain r a bl
template is preselected. nsfe
t r a
Click Next.
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua seCategories to
The drop-down listuofcTemplate allows the list of templates to be shorter. By
D e n
e
Templates. s to
default All Templates
liisc selected. The other choices are Oracle and Uncategorized
Ernthe Create Domain Using Product Templates option is selected, the Basic
nWhen
JuaWebLogic 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


Aula Matriz SฺAฺSฺ

• 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 g Advanced Web Services for JAX-WS Extension: It adds the functionality y
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
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
advanced web services using JMS.
ble
Depending upon the installer, there can be other templates listed.
fe r a
If you want to base a domain on a custom template
template, select Create Domain Using Custom
t r ans
Template and enter the Template Location.
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 15


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard


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

3. Enter account
information for the
WebLogic Server ble
administrator. Click fe r a
Next. t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 16


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard


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

ble
fe r a
t r ans
4. Select Production no n-
s a
mode. Select a JDK.
h a
) eฺ
Click Next. m
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sisethetoone used to install WebLogic Server by using the generic
The JDK selected u bycdefault
o D a different
installer. To tselect
l i c en JDK, select Other JDK Location and enter its location.
r n es
nE
Jua

Oracle WebLogic Server 12c: Administration I 4 - 17


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard


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

Which subsequent
screens display
depend upon the
selections here. ble
fe r a
5. Select elements to
t r ans
configure now.
Click Next. no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
In the slide, Node u cua nissnot
Manager e tselected. It is configured later. If it is selected, the Node
D e
to isLocation,
Manager screen
Domain, e s
Custom
lic or Manual
displayed, which allows you to select the Node Manager Type (Per
Node Manager Setup), the Node Manager Home (if
r n
E Location is selected), and the Node Manager Credentials (Username, Password, and
Custom
a n
u Confirm Password). The Node Manager credentials do not have to match the main WebLogic
J Server administrator credentials.
More information about Node Manager is provided in the lesson titled “Node Manager.”

Oracle WebLogic Server 12c: Administration I 4 - 18


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard


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

6. On the Admin Server


ble
screen, enter its name,
fe r a
Listen Address,, Listen
Port, and if SSL is t r ans
enabled, the SSL Listen no n-
Port. Click Next. s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua yousmust toalso enter the SSL Listen Port. It cannot be the same as
If you select Enable
u cSSL, e
o
the Listen Port.
t D icen
e s l
rn
nE
Jua

Oracle WebLogic Server 12c: Administration I 4 - 19


Aula Matriz SฺAฺSฺ

Admin Server Listen Address

• By default, the Listen Address field for the administration


server is “All Local Addresses.”
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– This means the server binds to all available IP addresses on


the machine.
– If the Listen Address is left blank,
blank the effect is the same as
choosing “All Local Addresses.”
• Another drop-down option is “localhost”
– This is not a good option, since only processes that reside on
this machine (local processes) can connect to this server. ble
fe r a
• Best practice: Enter a virtual IP address or virtual host name
t r ans
for the Listen Address. o n -
n a
a s
m ) h eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 20


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

7. On the Managed Servers screen:


a. Click Add.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

b. Enter the server’s name, listen address, port, and if SSL is


enabled, the SSL Listen Port.
c Do this for each one
c. one.
d. Click Next.

ble
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to server, you must also enter the SSL Listen Port. The
uaon asemanaged
If you select Enableu cSSL
SSL Listen Port
t o Dcannoticbeenthe same as the Listen Port.
e s l
rn
nE
Jua

Oracle WebLogic Server 12c: Administration I 4 - 21


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

8. On the Clusters screen:


a. Click Add.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

b. Enter the cluster’s name and address (optional).


c. Do this for each cluster.
d. C
Click Next.

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a ineentityto and stateless Enterprise JavaBeans to construct the
The Cluster Address u cisuused s
o
host name portion
t D of request
l i c en URLs.
n s
eexplicitly
r
You can define the cluster address when you configure the cluster; otherwise,
E Server dynamically
nWebLogic generates the cluster address for each new request. Allowing
JuaWebLogic 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


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

9. On the Assign Servers


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

a. Select a cluster.
b. Select a server.
c. Cli k th
Click the right
i ht arrow.
d. Repeat as needed.
e. Do this for each cluster.
f. Click Next. e
r a bl
nsfe
t r a
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 23


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

10.On the Machines screen:


a. Click the proper tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

b. Click Add.
c. Enter the Name, Node Manager Listen Address, and Port.
d. Do this for
f each machine.
e. Click Next.

ble
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cua ntheseCoherence
The wizard did notudisplay Clusters screen because Coherence was not
D e
to underliTemplates.
selected earlier c
e s
n Ern ListentabPort.
The Machine
Manager
only has three columns: Name, Node Manager Listen Address, and Node

J ua 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
fi ld are:
fields
• 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 UID: The UID

Oracle WebLogic Server 12c: Administration I 4 - 24


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

11.On the Assign Servers to


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

a. Select a machine.
b. Select a server.
c. Cli k th
Click the right
i ht arrow.
d. Repeat as needed.
e. Do this for each machine.
f. Click Next. e
r a bl
nsfe
t r a
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 25


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

12. On the Configuration Summary screen, review the


configuration and click Create.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 26


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

13. On the Configuration Progress screen, when the progress


bar reaches 100%, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 27


Aula Matriz SฺAฺSฺ

Creating a Domain with the Configuration Wizard

14. On the Configuration Success screen, click Finish.


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

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 28


Aula Matriz SฺAฺSฺ

Domain File Structure


Directory Description
 domain-name The name of this directory is the name of the domain.
 bin Scripts for starting and stopping the servers in the domain
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

 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
 pending Domain configuration changes that have been saved but not
yet activated are stored here temporarily.
security Domain-wide security-related files ble
fe r a
 servers One subdirectory for each server in the domain
t r ans
 server1 The server directory for the server of the same name -
n o n
 data Data for internal LDAP, Node Manager, and a saved
diagnostics a s
 logs Server log files m ) h eฺ
o uid
ilฺforc deployed
 stage
m ent G
a
Default staging directory applications
g
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nunder
There are more directories
u s e taodomain than those listed in the slide.
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 29


Aula Matriz SฺAฺSฺ

Creating a Domain to Support FMW Components

Domain templates are supplied when certain FMW components


are installed, such as Oracle SOA Suite.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• If you add another FMW component, extend the domain with


that product’s extension template.

Existing Domain Template Components that Can Be Added/Registered

Oracle SOA Suite Any other Oracle SOA Suite component


Any Oracle WebCenter component
Any Web Tier component ble
fe r a
Oracle Identity Management Other Identity Management components
t r ans
Any Web Tier component
no n-
a
Oracle Portal, Oracle Reports, Any of these components
Oracle Forms Services, Oracle Any Web Tier component) h
as
Business Intelligence Discover
c o m ideฺ

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tois created, it is created with a template. Usually that
cua domain
When a WebLogicuServer s e
o D based.
template is product
t l i c enIn other words, it is the one that supports a particular component,
such asn s SOA Suite. If you want to add other Fusion Middleware components to that
eOracle
r
E such as Oracle WebCenter, you extend the domain by using an extension template
domain,
a n
u for the new component that you want to add. When you extend a domain, the domain must be
J 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
sign on and authentication in a multiple-system
multiple system identity network),
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
suite, it can be extended with other products in that suite
suite.

Oracle WebLogic Server 12c: Administration I 4 - 30


Aula Matriz SฺAฺSฺ

The Domain on Other Hardware

Remember, each computer that has instances of WebLogic


Server running on it must have a domain directory.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The administration server domain directory is created by the


Configuration Wizard.
• To
T create t the
th domain
d i directory
di t on other
th computerst (f
(for
managed servers), use the pack utility to create a managed
server template. Move the managed server template JAR file
to the other computer, and then use the unpack utility.
a b le
• It is a best practice to place the domain directory in the same fer
l
location
ti on allll computers
t th
thatt run th
thatt d i ’ servers.-tran
domain’s
s
n on
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e tServer o
All computers thatu cuWebLogic
run
n s will have a domain directory.
• The main
D e
to domainlicdirectory (for the administration server) will be created by the
e s
E rn
Configuration
Co gu at o Wizard.
ad

J uan• 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
<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 - 31


Aula Matriz SฺAฺSฺ

Creating the Domain Archive: Pack

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


with the managed option.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

$> cd <MW_HOME>/oracle_common/common/bin
$> ./pack.sh -domain=domain
domain=domain_path/domain_name
path/domain name
-template=name.jar
-template_name=somename
-managed=true

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tooptions for the pack.sh script.
cuaavailable
Note that there areuother
n s e
t o DOptional,
i c eSpecifies
• managed:
e s l whether the template is to be used to create Managed
E rn
Servers
Se e s o
on remote
e ote machines.
ac es Thee de
default
au t is
s false.When
a se e tthis
s pa
parameter
a ete is
s set to ttrue,
ue, a

uan
Managed Server template is created that contains a minimal set of files, including
J SerializedSystemIni.dat and nm_password.properties. It also includes a
domain.properties file that is unique to the Managed Server template.Applications and
certain application initialization files are not included.The resulting template can be used
to create Managed Servers on remote machines.

Oracle WebLogic Server 12c: Administration I 4 - 32


Aula Matriz SฺAฺSฺ

Using the Domain Archive: Unpack

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


will run. (The WebLogic Server product must already be
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

installed there.)
3. Before running the unpack.sh script on that machine, create
the directory in which to place the domain
domain. (In the example
below, it is called domain_path.)
4. Run the unpack.sh script:

ble
fe r a
$> cd <MW_HOME>/oracle_common/common/bin
$> ./unpack.sh -domain=domain_path/domain_name t r ans
o n-
an
-template=pathtojar/name.jar

ha ฺs
)
m ide
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tooptions for the unpack.sh script.
cuaavailable
Note that there areuother s e
t o D icen
e s l
n Ern
J ua

Oracle WebLogic Server 12c: Administration I 4 - 33


Aula Matriz SฺAฺSฺ

What Is WebLogic Server 12c Multitenancy?

A Shareable Application Infrastructure whereby:


• Multiple tenants share a single WebLogic Domain
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Using separate Resource Configuration


• And isolated Runtimes
Apps

Apps Apps Resources

Resources Resources WebLogic

WebLogic WebLogic
ble
Apps
fe r a
Apps Apps R
Resources
t r ans
Resources Resources no n-
s a
h
) eฺa
o m
a ilฺc t Guid
WebLogic
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e to
WebLogic Server 12c
u cuMultitenancy:
n s
D e
to a shareable
• Provides
e s lic infrastructure for use by multiple organizations
• rIsna complete set of capabilities for shareable application infrastructure within a
n E JVM/WebLogic Server instance
J u a
• Supports multiple tenants via a new capability, namely Domain Partitions
Domain Partitions are:
• An administrative and runtime portion of a WebLogic Server Domain
• Isolate Resource configuration as well as the application runtime. This means that
resource configuration managers can control resource consumption (including security
realm, runtime traffic, data, heap, CPU) by running applications.
• Enables applications and their resources to be independently ‘plugged’ in to WebLogic
Server – configured and managed independently from other applications sharing the
same WebLogic Server infrastructure.

Oracle WebLogic Server 12c: Administration I 4 - 34


Aula Matriz SฺAฺSฺ

WebLogic Server Multitenancy


Components
Web Tier
Are managed independently.
Domain Partitions: Eg. start and stop.
• Contain applications and
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Virtual Target Virtual Target


Resource Groups
Partition 1 Partition 2
• Use Virtual Targets Resource Group Resource Group

• Use Security Realms App App

Resource Groups: App App

• Contain web applications JMS JMS


and related resources Data source Data source
ble

JNDI

JNDI
Virtual Targets: Security Security
fe r a
• Define application endpoints Realm
t r ans Realm

Security Realms : n -
Managed WebLogic Server/Cluster
o
• Can be shared or s an
independent
PDB1
) ha ฺ PDB2
c o m ide

ail nt Gu
Container Database

m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
u cua nsecomponents
WebLogic Server multi-tenancy include:
D
toPartitions: e
• Domain
e s lic Provide an administrative and runtime slice of a WebLogic Domain.
E rn
o a
Domain pa
partition
t t o ca
can be sta
started
ted a
andd stopped independently
depe de t y o
of ot
other
e pa
partitions
tto sa andd uses

uan
Virtual Target(s) for Resource Group application endpoints. Each domain partition may
J use its own Security Realm to separate principals from other partitions or share Security
Realms between partitions.
• Resource Groups: Contain the related resources running in a partition, including web
applications, JMS configurations, JDBC Data Sources, as well as other application
resources. Resource Group Templates are a mechanism for creating patterns for
Resource Groups
Groups. Administrators can use resource group templates when creating
Partitions.
• Virtual Targets: Provide the application endpoint targets used by a Resource Group in
a Partition
• Partition Security: Enables security isolation by associating a Security Realm to a
Partition
• Partition Work Managers: Provide a mechanism to ensure fairness in thread usage
and prioritization of work requests among Partitions.
Later in this lesson, you will examine these concepts in more detail.

Oracle WebLogic Server 12c: Administration I 4 - 35


Aula Matriz SฺAฺSฺ

WebLogic Server Multitenancy


Partition Isolation
Web Tier

• Per-partition management
• Resource Consumption
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Virtual Target Virtual Target

Management Partition 1 Partition 2


• Dedicated JNDI tree for Resource Group Resource Group

App App
resource isolation
i l ti
App App
• Virtual target per partition
JMS JMS
for application access
• Work Manager per partition Data source Data source
ble

JNDI

JNDI
for thread management Security Security
fe r a
Realm
t r ans Realm
• Security realm per partition n -
Managed WebLogic Server/Cluster
o
• Memory and CPU isolation s an
PDB1 ha PDB2
at the JVM level )
m ideฺ
ฺ c o
ail nt Gu
Container Database

m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
uaof thesemain to focuses of multi-tenancy for WebLogic Server. Partition
Partition isolation is
u cone
o
isolation affects
t D
all areas
l i c eofnWebLogic Server, including:
n s
aeage e t Partitions
• rManagement: a t t o s can
ca be sta
started,
ted, stopped, and
a d quieted
qu eted individually.
d dua y
E
n• Resource Consumption Management: Applications consume resources. Resource
Jua Consumption Management, or RCM, allows policies and mechanisms to define resource
consumption controls and limits.
• JNDI Isolation: Each application running in a partition has an isolated JNDI tree.
Applications in the same partition see the same JNDI tree, but nothing from other
partitions.
• Work Managers: Partition Work Managers set thread usage policy among partitions.
You can configure them to limit the number of Work Manager threads in each partition,
as well as to manage thread usage allocation based on thread usage time for each
partition.
• Memory and CPU Isolation: Both Memory access and CPU access are managed at
the JVM level, completely isolating applications from one another.

Oracle WebLogic Server 12c: Administration I 4 - 36


Aula Matriz SฺAฺSฺ

What Is a Domain Partition?

Domain Partitions:
• Are a portion of a WebLogic Server Domain
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Enable sharing of domain resources


• Isolate tenant-specific content
• Are both administrative and run time
WebLogic Server domains can contain:
• Zero or more Domain Partitions
ble
• Zero or more Targets
fe r a
Sh
Shared
d domain
d i
t r ans
Resource Group Resource Group Resource Group
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to resource isolation within a domain partition. Domain
cua nseprovides
WebLogic Server Multitenancy
u
partitions areoboth
t D an administrative
i ce and runtime portion of a WebLogic domain that are
dedicated e s
to running l
application instances and providing resources for a tenant. Domain
r n
partitions
E achieve greater density by allowing multiple application instances and their related
nresources
Juasystem, all the while isolating tenant-specific application data, configuration, and runtime
to share a domain, WebLogic Server, Java virtual machine, and the operating

traffic. Each domain partition has its own runtime copy of an application’s resources and state.
Changes in how WebLogic Server handles class loading provide both application isolation
and efficiency.
Deploying to multi-tenant environments requires no changes to your applications. For
example, you could run multiple instances of a payroll application in different domain
partitions without modifying the application.
WebLogic Server MT(Multitenancy) extends the WebLogic Server Enterprise Edition and
WebLogic Suite products, and includes the following components:
• WebLogic Server
• Oracle Traffic Director
• Coherence
• Fusion Middleware Control, used as the primary graphical user interface

Oracle WebLogic Server 12c: Administration I 4 - 37


Aula Matriz SฺAฺSฺ

What Are Resource Groups?

Resource groups are:


• Named collections of deployable artifacts
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Administrative units within a WebLogic Server domain


• Defined at Domain or Domain Partition level
Resource Group
• May be started or stopped independently
• Targeted as a single unit
• Both importable and exportable
ble
• Include:
fe r a
– JEE A
Application
li ti D Deployments
l t t r ans
– JDBC Data Sources and Mail Sessions o n-
s an
– JMS Messaging Configuration
) ha ฺ
– Targets c o m ide
a ilฺ t G u
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Resource Groups u cua anamed
are s e collection of typically related deployable resources. Resource
n applications, data sources, JMS artifacts, and other resources
groups oftento D Java
include i c eEE
used by
l
ethes application.
r n
E Server Multitenancy (MT) introduces resource groups as a convenient way to
u a n
WebLogic
J group together Java EE applications and the resources they use into a distinct administrative
unit within the domain. The resources and applications are "fully qualified" in that the
administrator provides all the information needed to start or connect to those resources,
including credentials for connecting to a data source and targeting information for Java EE
applications. A resource group will either contain these deployable resources directly or refer
to a resource group template that defines the resources
resources. Resource groups can be defined at
the domain level or be specific to a domain partition.
All the resources in or referenced by a resource group are targeted together (to the same
target). A Resource Group can be started and stopped independently of other Resource
Groups.

Oracle WebLogic Server 12c: Administration I 4 - 38


Aula Matriz SฺAฺSฺ

What Are Resource Group Templates?

Typically used as a
Resource Groups Templates: pattern
• Are a named collection of Resources
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Deploy identical sets of applications and resources to domain


partitions
• Can reference other Resource Group Templates
Each Resource Group will have runtime copies of resources.
Resource Group Templates include:
• Application Deployments • Messaging Bridges bl e
fe r a
• y Deployments
Library p y • Path Services n s
• JDBC System Resources • Persistent Stores n - tra
• JMS System Resources • SAF Agents a no
• Coherence System Resources • Foreign JNDI h a s
Providers
• File Stores • m ) eฺ
Mail Sessions
c o uid
• JMS Servers • ailฺ Modules
WLDF t G
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nare
Resource Group Templates
u s e atonamed, domain-level collection of deployable resources
intended to bet D asicaepattern by (usually) multiple resource groups. Each resource group
o used
e
that refers s
to a given
l
template will have its own runtime copies of the resources defined in the
r n
E A resource group template is a convenient way to define and replicate resources for
template.
a n
u multiple tenants. Resource group templates make it very easy to deploy the same collection
J of applications and resources to multiple domain partitions.
Resource group templates can define:
• Application Deployments
• Library Deployments
• JDBC System Resources
• JMS System Resources
• Coherence System Resources
• File Stores
• JMS Servers
• Messaging Bridges
• Path Services

Oracle WebLogic Server 12c: Administration I 4 - 39


Aula Matriz SฺAฺSฺ

• Path Services
• Persistent Stores
• SAF Agents
• Foreign JNDI Providers
• Mail Sessions
• WLDF Modules
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Resource group templates are defined at the domain level, and then referenced by one or
more resource groups.
Resource group templates are particularly useful in a SaaS environment, where WebLogic
S
Server MT activates
ti t theth same applications
li ti and
d resources multiple
lti l titimes once per d
domain
i
partition. Some of the information about such resources is the same across all domain
partitions, while some of it, such as the attributes of a JMS queue or of a DB connection,
varies from one partition to the next. For example, the URL, username, and password used to
connect to a data source would be different among different partitions. WLS MT will activate
the application suite represented by the template differently for each partition. ble
fe r a
p
You can specifyy override configuration
g
some attribute values in a partition.
MBeans and resource deployment
p y p
ns
plans to override
t r a
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 40


Aula Matriz SฺAฺSฺ

Virtual Targets

• Are endpoints for Domain Partitions


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

Domain Partition
• Encapsulate traffic routing Virtual
Target
• Include host/address, JNDI
App
channel,
h l protocol,
t l URI
URI, ttargets
t •

Host:port
H
URI
t t
App
• Channel
• Web
JMS
Virtual Target Guidelines: Server
• T3
• One per Domain Partition • Targets
Data
Source a b le
or Domain s f er
• Resource Groups within a Domain WebLogic Server
- t r an
n o n
Partition must have a Virtual Target a
a s
• May use a Cluster or Managed Server m) h
ฺ c o i d eฺ
• May include a URI prefix ail Gu
m ent
g
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nwhere
Virtual Targets encapsulate
u s e toa partition or resource group runs and how to route traffic
s t o D addresses,
to them, including
l i ce protocol settings, and targeting. Request routing is determined
by the n
r e name and optional URI.
host
E targets may include:
nVirtual
Jua • Host name and port
• Optional URI
• Network Access Point/Channel
• Protocol-specific configuration
• Target clusters and managed servers
Virtual targets isolate a domain partition and the global (domain-level) runtime from the
physical attributes of the target WebLogic Server instances so that your application does not
have to know these details.
A virtual target represents a target for a resource group, both at the domain level and in a
domain partition. It defines the access points to resources, such as one or more host names,
a URI pprefix,, and the managed
g servers or cluster to which the virtual target
g is itself targeted.
g

Oracle WebLogic Server 12c: Administration I 4 - 41


Aula Matriz SฺAฺSฺ

Virtual targets are similar to the virtual hosts previously available on WebLogic Server. Like
virtual hosts, virtual targets provide a separate HTTP server (web container) on each target.
A virtual target isolates a resource group from the physical attributes of where the container is
g
running.
Each resource group requires one or more virtual targets. The virtual targets you can select
depend on whether the resource group is at the domain level or associated with a domain
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

partition:
• For domain-level resource groups, you can select any existing virtual target that is not
already assigned to a partition as an available target.
• For resource groups in a domain partition, you must select only from the existing virtual
targets available to the partition.
Consider the following guidelines for using virtual targets:
• A virtual target can be used by only one partition at a time, or at the domain level. A
virtual target is never shared by more than one partition, or by a partition and the domain
level. ble
• A virtual target can be used by many resource groups within a partition, or by many fe r a
resource groups at the domain level. t r ans
• A virtual target can be targeted at one cluster or one managed server. n-
no
s a
• Many virtual targets can be targeted at the same cluster or managed server.
h
) eฺ a
• If two virtual targets have the same host names, URI prefix, and port number, they must
m
o
be targeted to different clusters or managed servers.
a ilฺc t Guid
A virtual target contains the following:
@ gm den
• Host names: The list of host namesra
a for which
S u virtual target will serve requests. The
tthis
host names you specify must have
d u cu DNSt h is that resolve to the correct servers, or to
entries
a load balancer. j
a ( Trafficu se
r
If you are not usingaOracle
u to Director (OTD) to load balance connections for a
c
u theeactual
partition, specify n e
s host name of the WebLogic Server cluster or managed
server.to
D
e s lic
E rn
If you
y are using
g OTD to load balance connections for a p partition,, yyou access

uan
applications through OTD. The host names you specify for a virtual target must resolve
J to the location of the OTD Administration Server. If you do not specify a host name, it is
the equivalent of wild carding the host name to match all incoming requests.
The host name used by a client to access the resource group must exactly match one of
the host names specified in the virtual target.

Oracle WebLogic Server 12c: Administration I 4 - 42


Aula Matriz SฺAฺSฺ

You can specify multiple host names for the virtual target. You might find it convenient to
specify both the simple and the fully qualified host name to ensure a match.
• Optional URI prefix for which this virtual target will serve requests. For example, if you
p
enter www.example.com as the host name and MyApp y pp as the URI pprefix, this virtual
target serves requests to www.example.com/MyApp, but not to www.example.com or
www.example.com/foo.
To extend this example, assume that your application root is /app. The resulting URL for
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the application would be www.example.com/MyApp/app.


• Target cluster and managed server from the list of the targets in the current domain.
Targets must be either a single server or a single cluster.
There are ttwo generall approaches
Th h when h usingi virtual
i t l ttargets:
t routet b
by h
hostt name
(http://partition1.com, http://partition2.com), or by URI prefix (http://server.com/partition1,
http://server.com/partition2). You might find it easier to manage your environment if you
consistently use one approach, but there is no requirement that you do so.
You must specify at least one of host name, URI prefix, or port number. e
r a bl
ns fe
t r a
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 43


Aula Matriz SฺAฺSฺ

Quiz
Q
Domains are created from ____________.
a. The administration server
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

b. WAR files
c. Templates
d. The administration console

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: c u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 44


Aula Matriz SฺAฺSฺ

Quiz
Q
To copy a domain from the administration server machine
to a managed server machine, use the _________________.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. Pack and unpack utilities


b. Configuration Wizard
c. Template builder
d. Zip and unzip utilities

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: a u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 45


Aula Matriz SฺAฺSฺ

Summary

In this lesson, you should have learned how to:


• Describe a domain’s file system
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• 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
• Describe WebLogic 12c Multitenancy concepts
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 46


Aula Matriz SฺAฺSฺ

Practice 4-1 Overview: Creating a New Domain

• This practice covers creating a new domain by using the


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

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 47


Aula Matriz SฺAฺSฺ

Practice 4-2 Overview: Copying a Domain to a


New Machine
• This practice covers copying a domain to another machine
that will run managed servers.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 4 - 48


Aula Matriz SฺAฺSฺ

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

Starting Servers
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


• Start and stop servers with standard scripts
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Deal with server startup problems


• Customize start and stop scripts

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 2


Aula Matriz SฺAฺSฺ

WebLogic Server Life Cycle

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


The most important of these states are:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• RUNNING: The server is fully functional, offering its services to


clients.
• SHUTDOWN: The server is configured
configured, but not active
active.
• ADMIN: The server is running, but available only for administrative
operations. Services are available to administrators, but are not
available to other clients.
• FAILED: The server itself has failed (for example, it is out of a b le
memory) y) or it has detected that one or more critical subsystems
y ares f er
unstable. - t r an
FAILED
n no
s a
h
) eฺa
o m
SHUTDOWN ADMIN
a ilฺc t G uid
RUNNING

@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nseoftothe server life cycle, showing only the most important
Note that this is a simplification
u
states. There
s t oareDquitelica efew transitional states that are not shown. See the “Understanding
e Cycle” chapter in the Administering Server Startup and Shutdown for Oracle
ServernLife
r
E Server document for the other states, as well as many details on how a server
WebLogic
n
J a
u 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 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


Aula Matriz SฺAฺSฺ

• 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-
admin users are refused.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– 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.
– If the server is part of a cluster, the Cluster Service is active and listens for
heartbeats and announcements from other cluster members, but this server is
ble
invisible to the other cluster members.
fe r a
• FAILED A running
FAILED: r nning ser
server
er can fail as a res
result
lt of o
out-of-memory
t of memor e exceptions ans
ceptions or stuck
t r st ck
n-
application threads. Also, as a server monitors its health, if it detects that one or more
no
a
critical subsystems are unstable, it declares itself FAILED. When a server enters the
s
h
) eฺa
FAILED state, it attempts to return to a nonfailed state. If it failed before reaching the
m
ADMIN state, the server instance shuts itself down. If the server fails after reaching the
o
ilฺc t Guid
ADMIN state, but before reaching the RUNNING state, by default, it returns to the ADMIN
a
gm den
state if an administration port has been configured. A server can enter the FAILED state
@
f
from any other
a r th state.
a S tu
t t However,
H once a server has
h entered
t d the
th FAILED state,
t t it cannott

d u cu this
return to a RUNNING state directly. The FAILED state is fatal and a server must go into
the ADMIN or SHUTDOWN state before returning to the RUNNING state.
a ( j u e
sabove
Note: The commands in the
u r
a e to
explanation are shown in double quotes (for example, “start
c
in admin” command)u to indicate
n s that there are such commands, without giving what the
to
command actually
D is. Foric e
example, the “start” command in the administration console is a button
labeled n e s l
Start. The “start” command in the WebLogic g Scripting
p g Tool ((WLST)) is either start()
Er
ornstartServer().
Jua

Oracle WebLogic Server 12c: Administration I 5 - 4


Aula Matriz SฺAฺSฺ

Starting WebLogic Server with a Script

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


the domain’s bin directory.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• The administration server start script:


– startWebLogic.sh
— N parameters
No t
• Managed servers start script:
– startManagedWebLogic.sh
— Parameter one: The name of the managed server (required)
ble
— Parameter two: The URL of the admin server (optional) fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
To start the administration
u s e toopen a terminal window and change to the bin directory
cua nserver,
under the domain
s t o Ddirectory.
l i ce Run the startWebLogic.sh script. If prompted for a username
r n e enter the administrator credentials set when the domain was created. Note
and password,
thatEthis script calls the setDomainEnv.sh script that sets the environment variables and
a n
u options. Also note that there is a convenience script in the main domain directory, also called
J 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
domain. If omitted
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, y
you use the equivalent scripts that end in
.cmd.

Oracle WebLogic Server 12c: Administration I 5 - 5


Aula Matriz SฺAฺSฺ

Customizing the Scripting Environment


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

startWebLogic.sh setDomainEnv.sh setUserOverrides.sh

User
setDomainEnv.sh Override Customize Settings
Exists?

ble
fe r a
Start Server
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
You customize environment
u e to for starting and stopping servers by creating a script
cua nssettings
s t o D lice in the DOMAIN_HOME/bin folder. This script enables you to
named setUserOverrides
customize
r n e your domain safely because your changes are maintained outside of the
E
nsetDomainEnv script. When your domain is updated, either to a new release or through
Juasome domain configuration tool, the setUserOverrides script is not affected.
Here is a flow chart that demonstrates how this works.
• When the startWebLogic script is executed, it sources the setDomainEnv script.
• When the setDomainEnv script is executed, it checks to see whether the
setUserOverrides script exists.
• If it doesn’t exist, then normal environment processing is performed and control is
returned to the startWebLogic.sh script.
• If it exists, then it sources the setUserOverrides script.
• Any customized settings are set in the setUserOverrides script, and control is
returned to setDomainEnv, and then to startWebLogic.
• The start script continues processing and the server is started.

Oracle WebLogic Server 12c: Administration I 5 - 6


Aula Matriz SฺAฺSฺ

Customizing the Scripting Environment

# Set user overrides, if available. 2 If this file exists


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

if [ -f ${DOMAIN_HOME}/bin/setUserOverrides.sh ] ; then
. ${DOMAIN_HOME}/bin/setUserOverrides.sh
fi

3 Source / execute it setDomainEnv.sh

#AdminServer uses default settings, while managed servers


a b le
use custom settings
s f er
if [ "${SERVER
${ _NAME}"
} != "AdminServer" ]; then
JAVA_OPTIONS+=" -XX:+UseG1GC" - t r an
export JAVA_OPTIONS 1 Create this
n ofilen
a
fi as ) h eฺ
o m id
a ilฺc t GusetUserOverrides.sh
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
u cuthea setUserOverrides.sh
1. First, you create
n s e file and set your custom settings.
D e
o startWebLogic.sh
2. When tthe
e s lic script is executed, it sources the setDomainEnv.sh

E n p , which in turn checks to see if the setUserOverrides.sh scriptp exists. This


rscript,
uan
code shows the file check.
J 3. If the file exists, which it does because you just created it, it is sourced to include its
settings as part of the initialization process to start the server.

Oracle WebLogic Server 12c: Administration I 5 - 7


Aula Matriz SฺAฺSฺ

Creating a Boot Identity File

Starting or stopping WebLogic Server requires administrative


authority. The scripts prompt for a username and password.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

A boot identity file contains administrator credentials, making


prompting unnecessary.
1 E
1. Eachh server h
has itits own di
directory
t iin th
the d
domain.
i F For example,
l
servers/server1. Under that directory create a new subdirectory
called security.
2. Create a text file there called boot.properties:
ble
username=adminuser fe r a
pass ord thepass ord
password=thepassword
t r ans
noits
3. Start the server with the script. The server reads the file for
n-
credentials. If they are valid, the server starts. The
a
s also
server
h a
encrypts both values in the file so that they o m)now secure.
are eฺ
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to credentials for starting and stopping an instance of
A boot identity file u cua nthe
contains s euser
s t o D Anladministration
WebLogic Server. i ce server or managed server can refer to this file for user
r n e
credentials rather than prompt at the command line for them. Because the server encrypts the
E
ncredentials in the boot identity file, it is more secure than storing plain text credentials in start
Juaand
or stop script. There can be a different boot identity file for each server in a domain. Both start
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
N d M Manager tto start
t t managed d servers, rather
th than
th running
i start
t t scripts
i t manually,
ll
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 - 8


Aula Matriz SฺAฺSฺ

Stopping WebLogic Server

A server can be stopped:


• By using the admin console. There are two options:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– 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)
• With a standard stop script
– These standard domain scripts do a forced shutdown e
r a bl
• By killing its JVM process The same effect as pressings fe
– kill -2 C + C in the Terminal window
Ctrl
- t r an
is n
in which a server o running
— Does a forced shutdown
s an
– kill -9
) ha ฺ
“Hard” kill, no “shutdown” code; use only c o m ideresource
as a last

i l ฺ u
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
u cuascript
The stopWebLogic.sh s e is for stopping the admin server. It takes no parameters.
t o D icen
e s l
The stopManagedWebLogic.sh script is for stopping a managed server. It takes two
rn
parameters:
E
n
ua • The managed server name (required)
J • 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 - 9


Aula Matriz SฺAฺSฺ

Suspend and Resume

A server that is suspended goes from the RUNNING state to the


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

• A server can be suspended by using the admin console.


There are two options:
– Wh
When workk completes
l t
– Force Suspend Now
A suspended server can be resumed. It then transitions from the
ADMIN (or STANDBY) state to the RUNNING state. e
r a bl
• A server can be resumed by using the admin console.
ns fe
• STANDBY is a state in which a server has completed its - t r a
o n
startup procedure, but does not process any requests.
s a n (Its
ha ฺa server
regular listen port is closed.) This is used to) keep
ready as a “hot” backup. c o m ide
il ฺ u
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tocan change its default startup mode by using the admin
cua nseyou
To start a server inuSTANDBY,
console. Select
s t oD l i ce then click the Configuration > General tab. Click Advanced.
the server,
Change
r n ethe Startup Mode field to Standby. You must have an admin port defined for the
E so that the server can listen on its admin port for the command to resume.
domain,
n
J u a

Oracle WebLogic Server 12c: Administration I 5 - 10


Aula Matriz SฺAฺSฺ

Customizing Standard Scripts

The standard start scripts can be customized to:


• Change WebLogic Server runtime options
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Change which JVM runs WebLogic Server


• Change JVM options
– Performance tuning of the JVM
• Modify the CLASSPATH

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 11


Aula Matriz SฺAฺSฺ

WebLogic Server Options

The options of weblogic.Server are used to:


The Java class that
• Change the location of configuration data
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

starts WLS
– Examples:
— WebLogic home: -Dweblogic.home=path
— D f lt D
Default: Determined
t i db by CLASSPATH
— Server root directory: -Dweblogic.RootDirectory=path
— Default: The directory from which the server was started
• Override a server’s configuration
This line could be added
ble
– Examples: to a start script such as
fe r a
— -Dweblogic.ListenAddress=host
-Dweblogic ListenAddress=host startWebLogic.sh.
t r ans
— -Dweblogic.ListenPort=portnumber
no n-

s a
JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.ListenPort=9001"
h a
) eฺ
o m id
– Instead, make changes by using the
a ilฺcadmin
G uconsole/WLST
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua seis shownto as it is done in Linux.
Setting environment
u cvariables
n to override a server’s configuration. See the Command
There are s t o Dmoreli-D
many ceoptions
r n
Referencee for Oracle WebLogic Server.
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 12


Aula Matriz SฺAฺSฺ

WebLogic Server Options

The options of weblogic.Server are used to:


• Change the server type
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Normally all server services are started.


– If you do not need EJBs, JCA (Java EE Connector
A hit t ) or JMS,
Architecture), JMS you can run theth lighter
li ht version
i off
WebLogic Server that does not start those services.
– Use the -DserverType=wlx option

ble
JAVA_OPTIONS="${JAVA_OPTIONS} -DserverType=wlx"
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua se Server to takes less memory and starts up faster.
The lighter versionuofcWebLogic
The Java EE t o l
Connector en
D icArchitecture is used by tool vendors and system integrators to create
e s
n Ern adapters.
resource
applications to
A resource adapter is a software component that allows Java EE
access and interact with the underlying resource manager of an enterprise
J ua information system (EIS).

Oracle WebLogic Server 12c: Administration I 5 - 13


Aula Matriz SฺAฺSฺ

Changing the JVM

• Environment variables are used to indicate which JVM runs


WebLogic Server. In setDomainEnv.sh, there are the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

following variables:
– VM_TYPE: Values such as "HotSpot" or "JRockit"
– JAVA_VENDOR:
JAVA VENDOR: Values such as "Oracle" or "Sun"
– JAVA_HOME: Location of the JDK
• If, for example, both the HotSpot and JRockit JDKs are
installed, ensure that the SUN_JAVA_HOME and le
BEA_JAVA_HOME variables are set properly. Then, near the er a b
f
top of setDomainEnv.sh, VM TYPE: rans
setDomainEnv sh add a line setting VM_TYPE:
n - t
VM_TYPE="JRockit" or VM_TYPE="HotSpot" n o
s a
a
– Logic in the script will set the other variableshaccordingly.
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 14


Aula Matriz SฺAฺSฺ

JVM Options

• The options that are available depend upon the JVM.


• For memory options, set the USER_MEM_ARGS variable in
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

setDomainEnv.sh.
Where Java
– Xms is the minimum heap size. classes are kept
– Xmx iis th
the maximum
i h
heap size.
i
– XX:MaxPermSize sets the maximum permanent space for a
HotSpot JVM.
USER_MEM_ARGS="-Xms64m -Xmx200m -XX:MaxPermSize=350m"
ble
• For other options, update the JAVA_OPTIONS variable in fe r a
setDomainEnv.sh. t r ans
- on
a n garbage
– For example, to choose the “concurrent mark-sweep”
s
collection algorithm of Hotspot: ha ) eฺ
o m
ilฺc t Guid
JAVA_OPTIONS="${JAVA_OPTIONS} -XX:+UseConMarkSweepGC"
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
The heap is the area
u cofuamemory
s e where objects are created and deleted dynamically. It has a
configurableto D iand
minimum
l c enmaximum size and is organized into different areas called
r n es Objects that exist for a certain amount of time are promoted to the next
generations.
E
ngeneration. Older generations are garbage collected less frequently. The permanent
Juaand
generation, in a HotSpot JVM, is where application Java classes are stored. The allocation
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
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
ft has
h many options
ti that
th t can be
b set.
t See
S the
th particular
ti l JVM documentation.
d t ti

Oracle WebLogic Server 12c: Administration I 5 - 15


Aula Matriz SฺAฺSฺ

Modifying the CLASSPATH

• The Java CLASSPATH tells the JVM where to find


user-created packages and classes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• There are many environment variables relating to the


CLASSPATH. They are used to update the CLASSPATH for
patches and libraries.
libraries These variables are set in:
– domain_name/bin/startWebLogic.sh
– domain_name/bin/setDomainEnv.sh
– <MW_HOME>/oracle_common/common/bin/commEnv.sh e
r a bl
• To modify the CLASSPATH for: fe
– All domains, edit the commEnv.sh script tra ns
n -
no
– A particular domain, edit that domain’s setDomainEnv.sh
a
script has ) eฺ
o m id to be
These
a i l ฺcfiles may
G u need

g mmodifiede n t multiple hosts.


on

a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r toto the JVM (and WebLogic Server) classes that are
The CLASSPATH makes u cuaavailable
s e
o
required for tthe D
server.ic
l enclasses that make up the server itself, classes that patch the
The
es of the server, classes that make up tools such as Log4J or Ant, startup and
currentnversion
r
E classes, and database driver classes are the kinds of classes that go into the
nshutdown
Juadirectory
CLASSPATH. If the classes for the CLASSPATH are compiled in the expanded format, the
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.
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 - 16


Aula Matriz SฺAฺSฺ

Modifying the CLASSPATH

To modify the commEnv.sh installation script:


• Add your JAR file to the WEBLOGIC_CLASSPATH environment
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

variable.
– If your classes need to be found first, place your JAR file as the
first thing in the string
string.
WEBLOGIC_CLASSPATH="/tools/mytool.jar${CLASSPATHSEP}..."

To modify the setDomainEnv.sh domain script: le


a b
• Create the PRE_CLASSPATH environment variable, if it does sfer
n
not exist, and assign it to your JAR file. -tra on
a n
PRE_CLASSPATH="/tools/mytool.jar"
h a s
• If the variable already exists, add yourcJAR o m) fileidtoeฺit.
a ilฺ t Gu
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sise used to as the CLASSPATH delimiter so the same script can be
The CLASSPATHSEP u cvariablen
o
used in multiple
t Doperating
i c esystems. It is set in the commEnv.sh script.
e s l
rn
nE
Jua

Oracle WebLogic Server 12c: Administration I 5 - 17


Aula Matriz SฺAฺSฺ

Modifying the CLASSPATH

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


the domain, without changing any of the startup or set
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.
– Note that the JAR file needs to be placed in the domain’s lib
directory on each host on which servers from this domain run. ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 18


Aula Matriz SฺAฺSฺ

WebLogic Server Startup Issues

• Severe errors during server startup may cause:


– WebLogic Server to exit prematurely
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– The JVM to crash (rare)


• Common causes include:
– Missing or invalid server start parameters
– Another process using the address and port of the server
– Custom start scripts with errors
– Missing or invalid boot credentials or SSL files ble
– An invalid or corrupt domain configuration fe r a
t r ans
<Critical> <WebLogicServer> <BEA-000362> <Server failed. o n -
Reason: [Management:141245]Schema validation
s a nerror...>
... ) ha ฺ
<Error> <WebLogicServer> <BEA-000383> o<A
c m critical
i de
i l ฺ G u
service failed. The server will
g ma shut n t itself down.>

r a @ tude
c u a is S Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

( j du se th
u a ra to u
D uc error
Possible server startup
e n e
smessages include the following:
• Unableto to createliacserver socket. The address <listenAddress> might be incorrect or
e s
E rn pprocess
another
a ot e ocess iss us
usingg po
portt <port>.
po t

J uan• 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,
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 - 19


Aula Matriz SฺAฺSฺ

Failed Admin Server

• If the administration server fails:


– There is no effect on running managed servers or their
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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:
— Been started at least once before to obtain its own copy of the
configuration Enabled
— Managed server independence (MSI) mode enabled by default
ble
fe r a
– No changes to the configuration can be made.
t r ans
Domain no n-
a
s Managed
Admin Managed Managed Managed h a
) eฺ Server
Server Server Server m
Server
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
Erne
u a n
J

Oracle WebLogic Server 12c: Administration I 5 - 20


Aula Matriz SฺAฺSฺ

Restarting a Failed Admin Server: Same Machine

• To restart the admin server on the same machine:


– Run the start script again
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

— 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
Manager can be set to automatically restart it.
• When the admin server has restarted, the running managed ble
fe r a
servers will reconnect to it.
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 21


Aula Matriz SฺAฺSฺ

Restarting a Failed Admin Server: Different Machine

• To restart the admin server on a different machine:


– The admin server backup machine must have already been
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

configured and contain:


— WLS installation
— Domain files
— Deployed applications
– If using a virtual IP address, move it to the backup machine.
– Start the admin server (start script or Node Manager).
• When the admin server has restarted, the running managed erab
le
servers reconnect to it if the admin server has: an sf
r n - t
– A virtual IP address n o
a
as
– A host name that maps to multiple IP addresses
) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua swith taodifferent IP address but has the same host name, its
If the admin serveruiscstarted e
managed servers
t o Dcan ifind
l c eit.n Therefore, it is good planning to use a virtual host or DNS name
that maps
r n esto multiple IP addresses for the admin server.
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 22


Aula Matriz SฺAฺSฺ

Restarting a Failed Managed Server: Same Machine

• To restart a managed server on the same machine:


– Run the start script again
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

— 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
Manager can be set to automatically restart it.
• As the managed server is restarted, it reconnects with its ble
fe r a
admin server.
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 23


Aula Matriz SฺAฺSฺ

Restarting a Failed Managed Server: Different Machine

• To restart a managed server on a different machine, it needs:


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

– Domain files
– Deployed applications
– JTA and JMS S artifacts
f
– If using a virtual IP address, move it to the backup machine
• Start the managed server (start script or Node Manager).
• As the managed server is restarted (even if on a different IP
a b le
address), it reconnects with its admin server. s f er
• A clustered managed server that fails can be configured - t
tor an
n on
migrate to another machine automatically or manually.
sa
– JTA and JMS artifacts must be available. ) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to to migrate clustered managed server instances. If a
cua nthesecapability
WebLogic Server provides
u
s t o D server
clustered managed
l i ce has been configured to be migratable and it fails and cannot be
restarted
r n eon its current hardware, it can be moved to new hardware either manually by an
n E
administrator or automatically. The migration process makes all of the services running on the
J a
u 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
information, see “Whole
Whole Server Migration”
Migration in Oracle Fusion Middleware
Administering Clusters for Oracle WebLogic Server.

Oracle WebLogic Server 12c: Administration I 5 - 24


Aula Matriz SฺAฺSฺ

Quiz
Q
The startManagedWebLogic.sh script takes two
parameters. They are:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. The name of the admin server and the URL of the managed
server
b The
b. Th name off the
th managed d server andd th
the URL off th
the
managed server
c. The name of the admin server and the URL of the admin
server le
a b
d. The name of the managed server and the URL of the admin sfer
n
server -tra on
a n
h a s
m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: d u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 25


Aula Matriz SฺAฺSฺ

Quiz
Q
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

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: c u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 26


Aula Matriz SฺAฺSฺ

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

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 27


Aula Matriz SฺAฺSฺ

Practice 5-1 Overview: Starting and Stopping Servers

This practice covers the following topics:


• Starting the administration server with a script
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Starting managed servers with a script


• Creating a boot identity file
• Modifying server start scripts

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 5 - 28


Aula Matriz SฺAฺSฺ

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

Using
U i ththe Ad
Administration
i i t ti
Console
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


• Access the WebLogic Server administration console
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Create and configure servers by using the administration


console

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 2


Aula Matriz SฺAฺSฺ

Accessing the Administration Console

After starting the administration server, you can access the


administration console in a web browser.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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
secureport = The secure sockets layer (SSL) port number of the admin
server e
r a bl
nsfe
http://localhost:7001/console
htt //l lh t 7001/ l
t r a
http://adminDNSName:7001/console
no n-
https://127.0.0.1:7002/console
s a
h
) eฺa
o m
SSL on a different port
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
When started, the u cua nse tconsole
administration prompts for a username and password.
D e
to a domain-wide
If you configured
e s lic administration port, use that port number. An administration
rn uses SSL.
port always
nE
Juaapplication is deployed on-demand. If you prefer that the console be deployed at server
The first time you access the administration console, there may be a brief delay because the

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
3. on demand deployment of internal applications is not selected.
selected

Oracle WebLogic Server 12c: Administration I 6 - 3


Aula Matriz SฺAฺSฺ

Administration Console Login

Enter the username and password that you set when creating
your domain. The password is not displayed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua seenter to the username and password that you used to start the
When the login page
u cappears,
administration
t oserver
l en a username that belongs to one of the following security
D oricenter
groups:
r n es
n• E Administrators
Jua • 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.
3. Save

Oracle WebLogic Server 12c: Administration I 6 - 4


Aula Matriz SฺAฺSฺ

Basic Navigation

Lock the configuration to Help System


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

Breadcrumbs

Tabs help organize


information about the
selected resource
(Configuration > ble
Deployment)
fe r a
t r ans
no n-
s a
) h a
Domain resources
m
Information about the selected resource,eฺ
o uid
a ilฺcselected
based on the tabs
G
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua seis atonavigation tree. Click any of the nodes in the tree to display
• Under Domain u cStructure n element. Click the “+” symbol to expand a node.
o
information
t Don thati c edomain
e sg t pa l
E n
• rThee right panel
e sshows
o s deta
detailed
ed information
o at o about tthe e se
selection
ect o in tthe
e left
e t pa
panel.
e O Often
te a

uan
configuration element has many attributes, and these are organized by tabs and
J 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 the changes have
been made, they can be undone by clicking the Undo All Changes button, or
committed by clicking the Activate Changes button.
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


Aula Matriz SฺAฺSฺ

Tabular Data

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


You can customize the columns that are displayed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua se to console is displayed as a table that lists resources of a
When the data in the u cadministration
particular type,
t o you
l en
D caniccustomize the table by filtering the data displayed and adding or
n e
subtracting sthe attributes that are displayed. You can also sort the data in the tables by
r
E the column headers.
nclicking
JuaTo 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


Aula Matriz SฺAฺSฺ

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.

ble
fe r a
5
t r ans
6
no n-
a
Select a Chosen attribute and use these
s
h
) eฺa
arrows to change its order in the table.

o m
7
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
2. Select an attribute
u s e tothe data displayed. Optionally, enter a filtering text string
cuafornfiltering
s t o D field.
in the Criteria
l i ceThe filtering criteria is specified as an expression of the WebLogic
r n e
Diagnostics Framework (WLDF) Query Language.
n3.E To show attributes that are currently not displayed, select them in the Available column
J u a 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
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


Aula Matriz SฺAฺSฺ

Admin Console Preferences

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

ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e to console there is a Preferences link. Click it to change
1. At the top of u cuadministration
the
n s
to D e
console
e s lic
preferences.
2. rC
E n
Change
a ge t
the
e value
a ue of
o one
o eo or more
oep preferences
e e e ces a
and
d cclick
c Sa
Save.
e The ep
preferences
e e e ces a
are
e

uan
saved under the domain in
J 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 y in which the deployment
y 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
h
how often
f this
hi refresh
f h occurs.

Oracle WebLogic Server 12c: Administration I 6 - 8


Aula Matriz SฺAฺSฺ

Advanced Console Options

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


options that are not frequently used.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
1 2
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to changed configuration attributes are shown for a given
cuacommonly
By default, only theumost s e
resource, such
t o D a server,
as
l i c encluster, data source, or application. To see the full list of available
r n es
attributes:
n 1.E Click the Advanced link at the bottom of the page, if available.
J u a
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 - 9


Aula Matriz SฺAฺSฺ

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
Plug In Enabled: Specifies whether this server uses the proprietary WL
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 return the address of the browser client from the proprietary WL-Proxy-Client-
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

IP header instead of the web server.


• Prepend to classpath: The options to prepend to the Java compiler classpath when
compiling Java code

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 10


Aula Matriz SฺAฺSฺ

Administration Console Change Center

The domain configuration must be locked to change it.


1. Click the Lock & Edit button and make changes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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
server restart are marked with this icon:
ble
fe r a
t r ans
no n-
s a
1 2 h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e to in XML files located in the config directory and its
Each domain stores u citsuconfiguration
n s
D e
to of the configuration
subdirectories.
e s
representation
At run
lic
time, each instance of WebLogic Server creates an in-memory
as a collection of read-only JMX managed beans
E r n
n(MBeans).
JuaIn 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,
d which
hi h causes th the administration
d i i t ti server tto write
it th
the changes
h tto a sett off pending
di
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
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 - 11


Aula Matriz SฺAฺSฺ

Multiple Edit Sessions

• Prior to 12.2.1 WebLogic, only single edit sessions were


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

• With Multi-tenant domains, multiple administrators may need


to change configuration at the same time.
• WebLogic
W bL i 12 12.2.1
2 1 supports
t multiple
lti l edit
dit sessions.
i
• With multiple edit sessions: edit("sessionA")
– Partition administrators startEdit()
make changes to the cmo.createServer("Server-1")
le
configuration and resources r a b
# Create a different edit sfe
within their partition session
- t r an
– Partition changes are isolated edit("sessionB") non
from each other startEdit()
s a
a
) h eฺ
ls("Servers")
– Sessions may be started with m
o uid
WLST or the Middleware Controlailฺc G
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua seServer to configuration edit sessions supported only one active
In previous releases,
u cWebLogic
o
edit sessiontat aD c ensystem administrator got a global edit lock, made changes, and
time. iThe
l
r n es them. Other administrators could not make changes at the same time. In this
then activated
E there are situations in which more than one administrator may need to make
release,
n
J a
u configuration changes. A multitenant WLS domain contains multiple partitions, each with its
own administrator. Partition administrators must be able to make configuration changes to the
partition configuration and resources deployed in the partition without affecting other partition
administrators or the WLS system administrator. Therefore, WLS has enabled multiple,
concurrent edit sessions which support one or more configuration edit sessions per partition,
plus g
p global configuration
g edit sessions.
With this feature, an administrator creates a named edit session, makes changes, and then
activates the changes. Another administrator also creates a named edit session in parallel. If
there are conflicts between the edit session from the first administrator and the changes made
by a second administrator, the second administrator will receive an error when activating their
changes. The second administrator can then resolve the conflicts and activate their changes.

Oracle WebLogic Server 12c: Administration I 6 - 12


Aula Matriz SฺAฺSฺ

Multiple Edit Sessions

Managing named concurrent edit sessions:


1. Administrators create (and destroy) named edit sessions.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2. Changed configuration files are persisted to an edit-session-


specific directory.
3. Conflicts may occur between parallel edit sessions when
changes are activated. If any conflicts occur during activation,
the activate operation will fail and the conflicts must be
resolved manually. e
r a bl
nsfe
t r a
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nsnamed
The main steps forumanaging e to concurrent edit sessions are as follows:
t o D create
1. Administrators
s l i ce (and destroy) named edit sessions.
r n
Youeuse the ConfigurationManagerMBean
g g API to start an edit session,, activate
E
uan
changes, show changes, undo changes, and so forth.
J 2. Changed configuration files are persisted to an edit-session-specific directory.
Each edit session has its own configuration files and ConfigurationManagerMBean
instance. Changed configuration files are persisted to an edit-session-specific directory.
3. Conflicts may occur between parallel edit sessions when changes are activated. If any
conflicts occur during activation, the activate operation will fail and you must resolve the
conflicts
fli t manually.
ll
Use the resolve method to apply any concurrently-applied configuration changes to
the current edit session.
After calling the resolve method, you can then proceed with the activation of pending
changes in the edit session.

Oracle WebLogic Server 12c: Administration I 6 - 13


Aula Matriz SฺAฺSฺ

Admin Console: Creating Domain Resources

The administration console can be used to create and configure:


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

2. Clusters
3. Machines
4. JMS servers
5. JMS destinations
6. JDBC data sources
ble
7. And more…
fe r a
t r ans
Find the type of resource under Domain Structure, click Lock
o n - &
Edit, click the New button, enter the element’s attributes,
s a n click
Save, and then click Activate Changes. ) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r toas simple as the procedure given in the slide, but many
cuaare
Not all domain resources
u s e
quite
o
are. In addition,
t D c
of course,
l i enyou need to know what values should be entered for a resource’s
r n es
attributes.
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 14


Aula Matriz SฺAฺSฺ

Creating a Resource Example: New Server

To create a new server:


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

ble
fe r a
t r ans
2 3 no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a to create to a new domain resource by using the administration
cuhow
This is an exampleuof s e
n see how to create a new managed server.
o
console. In this
t D
example,
i c eyou
l
esa new managed server, perform the following steps:
r n
To create
E
u a n 1. In the Change Center, click Lock & Edit.
J 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 - 15


Aula Matriz SฺAฺSฺ

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
connections. (If left blank
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.”

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 16


Aula Matriz SฺAฺSฺ

Creating a Resource Example: New Server

To create a new server:


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

ble
fe r a
6
t r ans
no n-
s a
7 h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nserver,
To create a new managed
u s e toperform the following steps:
5. Review
s t otheDserver
l i e are about to create and click Finish.
cyou
6. n
6 rIn
e
the Change Center
Center, click Activate Changes.
Changes
n E
J ua 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 - 17


Aula Matriz SฺAฺSฺ

Modifying a Resource Example: Server

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

ble
fe r a
t r ans
2
no n-
s5 a
h
) eฺa
3 o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a to modify to a domain resource by using the administration console.
This is an exampleuofcuhow s e
n to modify some attributes of the server created in the previous
o
In this example,
t Dyou seei c ehow
example. es l
r n
a To E
n modify a server, perform the following steps:
J u 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
5. Enter or modify the attribute value (or use a check box or drop
drop-down
down list)
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 - 18


Aula Matriz SฺAฺSฺ

Modifying a Resource Example: Server

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

ble
8 fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to steps:
To modify a server,
u cua nthe
perform s efollowing
t o D yourlicchanges,
6. After making
s
e click the Save button.
7.
e
nthe Change Center
7 rIn Center, click Activate Changes.
Changes
nE
Jua 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 - 19


Aula Matriz SฺAฺSฺ

Admin Console: Monitoring Domain Resources

The administration console can be used to monitor domain


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

• Servers
• Clusters
• Machines
• Deployments
• JMS destinations
• JDBC data sources ble
fe r a
• And more
more…
t r ans
o n-
an a
Find the type of resource under Domain Structure, sselect
particular resource, click the Monitoring tab (and
) haperhaps
ฺ a
m
o uid e
subtab). ilฺc
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nunder
• Servers: Theusubtabs s e tothe Monitoring tab are: General (state, version, OS, and so
s t o DChannels
on) Health,
l i ce (statistics on hosts/ports), Performance (Java memory
r n e
information), Threads (Java thread information), Timers (internal timers used by the
n E server) Workload (information on Work Managers), Jobs (Job Scheduler information),
J u a 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 - 20


Aula Matriz SฺAฺSฺ

Admin Console: Controlling Domain Resources

The administration console can also be used to control domain


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

• Servers: Start, shut down, suspend, resume, and restart SSL


• Clusters: Control the servers in the cluster
• Deployments: Start or stop servicing requests
• JMS destinations: Pause or resume production, insertion,
consumption
• JDBC data sources: Start, suspend, resume, shrink, reset, a b le
clear statement cache s f er
- t r an
• And so on on
n
aa resource,
Find a resource type under Domain Structure, selecta s
h
m) it. eฺ
click the Control tab, and select how to control
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua works to
• Servers: Start
u c(only s e if Node Manager is configured and running), shut down
o Dcompletes
(when twork
l i c en or force shutdown now), suspend (go from RUNNING to ADMIN
r n es resume (from STANDBY or ADMIN to RUNNING state), and restart SSL (restart
state),
n E SSL after changes made to the keystore files).
J u a • 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 beb createdt d andd placed
l d on th
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 - 21


Aula Matriz SฺAฺSฺ

Enterprise Manager Cloud Control

• It is a tool for administering and monitoring your entire Oracle


IT infrastructure, including FMW components.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Cloud Control requires its own installation. (It is not installed


as part of some other component.)
• Cloud
Cl d Control
C t l supplies
li a web bbbrowser–based
b d ttooll ffor
administering and monitoring many Oracle components.
– Unlike other WebLogic tools, Cloud Control allows you to
administer multiple WebLogic domains. e
• Cloud Control was called Enterprise Manager Grid Control in r a bl
ns fe
11g.
11 - t r a
n on
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua Control tois composed of four main components:
Enterprise Manager
u cCloud n s e
• One orto
D iceManagement
e s l
more Oracle Agents

n E n Management Plug-ins
• rOracle

J ua • 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 - 22


Aula Matriz SฺAฺSฺ

Quiz
Q
The default context path of the web application that is the
administration console is __________.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a.admin
b.em
c.console
d.weblogic

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: c u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 23


Aula Matriz SฺAฺSฺ

Quiz
Q
In the administration console, to view information about a
domain resource, first select that resource in the __________.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. Configuration tab
b. Domain Structure
c. Change Center
d. Menu

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: b u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 24


Aula Matriz SฺAฺSฺ

Summary

In this lesson, you should have learned how to:


• Access the WebLogic Server administration console
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Create and configure servers by using the administration


console

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 25


Aula Matriz SฺAฺSฺ

Practice 6 Overview: Using the Administration Console


g
for Configuration
This practice covers the following topics:
• Accessing the administration console
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Using the admin console to configure domain resources


• Setting some admin console preferences

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 6 - 26


Aula Matriz SฺAฺSฺ

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

Configuring JDBC
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

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


• A generic data source
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• A GridLink data source

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 2


Aula Matriz SฺAฺSฺ

JDBC: Overview

• The Java Database Connectivity (JDBC) API:


– Is a platform and vendor-independent mechanism for accessing
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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
installation or by your database vendor.

ble
fe r a
Get connection Get connection
t r ans
Driver
no n-
SQL statements Database calls
s a
h a
) eDatabase
Application m ฺ
Code ฺ c o i d
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua in Java o
tcode
The JDBC API is the u cway n s e to work with the database Structured Query Language
D
touse. e
(SQL). It builds
e
find it easysto
lic Database Connectivity (ODBC), so developers familiar with ODBC
on Open
rn
nBy Eusing JDBC, a Java application can access virtually any relational database and run on
Juaany 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
li h d database
t b connections
ti b
by using
i addriver
i mechanism
h i th
thatt ttranslates
l t ththe
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


Aula Matriz SฺAฺSฺ

WebLogic JDBC Drivers

• Oracle and third-party drivers for many databases are


included in the WebLogic Server installation:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Oracle 11g and 12c


– Sybase
– Mi
Microsoft
ft SQL S
Server
– IBM DB2
– Informix
– MySQL e
r a bl
• By default, these drivers are added to the server’s s fe
CLASSPATH. To use other drivers, you must update the -tran
server’s CLASSPATH. non a
• XA (Extended Architecture) drivers provide)support a s
h ฺ for global
transactions. m
co uide
i l ฺ
g ma ent G
a r a@ Stud
d u cu thisCopyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sare to
The WebLogic JDBC u cdrivers e installed with Oracle WebLogic Server in the
t o D icenfolder, where <WL_HOME> is the directory in which you installed
<WL_HOME>/server/lib
e s
OraclenWebLogic
l
Server. Driver class files are included in the manifest CLASSPATH in
Er
nweblogic.jar, so the drivers are automatically added to the server’s CLASSPATH.
Jua

Oracle WebLogic Server 12c: Administration I 7 - 4


Aula Matriz SฺAฺSฺ

Global Transactions: Overview

• A global (distributed) transaction involves more than one


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

– A transaction manager (TM) deals with each resource manager


(RM). WebLogic Server can act as a TM.

Resource Transactional
Manager Resource
ble
Transaction fe r a
Manager
t r ans
Resource o n -
Transactional
Application
Manager
n
aResource
ha ฺ s
)
m ide
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
WebLogic Server can
u cuacta asnsthee transaction manager to the various transactional resource
managers into D e
e s licdistributed transaction.
a global or
Therern
will be more on global transactions in the lesson titled “Transactions.”
Transactions.
nE
Jua

Oracle WebLogic Server 12c: Administration I 7 - 5


Aula Matriz SฺAฺSฺ

Two-Phase Commit

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


changes within a global transaction:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Phase I: Prepare
RM Resource
Yes
TM
Ready?
RM Resource
Yes

• Phase II: If all resources are ready, the TM tells them to ble
commit. Otherwise, the TM tells them to roll back. fe r a
t r ans
RM Resource n-
n o
TM s a
Commit h a
RMm) eฺ
Resource
ฺ c o i d
Extended Architecture (XA) implements 2PC.
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nse to
Two-phase commituprotocol:
• Phaseto
D icRMs e to prepare to make the changes.
s 1: TM asks l
e 2: If all RMs report that they are ready to commit
n
• rPhase
E which makes the changes permanent. If any RMcommit, TM tells the RMs to commit
commit,
ua n is not ready to commit, TM tells all RMs
J 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


Aula Matriz SฺAฺSฺ

JDBC Data Source

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


one or more instances of WebLogic Server.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• A deployed data source has connections to a particular


database in its connection pool ready-to-go for applications
running on those servers
servers.
– The connection pool configuration determines which database
is used and how many connections are in the pool.
– Applications locate a data source in a server’s tree of resources
by using the Java Naming and Directory Interface (JNDI) API. ble
fe r a
source, it can ns
After the application has a reference to the data source

a
request a database connection from the data source. n-tr
no
s a
h a
) eฺ
o m
a i l ฺc Guid
Application Data
g
Source
t
m enDatabase
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
A data source is a u cuaobject
Java s emanaged by WebLogic Server and used by application code to
o
obtain a database
t l i c en Retrieving a database connection from a data source is better
D connection.
r n es a connection directly from the database for two reasons:
than getting
n • E Connections in a data source’s connection pool have already been created. Therefore,
J u a 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 off WebLogic Server.
S
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
pp
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


Aula Matriz SฺAฺSฺ

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
2. Data Source

for a connection.
3. It uses the connection Application Code Connection
(which uses a driver) to Pool
access the database. 3
ble
4. When finished, it fe r a
closes the connection Driver t r ans
(which returns it to the WebLogic Server no n-
pool). s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
A data source is a u cuaobject
Java s e
managed by WebLogic Server and used by application code to
o
obtain a database
t l i c en Retrieving a database connection from a data source is better
D connection.
r n es a connection directly from the database for two reasons:
than getting
n • E Connections in a data source’s connection pool have already been created. Therefore,
J u a 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 off WebLogic Server.
S
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
pp
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


Aula Matriz SฺAฺSฺ

Java Naming and Directory Interface (JNDI)

• An API for accessing directory or naming services.


• WebLogic Server keeps a tree of its resources in memory that
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

can be accessed by using JNDI.


• JNDI terms:
– Context: A “container” node in the JNDI tree that can contain
other contexts and objects
– Object: A leaf node in the JNDI tree. Resources are objects.
– Binding: Associating an object with a name and a context e
r a bl
nsfe
t r a
n-
javax
n o
= context
transaction
s a
UserTransaction h
) eฺa
= object m
o u dthis object:
nameiof
a ilฺc t G
Full binding
javax.transaction.UserTransaction

@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nsnaming
JNDI is an API thatuprovides e to and directory functionality to Java applications
independentto D specific
of any i ce naming or directory service implementation (such as the
s l
e Directory Access Protocol [LDAP], Domain Name Server [DNS], or a file system).
Lightweight
r n
E Server, upon starting, creates a tree of its resources in memory that can be
WebLogic
a n
u accessed by using JNDI.
J
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


Aula Matriz SฺAฺSฺ

JNDI Duties of an Administrator

• Report to developers the JNDI names of resources you


create, so they can look them up in their code.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Check whether resources are in the JNDI tree of an instance


of WebLogic Server.
– Y
You can view
i th
the JNDI ttree off a server b
by using
i ththe admin
d i
console.

4
ble
fe r a
t r ans
no n-
s a
h a
3 )
ฺ c o m i d eฺ
1
2
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to the administration console:
To view a server’su cuatreensbyeusing
JNDI
t o D Structure,
1. In the Domain
s l i ce expand Environment and click Servers.
n
2 rIn
2.
e
the Servers table,
table select the server of interest
interest. (In this example
example, server1 is selected.)
selected )
n E
J ua 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


Aula Matriz SฺAฺSฺ

Deployment of a Data Source

• The configuration of a WebLogic Server data source is stored


in an XML document called a JDBC module:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– A WLS-specific extension of Java EE modules


– Targeted to certain instances of WebLogic Server
• A JDBC module
d l iis either
ith a system
t module
d l or an application
li ti
module.
– A JDBC system module is created by using the administration
console or WLST. It resides in the domain configuration here: e
domainname/config/jdbc/dsname-jdbc.xml r a bl
— domainname: The main domain directory nsfe
t r a
— dsname: The name of the data source
no n-
– A JDBC application module can be deployed a a
s within a
either
Java EE application or stand-alone.
h
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sefortothe connection pool of a data source are created when the
The connections touacdatabase
o
data sourcetis D created
first
l i c en(or deployed) to a targeted instance of WebLogic Server.
r n es connections are created when that server is restarted.
Subsequently,
n E application module can be part of a Java enterprise application. In that way, the data
A JDBC
J u asource 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


Aula Matriz SฺAฺSฺ

Targeting of a Data Source

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


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

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

Server 1 Server 2 Server 3


Data Source Data Source Data Source
ble
fe r a
Connection Connection Connection
t r ans
Pool Pool
no
Pool
n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuacontains
A JDBC module, which
u s e a data source, is targeted to one or more instances of
o D When
WebLogic Server.
t l i c ea nserver is targeted, it will have its own instance of that data source.
r n es
nE
Jua

Oracle WebLogic Server 12c: Administration I 7 - 12


Aula Matriz SฺAฺSฺ

Types of Data Sources

• Generic data source


– Is a standard data source with a connection pool tied to
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a particular database
• Multi data source
– IIs a collection
ll ti off generic
i d
data
t sources titied
d
to multiple database servers
– Is looked up and used by applications like
a generic data source
ble
– Transparently provides load balancing or failover across
fe r a
its member generic data sources
t r ans
• GridLink data source no n-
– Provides connectivity between s a
h
) eฺ a
WebLogic Server and the m
o uid
Oracle Real Application Clusters a(RAC) ilฺc tDatabase
G
Oracle
RAC
g m en
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to around a collection of generic data sources that provides
A multi data sourceu cuanaabstraction
is s e
n that data source collection. Applications look up a multi data
load balancing
t o Dfailover
or i c eamong
l
sourcenineasserver’s JNDI tree just like they do a generic data source, and then ask the multi
data
r
Esource for a database connection. The multi data source determines which data source
a n
u to use to satisfy the request depending on the algorithm selected in the multi data source
J 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
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 can be
f
foundd llater
t iin thi
this llesson.

Oracle WebLogic Server 12c: Administration I 7 - 13


Aula Matriz SฺAฺSฺ

Types of Data Sources Partition 1

• Proxy data source: Partition 2

– Is a light weight data source


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

– Simplifies administration of Partition N


data sources associated with partitions
– Provides for accessing partition
data sources using simplified naming
• Universal Connection Pool (UCP) data source:
– Is an optional data source type
a b le
– Provides an alternative connection pooling technology to
s f er
traditional connection pooling
- t r an
on to
– Supports Oracle Universal Connection Pooling to connect
n
a
Oracle Databases as ) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to Server Multitenant environment, resources,
cua InnsaeWebLogic
• Proxy data source:
u
including
t D sources,
o data i ce are replicated for each partition. The Proxy data source
s l
e the administration of multiple data sources by providing a light-weight
simplifies
r n
E mechanism for accessing a data source associated with a partition or tenant.
u a n Applications often need to quickly access a data source by name without needing to
J know the naming conventions, context names (partitions or tenants), and so on. The
Proxy data source provides the access to the underlying data sources. All of the
significant processing happens in the data sources to which it points. That is, the
underlying data sources actually handle deployment, management, security, and so on.
• Universal Connection Pool (UCP) data source: A UCP data source is provided as an
option for users who wish to use Oracle Universal Connection Pooling to connect to
Oracle Databases. UCP provides an alternative connection pooling technology to Oracle
WebLogic Server connection pooling. The implementations of UCP data sources are
loosely coupled, allowing the swapping of the ucp.jar to support the use of new UCP
features by the applications. UCP data sources are not supported in an application-
scoped/packaged or stand-alone module environment.
Note:
N t Oracle
O l generally ll recommendsd the
th use off Active
A ti GridLink
G idLi k d
data
t source, M
Multi
lti D
Data
t
Source, or Generic data source, and Oracle WebLogic Server connection pooling included in
these data source implementations to establish connectivity with Oracle Databases.

Oracle WebLogic Server 12c: Administration I 7 - 14


Aula Matriz SฺAฺSฺ

JCS Default Data Source

Oracle provides a default data source required by a Java EE 7


compliant run time. This preconfigured data source can be used
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

by an application to access the Derby Database installed with


WebLogic Server.

Attribute Value

Name java:comp/DefaultDataSource
ble
Initial capacity Text
fe r a
t r ans
Min capacity 0
no n-
Max capacity 15 s a
h
) eฺa
Classname o m
org.apache.derby.jdbc.ClientDataSource
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Oracle provides a u cua data
default s e
source required by a Java EE 7-compliant run time.
t o
This preconfigured l en can be used by an application to access the Derby Database
D dataicsource
n s WebLogic Server. It is accessible under the JNDI name:
ewith
r
installed
E
njava:comp/DefaultDataSource
Juawhich is equivalent to:
@Resource(lookup="java:comp/DefaultDataSource") DataSource myDS;
You can explicitly bind a DataSource resource reference to the default data source using the
lookup element of the Resource annotation or the lookup-name element of the resource-ref
deployment descriptor element
element.
A default data source has the following characteristics:
• Must be available for each component that is deployed
• Only accessible for deployed components, not for data sources that are system
resources or stand-alone deployments
• Only visible in a console after it has been referenced
• Appears as a deployment for each component, like other Java EE deployments
• Not configurable
• Has the lifecycle of the associated application

Oracle WebLogic Server 12c: Administration I 7 - 15


Aula Matriz SฺAฺSฺ

JCS Default Data Source

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

Port 1527

Host localhost

Database name DefaultDataSource

User none

Password none
ble
Transactional false fe r a
t r ans
MaxStatements 0 o n-
s an
MaxIdleTimeout not set
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
r n e
nE
Jua

Oracle WebLogic Server 12c: Administration I 7 - 16


Aula Matriz SฺAฺSฺ

Creating a Generic Data Source

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

ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
ilฺc t Guid
1
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cua drivers
Make sure that theuJDBC
n s e tthat you want to use to create database connections are
D e
o the servers
installed on tall
e s
in the servers’
lic onSome
which you want to configure database connectivity and they are
JDBC drivers are installed with Oracle WebLogic Server
r n CLASSPATH.
andEare placed in the CLASSPATH by default. To create a generic data source after clicking
a n
u Lock & Edit in the Change Center, perform the following tasks:
J
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
i f
information
ti and d th
then click
li k Next:
N t
- 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
yds Note
myds. ote that
t at the
t e name
a e and
a d JNDI
J name
a e ca
can be d
different.
ee t
- 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.
Oracle WebLogic Server 12c: Administration I 7 - 17
Aula Matriz SฺAฺSฺ

Creating a Generic Data Source

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

5b
4a

Selecting a non-XA driver


ble
fe r a
t r ans
4b no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to a driver, and then click Next.
cualistnstoeselect
4. Use the drop-down
u
t
a. This
s oD l
examplei ceshows selecting an XA driver.
r n e
b This example shows selecting a non-XA driver.
b. driver
n E
J ua 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 p participate,
p , even though g 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 - 18


Aula Matriz SฺAฺSฺ

Non-XA Driver Transaction Options

If a non-XA driver is selected, you can still choose for the data
source to support global transactions. If you enable this option,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

you must specify how the data source will participate in those
transactions:
• Logging Last Resource: This resource is processed last 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
a b le
“ready” during phase one of 2PC. This can possibly cause er
s f
heuristic conditions
conditions.
- t r an
• One-Phase Commit: Only this resource can participate n on in the
global transaction. s a
h a ) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua se(LLR): to With this option, the transaction branch in which the
• Logging Last u cResource
o
data source
t Dconnection
l i c en is used is processed as the last resource in the transaction and
r es
isnprocessed as a one-phase commit operation. The result of the operation is written in a
n E log file on the resource itself, and the result determines the success or failure of the
J u a 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 - 19


Aula Matriz SฺAฺSฺ

Creating a Generic Data Source

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

ble
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r toproperties and click Next:
6. Enter valuesu cuthea following
for s e
t o D Name:
- Database l i c en The database name (name requirements vary by DBMS)
r n es
- Host Name: The DNS name or IP address of the server that hosts the database
n E
J u a - 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):
Oracle.jdbc.DRCPConnectionClass sho n) 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
l use DRCP
DRCP. If thi
this string
t i iis nott set,
t th
the DRCP pooll will
ill nott b
be able
bl tto b
be
shared effectively.

Oracle WebLogic Server 12c: Administration I 7 - 20


Aula Matriz SฺAฺSฺ

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
p y at the top
p of the p
page.
g 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ฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 21


Aula Matriz SฺAฺSฺ

Creating a Generic Data Source

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

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
9. Select the servers
u s e toto which the data source should be deployed and then
cuaor nclusters
o D If nolicservers
click Finish.
s t e are targeted, the data source is created, but not deployed.
You
r n ewill need to target it later. As usual, to confirm the changes, in the Change Center,
n E click Activate Changes.
J u a

Oracle WebLogic Server 12c: Administration I 7 - 22


Aula Matriz SฺAฺSฺ

Connection Pool Configuration

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

Pool size attributes

Statement cache attributes


ble
fe r a
t r ans
no n-
Connection testing attributes s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to configuration in the console, you can tune its connection
cuadata
After creating youruinitial s e
source
(inD
pool settingsto the Change
l i c en Center click Lock & Edit if you have not already done so):
n
1. rIn eesDomain
tthe o a St Structure
uctu e ttree,
ee, e
expand
pa d SeServices
ces a
andd se
select
ect Data
ata Sources.
Sou ces CClick
c o
on you
your
E
n data source name in the table. Then click the Configuration > Connection Pool tab.
Jua 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 - 23


Aula Matriz SฺAฺSฺ

- 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
T t Frequency:
F Th number
The b off secondsd b
between
t ttests
t off unused
d connections.
ti
Connections that fail the test are closed and reopened to reestablish a valid
connection. If the test fails again, the connection is closed.
- Test Table Name: The name of the database table to use when testing connections.
This name is required when you specify a Test Frequency or enable Test Reserved
Connections. The default SQL used in testing is: select count(*) from bl e
fe
tablename. If the Test Table Name field begins with SQL, the rest of the string is
r a
taken as a literal SQL statement to use in testing connections. t r ans
o n-
an
Note: There will be more information about these connection pool settings later in this lesson.
s
ha ฺ
)
m ide
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 24


Aula Matriz SฺAฺSฺ

Connection Properties

Connection properties are:


• Found in the configuration of the data source under
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Configuration > Connection Pool


• Property/value pairs entered in:
– Properties as: property=value
– System Properties as: property=systemProperty
• Used to configure JDBC connections
• Passed to the driver during connection setup ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
You can enable driver-level
u s e to by adding the property and its value to the Properties
cua nfeatures
attribute of the
t D icepool of a data source.
o connection
e s l
n
Data rsources also support setting driver properties by using the value of system properties.
nAddEa system property to the System Properties attribute of the connection pool of a data
Juasource. 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 - 25


Aula Matriz SฺAฺSฺ

Testing a Generic Data Source

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

4
ble
fe r a
t r ans
no n-
s a
5 ha
1
m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a the o
tselected
When you test a datau cusource,
n s e server reserves a connection from the data source
D
to connection e
and then releases
attribute e
ofsthe
lic pooltesting
it, thereby
is
the connection pool. If the Test Connections on Reserve
enabled, the acquired connection is also tested as part of
theE
r n
reserve operation. In that case, you must have specified a table name or SQL query in
a n
u the Test Table Name attribute of the data source’s connection pool (as well as selected the
J 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 - 26


Aula Matriz SฺAฺSฺ

Oracle Real Application Clusters: Overview

• Oracle Real Application Clusters (RAC):


– Supports multiple Oracle database servers for greater
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

scalability and reliability


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

RAC
node 1 ble
fe r a
Shared
Driver
Storage t r ans
RAC no n-
Application a
node 2 s
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cuaClusters
Oracle Real Application
u n s e t(RAC) is software that enables users on multiple machines
D
o database e
to access a tsingle
database e s
instances
lic on
running
with increased reliability. RAC is made up of two or more Oracle
two or more clustered machines that access a shared storage
r n
E via cluster technology. To support this architecture, the machines that host the
ndevice
Juadatabase 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
performance, but does not result in down time
time.

Oracle WebLogic Server 12c: Administration I 7 - 27


Aula Matriz SฺAฺSฺ

GridLink Data Source for RAC

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


• Performs intelligent load balancing based on the current RAC
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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 affinity”)

WebLogic Server RAC


ble
node 1
fe r a
t r ans
GridLink
Data Source no
RAC
node 2
n-
s a
h a
)RAC eฺ
o m
Applications a ilฺc t G ui3d
node

@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a provides to connectivity between WebLogic Server and an Oracle
cusource
A single GridLink data
u s e
n targeted to an Oracle RAC cluster. This type of data source
o
database service
t Dthat has
i c ebeen
l
es adjusts the distribution of work based on the current performance metrics
automatically
r n
E by each RAC node, such as CPU usage, availability, and response time. If this
nreported
Juacapability 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 - 28


Aula Matriz SฺAฺSฺ

GridLink, FCF, and ONS

• Typically, when a system goes down, applications must wait


for the network to time out (perhaps minutes).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• FCF pattern: The Oracle Notification Service (ONS) delivers


Fast Application Notification (FAN) events about RAC
availability and workload to registered subscribers.
subscribers
• The GridLink data source can subscribe to ONS and
immediately respond to nodes that are added or removed.

ble
ONS RAC node
fe r a
WebLogic
g Server
FAN t r ans
GridLink ONS events
no n-
Data Source Client s a ONS RAC node
h
) eฺ a
o m
a ilฺc t ONS
G uidRAC node
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
When a database u cua occurs,
outage
n s e ttwo problems confront applications: errors and hangs.
Applicationsto D
encounteric e
e
interrupted.s Even
l errors
worse, those
because the work they were doing (queries, transactions) is
errors may take some time to arrive. When the database
r n
E occurs, the client application may have to wait for network timeouts (which may be
noutage
Juasome
minutes) before being informed of the outage. This can cause the application to hang for
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
(i l di reserved
(including d connections)
ti ) without
ith t the
th needd to
t pollll and
d test
t t connections.
ti The
Th ddata
t
source also distributes connections to Oracle RAC instances based on these FAN events.

Oracle WebLogic Server 12c: Administration I 7 - 29


Aula Matriz SฺAฺSฺ

GridLink and Services

• Oracle Database supports services that:


– Act as gateways to a subset of RAC nodes
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– 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
your grid for different clients
• FCF requires the use of database services.
• Create a separate GridLink data source for each service. ble
fe r a
GridLink
G idLi k A RAC node
t r ans
Data Source for
Service A n o n-
a A
Applications
GridLink Ba
h s node
RAC

Data Source for m ) eฺ


o
Service B
a ilฺc t GuB idRAC node
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sfore atoRAC database that enable its workload to be managed.
Services are entitiesu cdefined
Services alsot o D icany
decouple
l enhardwired mapping between a connection request and a RAC
instance.
n s service represents a workload with common attributes, thresholds, and
eEach
r
E For example, online users can be one service, batch processing can be another
npriorities.
Juaservice, 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.
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 - 30


Aula Matriz SฺAฺSฺ

GridLink and Single Client Access Name (SCAN)

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


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

– Accepts a database cluster alias


– Returns the locations of cluster members
– Can
C run iindependently
d d tl or integrate
i t t with
ith your corporate
t DNS
• GridLink data sources can either use a list of database node
locations or a single SCAN address.
ble
GridLink
Data Source fe r a
RAC node
RAC node
t r ans
GridLink no n-
Data Source
RAC node OR SCAN a
s RAC node
h
) eฺa
o m
RAC node
a ilฺc t Guid RAC node
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua (SCAN) to is a new feature starting with RAC 11g Release 2 that
Single Client Access
u cName s e
o
provides a single
t Dnameicforenclients to access databases running in a cluster. The benefit is that
e s
the client’s
l information does not have to change if you add or remove nodes in the
connection
ErnHaving a single name to access the cluster allows clients to access any database
ncluster.
Juarunning 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.
p

Oracle WebLogic Server 12c: Administration I 7 - 31


Aula Matriz SฺAฺSฺ

Creating a GridLink Data Source

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

2
3

ble
4
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a ea change to to the configuration in the administration console,
1. As always, when u cumaking s
you first
t o D Lock
click
l i c e&nEdit in the Change Center. Then, in the Domain Structure, select
r n es > Data Sources. Then click New > GridLink Data Source.
Services
n2.E Supply a Name, JNDI Name, and select the Database Driver. Then click Next. Notice
J u a 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 - 32


Aula Matriz SฺAฺSฺ

Creating a GridLink Data Source

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

ble
fe r a
t r ans
o n-
7 a8n
h a s
m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuaName.
5. Enter the Service
u n s e
t D button
oAdd i cemultiple
6. Uses
e the l times to specify a list of initial database listeners to connect
n or use the Add button once to specify a Single Client Access Name (SCAN)
Erto,
ua n address. A GridLink data source containing SCAN addresses does not need to change
J 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 p password for the database user account
- Confirm Password (not shown): The password again

Oracle WebLogic Server 12c: Administration I 7 - 33


Aula Matriz SฺAฺSฺ
- 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
Data Source” section.
8. Click Next. bl e
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 34


Aula Matriz SฺAฺSฺ

Creating a GridLink Data Source

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

10

ble
fe r a
t r ans
no n-
s a
h a
) eฺ 11
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to displayed. Notice that the Driver Class Name cannot
9. cua nsand
Review the properties
u e values
o D ThelicURL
be changed.
s t e has been generated from what was entered earlier, but could be
ne
rmodified. The Database User Name (not shown) and Password (not shown) can be
E modified. As with generic data sources, driver-level features can be enabled by adding
u a n properties and values to the Properties (not shown) and System Properties (not
J 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 Wh
11. When you h have confirmed
fi d th
the properties
ti ((and,
d if you ttested,
t d th
the ttestt was successful),
f l)
click Next.

Oracle WebLogic Server 12c: Administration I 7 - 35


Aula Matriz SฺAฺSฺ

Creating a GridLink Data Source

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

13

ble
fe r a
t r ans
15 no n-
s a
h a
) eฺ
c o m id 16
i l ฺ u
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tisoselected if you want WebLogic Server to subscribe to
12. Confirm thatu cuaEnabled
FAN s e
Oracleto D events.
FAN
l i c en
n esthe Add button multiple times to specify a list of initial ONS daemon processes to
13. rUse
n E connect to. You can also optionally configure the ONS client on WebLogic Server to
J u a 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 - 36


Aula Matriz SฺAฺSฺ

Creating a GridLink Data Source

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

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
17. Select the servers
u s e toto which the data source should be deployed, and then
cuaor nclusters
o D If nolicservers
click Finish.
s t e are targeted, the data source is created, but not deployed.
rYou
n ewill need to target it later. As usual, to confirm the changes, in the Change Center,
n E click Activate Changes.
J u a

Oracle WebLogic Server 12c: Administration I 7 - 37


Aula Matriz SฺAฺSฺ

Common Data Source Problems

• Data source configuration errors:


– Invalid JDBC URL
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

— 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
because a network connection could not be established, but
because the database rejects the connection attempt.
– Wrong driver version in the CLASSPATH
bl e
Errors can be subtle and hard to catch if the version of the driver is fe r a
ns

nott the
th one expected. t d Ensure
E that
th t the
th drivers
di you wantt to
t use t r a
are
-this line
in the CLASSPATH before the standards. For example, add o n
in setStartupEnv.sh after the CLASSPATH has been
s a n set:
) ha ฺ
c o m ide
POST_CLASSPATH="/path/customdriver.jar"

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a cane be tocaught when the data source is created in the
Note that the first two
u cuerrors s
n the Test Configuration button.
administration
t o D icbyeusing
console
l
esinstalled in the <WEBLOGIC_HOME>/server/lib
E r
Driversnare <WEBLOGIC HOME>/server/lib directory by using

uan
weblogic.jar. The manifest file found in weblogic.jar lists driver JARs to be loaded
J 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
<WEBLOGIC_HOME>/server/lib
the front of your CLASSPATH using the PRE_CLASSPATH or at the end using
POST_CLASSPATH within the setUserOverrides.sh script.

Oracle WebLogic Server 12c: Administration I 7 - 38


Aula Matriz SฺAฺSฺ

Common Data Source Problems

• Insufficient connections
– When the maximum capacity is
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.
– If this happens often, see whether le
a b
more connections from the
s f er
available, and ran
database are available
t
on-
increase the MaximumnCapacity.
– If the applications s
cana wait longer,
a
) h the
perhaps increase
o m d e ฺ Connection
c i
ailฺ Timeout
Reserve
m ent Gu seconds.
g
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
ua sea connection
When an applicationu crequestsn from a data source, if all connections in the data
source are in D e
touseConnectionUnavailableSQLException.
and iifcthe data source has expanded to its maximum capacity, the
e
applicationsgets
l To avoid this, you can
r n
E the Connection Reserve Timeout value (in seconds) so that connection requests
configure
a n
u wait for a connection to become available. After the Connection Reserve Timeout has
J 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
indefinitely.

Oracle WebLogic Server 12c: Administration I 7 - 39


Aula Matriz SฺAฺSฺ

Common Data Source Problems

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

can starve the data source of


connections.
— Hold a connection too long,
long even
when not currently using it
— Forget to close a connection (so it
can return to the pool)
– To provide a failsafe, WebLogic e
Server can automatically reclaim a r a bl
nsfe
connection after a certain amount r a
of inactivity. n- t
a no
h a s
) eฺ
Reclaim a reserved connection
m
o
ilฺc t Guid
after two minutes of inactivity.
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to that was not properly returned to the connection pool in
A leaked connection u cisuaaconnection
s e
the data source.
t o l i c en recover leaked connections, you can specify a value for
DTo automatically
Inactiven s
eConnection Timeout. Find this attribute in the Advanced section of the Connection
r
E tab. WebLogic Server forcibly returns a connection to the data source when there is no
Pool
u a n
activity on a reserved connection for the number of seconds that you specify. When set to 0
J (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
connections.
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 - 40


Aula Matriz SฺAฺSฺ

Common Data Source Problems

• Statement timeout
– Most JDBC drivers support a
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

maximum time limit for SQL


statements that can be set:
— By using the Statement Timeout
attribute
— Programmatically by the
application
– Increase this value if your e
applications require complex, r a bl
nsfe
long running database
long-running r a
operations. n- t
a no
has ฺ
If statements time out) before
o
completion, increase
c mthis value.
ide
i l ฺ u
g ma ent G
a r a@ Stud
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nsoption,
With the StatementuTimeout e toyou can limit the amount of time that a statement is
s t o D When
allowed to execute.
l i ceyou set a value for Statement Timeout, WebLogic Server passes
the time
r n especified to the JDBC driver by calling the Statement’s setQueryTimeout()
E WebLogic Server makes the call, and if the driver throws an exception (this is
method.
n
J a
u 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 - 41


Aula Matriz SฺAฺSฺ

Basic Connection Pool Tuning

• Pool Capacity
– Connection creation is expensive.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– For applications with consistent,


heavy database use:
— Determine Maximum Capacity
experimentally
— Set Initial Capacity equal to
Maximum Capacity
– For applications with intermittent ble
peak database use: fe r a
Use different values for Initial and t r ans
n-

Maximum Capacity
a no
— Tune the Shrink Frequency
h a s
(seconds) based on the speed of m ) eฺ
o
the load changes
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Each data source u cuaapool
has sofedatabase connections that are created when the data source
o
is deployed tor atDserver
l i c en Applications use a connection from the pool and then return it
startup.
when they
r n eshave finished using it. Connection pooling enhances performance by eliminating
ntheEcostly task of creating new database connections for the application.
JuaCreating 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
O t avoid
id connection-creation
ti ti delays
d l iis tto iinitialize
iti li allll connections
ti att server startup,
t t
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 - 42


Aula Matriz SฺAฺSฺ

Basic Connection Pool Tuning

• Connection testing helps to ensure that connections are


viable, but can degrade performance.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– 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.
— If you use Test Frequency, do not test too often.
– To help minimize the performance impact of testing, use
Seconds to Trust an Idle Pool Connection ble
fe r a
— It is the number of seconds after a connection has been proven
p
t
viable that WebLogic Server trusts it and skips testing it again.r ans
- on
a n
h a s
m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
a e connections
To make sure thatu cudatabase
the
n s in a data source remain healthy, you can
D e
o the connections.
periodically ttest
configuree s
with
licof the connection
attributes
WebLogic Server provides automatic testing that you
pool.
r n
n• E Test Connections on Reserve: Enable this to test each connection before assigning it
Jua 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
connections. When unused connections are testedtested, 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
f impact off connection testing, especially
during heavy traffic.

Oracle WebLogic Server 12c: Administration I 7 - 43


Aula Matriz SฺAฺSฺ

Basic Connection Pool Tuning

• Statement caching
– Prepared and callable statements can be cached to improve
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

overall performance through reuse.


– The Statement Cache Type determines the algorithm.
— LRU: Once the cache is full
full, the least recently prepared/callable
statement is replaced by a new one.
— FIXED: Once the cache is full, no new prepared/callable statement
is cached.
– Determine the size of the cache through experimentation ble
— Warning: Some databases maintain an open cursor for each opens fe r a
r an
statement, so if the cache is too large, you could exceed thetopen
-
cursor limit. non a
a s
m ) h eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
ua seachr toconnection in a data source has its own individual cache
If you use statement
u ccaching, n e
o
of prepared tandDcallable i c estatements. However, you configure statement cache options per
e
data source.s That is,
l
the statement cache for each connection in a data source’s connection
r n
npoolEuses the statement cache options specified for the data source, but each connection
Juacaches 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
f fixed
f number off prepared and callable statements is cached. After
f 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
p statement. This applies
open pp to the p
prepared
p 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 - 44


Aula Matriz SฺAฺSฺ

Quiz
Q
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
c.
d. JNDI

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: d u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 45


Aula Matriz SฺAฺSฺ

Quiz
Q
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
b. 12
c. 30 a b le
s f er
d 36
d. ran n - t
n o
s a
a
) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: c u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 46


Aula Matriz SฺAฺSฺ

Summary

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


• A generic data source
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• A GridLink data source

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 47


Aula Matriz SฺAฺSฺ

Practice 7-1 Overview: Configuring a JDBC


Data Source
This practice covers creating and configuring a generic data
source.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 7 - 48


Aula Matriz SฺAฺSฺ

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

Monitoring a Domain
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


• Configure and access WebLogic Server logs
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Enable WebLogic Server debugging output


• Monitor WebLogic Server health and performance
• Monitor JDBC data sources
• Access diagnostic charts in the Monitoring Dashboard

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 2


Aula Matriz SฺAฺSฺ

WebLogic Server Logs

The subsystems of an instance of WebLogic Server publish


information about themselves into logs.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Log
g Description
p

Server log Used by server subsystems to record events

Standard out Some server log messages are printed to standard out.

Domain log Some server messages are gathered by the administration server ble
for inclusion into the domain-wide log. fe r a
t r ans
Access log Used by the HTTP subsystem to track HTTP communication
o n -
Audit log Tracks security requests. Requires configuring a a n provider
ansAuditing
(not configured by default).
m ) h eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Each WebLogic Server u cuainstances e writes the messages from its subsystems and applications
into a servertologDfile that
l i c enlocated on the local host computer.
is
r n esto writing messages to a log file, each server instance prints a subset of its
In addition
E
nmessages to standard out. Usually, standard out is the shell (command prompt) in which you
Juaare 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 hihigher.
h Whil
While you can modify
dif th
the ttype off messages th
thatt are fforwarded,
d d 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


Aula Matriz SฺAฺSฺ

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
JMS Server log • Is enabled when a JMS Server is created
• Message destinations must be specifically enabled. ble
fe r a
• Contains information on basic message
g lifecycle
y events
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
The WebLogic Auditing
u cuaprovider
s e records information from a number of security requests,
o
which are determined
t l c en by the WebLogic Security Framework. The WebLogic
D iinternally
Auditing
n s
eprovider also records the event data associated with these security requests, and the
r
E of the requests. Configuring an Auditing provider is optional. The default security
noutcome
Juarealm 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.
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
off the
th basic
b i message lif lifecycle
l events
t generate
t a message llog eventt iin th
the JMS message llog
file.

Oracle WebLogic Server 12c: Administration I 8 - 4


Aula Matriz SฺAฺSฺ

WebLogic Server Log Locations

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

/servers
/AdminServer Admin server (named AdminServer) directory
/logs
 AdminServer.log The server log file for AdminServer
 domainname.log The domain log
/server1 Directory for managed server named server1
/logs
ble
 server1.log The server log file for server1 fe r a
 access.log HTTP subsystem log t r ans
/jmsServers no n-
s a
/jmsservername
h a
) eฺServer called
 jms.messages.log o m
JMS lifecycle events of the JMS
id
a ilฺccreated
jmsserverame
G onuserver1
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nserver
Note that the administration
u s e toalso has an access.log file, which is not shown here.
The auditing
s t ologDlocation
l i ceis also not shown. If the WebLogic Auditing provider is configured,
r n
the auditelog is here:
E
ndomainpath/domainname/servers/servername/logs/
JuaDefaultAuditRecorder.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
created. There is a log file for each
JMS Server.

Oracle WebLogic Server 12c: Administration I 8 - 5


Aula Matriz SฺAฺSฺ

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

NOTICE More important operation information


ble
fe r a
WARNING Something suspicious occurred
occurred, but it might not affect normal
t r ans
operation.
o n-
ERROR an
A user level error has occurred, but the system or application can
s
ha ฺ
handle it with no interruption and limited degradation of service.
)
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r toin this lesson.
cuaflags
There is more on debug
u s e
later
t o D icen
e s l
n Ern
J ua

Oracle WebLogic Server 12c: Administration I 8 - 6


Aula Matriz SฺAฺSฺ

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
recover
degradation of service.
ALERT A particular service is unusable, while other parts of the system still
function. Automatic recovery is not possible. Immediate attention of
an administrator is needed. e
r a bl
EMERGENCY The server is unusable. This indicates a severe system failure.
nsfe
t r a
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 7


Aula Matriz SฺAฺSฺ

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>

Thread information

<[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'>


ble
fe r a
Username WLDF diagnostic
g context ID Transaction ID
t r ns
Raw time ((milliseconds))
a
<<WLS Kernel>> <> <> n -
<1359039873281>
o
s an
Message number Message ) ha ฺ
c o m ide
<BEA-000197> <Listening for announcements from
messaging> a ฺ
il t Gusing
cluster u unicast cluster
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuain any
Log files can be viewed
u s etext editor.
t o
In this example, l i c en are placed in the log entry for readability. The username being
Dextra blanks
es Kernel, an internal ID used by the server itself. Also, there is no WebLogic
used risnWLS
n E
Diagnostic Framework (WLDF) context ID (it is blank), nor a transaction ID (also blank).
J u a

Oracle WebLogic Server 12c: Administration I 8 - 8


Aula Matriz SฺAฺSฺ

Accessing the Logs from the Admin Console


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

ble
fe r a
t r ans
3 o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
uaWebLogic toServer administration console:
To access logs from
u cthe s e
o D Structure,
1. Under tDomain l i c en select Diagnostics and then Log Files.
n es the log of interest and click View.
2 rSelect
2. View
n E
J ua 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


Aula Matriz SฺAฺSฺ

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
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 >
Diagnostics tabs. The configuration of the log file itself is done at the server level.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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 Server or applications to trigger actions at specific code locations and
record data from those actions in the archive. This data is placed in the WLDF
archive (see below).
ble
– Harvested data archive: Diagnostic data from a WLDF “harvest.” WLDF data can
fe r a
be collected byy a WLDF artifact called a data harvester,, which is configured
g
t r ans
periodically collect diagnostic data and store it in this archive. Harvesters are
to

o n-
an
configured in a WLDF diagnostic module. The default location of the WLDF
archive file is: s
ha ฺ
domainpath/domainname/servers/servername/data/store/ )
m ide
ฺ c o
ail nt Gu
diagnostics/WLS_DIAGNOSTICSxxxxxx.DAT
(Where xxxxxx is a generated count.) m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 10


Aula Matriz SฺAฺSฺ

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
rotation type:
By Size or
By Time or ble
None
fe r a
Disabled
Di bl d b
because
t r ans
By Size selected
o
nKeep n-
s a the
a
) h eฺ server logs
latest 100

o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a in the o
tChange
After you click Lock u c&uEditn s e Center, in the Domain Structure of the
administration D e
oconsole,licexpand Environment and click Servers. In the Servers table, click
tthe
the namen e s
of server you want to configure. Click the Logging > General tab. The available
r
E include:
noptions
Jua • 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
fil when
file h it grows too
t large.
l Note
N t that
th t Oracle
O l WebLogic
W bL i S Server sets
t a th
threshold
h ld
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
otat o interval,”
“Rotation te a , the
t e server
se e renames
e a es tthe
e file
e to se
servername.lognnnnn.
e a e. og
• 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


Aula Matriz SฺAฺSฺ

Configuring Server Logging


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

Minimum severity for all logs

Choose either
Log4J or JDK
logging
ble
fe r a
t r ans
no n-
If enabled, redirects server s a
standard out to logs h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuaoptions
The available Advanced
u s e include:
• Minimum t o D
l
severityi c etonlog: The minimum severity of log messages going to all log
r n es
destinations. By default all messages are published.
E
n• Logging implementation: Specifies whether the server logging is based on a Log4J
Jua 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


Aula Matriz SฺAฺSฺ

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.

ble
fe r a
t r ans
noDomain n-
a
s broadcast
h a
) eฺ buffer size
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuaoptions
The available Advanced
u s e include:
n attributes:
t o D icelog
• Log file:
es l
The server
r n- Severity level: The minimum severity of log messages for this log
log. By default all
nE messages go.
Jua - 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


Aula Matriz SฺAฺSฺ

Error Messages Reference

Use the WebLogic Server online Error Messages Reference


document to obtain more information about a specific log
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

message based on its ID.

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
u cua ofnslogemessages
For a detailed description if you only have a message number, use the
D e
to titledliOracle
online document c WebLogic Server Error Messages Reference.
e s
rn
nE
Jua

Oracle WebLogic Server 12c: Administration I 8 - 14


Aula Matriz SฺAฺSฺ

Log Filters

• Provide finer tuned control of the log messages that are


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

• Are based on the values of message attributes


• Are created at the domain level
• Can be applied to different log message destinations:
– Server log
– Server log memory buffer
– Server standard out ble
fe r a
– Domain logg broadcaster ns
t r a
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Log filters provide u cua over
control s ethe log messages that are published. A filter uses custom logic
to evaluate the
t o D message
log
l i c en content and accept or reject a message. For example, you can
r n es of a certain severity level from a particular subsystem. Only the log messages
filter messages
nthatEsatisfy the filter criteria are published. You can create separate filters for the messages
Juathat 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


Aula Matriz SฺAฺSฺ

Creating a Log Filter

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

ble
fe r a
5n
a s
n- t r
a no
h a s
m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e to in the Domain Structure, select the name of the domain.
1. After locking u cuconfiguration,
the
n s
D e
to Configuration
2. Click the
e s lic > Log Filters tab.
n E n the New button.
3 rClick
3. button

J ua 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


Aula Matriz SฺAฺSฺ

Creating a Log Filter

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

Select the
message attribute
ble
fe r a
Select
S l t th
the
t r ans
no
operatorn-
s a
h a
) eฺ Enter a value
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cua npage,
6. On the Configuration
u s e tclick the Add Expressions button.
D
toan expression e
7. Specify
e s lic as part of the criteria for qualifying messages. A filter expression
E rn
defines
de es s
simple
p e filtering
te g rules
u es to limitt tthe
e volume
ou eo of log
og messages
essages tthat
at a
are
e written
tte to a

uan
particular log destination. Select a Message Attribute, an Operator, and a Value. Then
J 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


Aula Matriz SฺAฺSฺ

Creating a Log Filter


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

% is a 8
wildcard.

Expressions
can also be
manually
edited.
ble
fe r a
t r ans
no n-
a
Ensure the expressions are
s
h a
) eฺcombined correctly.

o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to entered, ensure that the Boolean operators that
cua nhave
8. After the expressions
u s e been
connect t D areiccorrect.
othem e Use the drop-down list to choose And or Or. Then click the
s l
e button. Finally, click Activate Changes in the Change Center.
Save
r n
a LogEfilter expressions are WLDF queries. For more information about the WLDF Query
n
J u 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


Aula Matriz SฺAฺSฺ

Applying a Log Filter

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

ble
fe r a
t r ans
n o n-
3 s4a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to locked, in the Domain Structure, expand Environment
1. cua nhas
After the configuration
u s e been
s t o DServers.
and select
l i ceIn the Servers table, click the name of the server that you want to
ne
rconfigure. Click the Logging > General tab.
n 2.E Click Advanced.
Ju a
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


Aula Matriz SฺAฺSฺ

Subsystem Debugging

• Various WebLogic Server subsystems have the ability to


generate detailed log messages to facilitate debugging.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• You can enable debugging on specific servers for individual


subsystems.
1
2

3
ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu thisCopyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to locked, in the Domain Structure, expand Environment
1. cua nhas
After the configuration
u s e been
s t o DServers.
and select
l i ceIn the Servers table, click the name of the server you want to
ne
rconfigure.
n 2.E Click the Debug tab.
Ju a
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


Aula Matriz SฺAฺSฺ

Debug Scopes

• Debug flags (attributes) for WebLogic Server subsystems are


organized into scopes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– You can enable entire debug scopes or individual attributes.


– When a parent scope is enabled, all child scopes and attributes
are also enabled
enabled, unless they are overridden.
overridden

Scopes When in doubt about which scope or attribute ble


to choose, enable a parent category.
fe r a
t r ans
no n-
s a
Attribute
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r toin that you can enable debugging while a server is running.
Changing debugging u cisua“dynamic,”
s e
Many debug t o D canialso
flags l c enbe set as command-line arguments when starting a server. Some
r n
examples:es
n E
J u a • -Dweblogic.debug.DebugCluster=true (cluster debugging)
• -Dweblogic.debug.DebugJDBCSQL=true (SQL debugging)

Oracle WebLogic Server 12c: Administration I 8 - 21


Aula Matriz SฺAฺSฺ

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
Applications application.library, ejb.caching, ejb.invoke, ejb.pooling, servlet,
servlet.internal, servlet.internal.session
Transactions transaction.recovery, transaction.twopc, transaction.xa
ble
Security security, security.ldap, security.ssl fe r a
t r ans
no n-
s a
All “debug scope” messages are the DEBUG ha
severity level, so ensure the log locationm ) eฺ
o
ilฺc t Guid
severity level is set appropriately.
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nsunder
Some examples ofuattributes e toa scope:
t o D lice
• weblogic.jdbc.connection.DebugJDBCConn:
s Traces all connection reserve and
e
ne ease ope
rrelease operations
at o s in data sousources
ces as well e as a all app
application
cat o requests
equests to get o
or cclose
ose
E
uan
connections
J • 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


Aula Matriz SฺAฺSฺ

Admin Console: Monitoring Domain Resources

The administration console can monitor domain resources:


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

• Clusters
• Machines Click the refresh icon to periodically
refresh the page.
• Deployments
• JDBC data sources
• And more
a b le
Use the Domain Structure to locate the type of resource. Select a er
particular instance.
instance Then click the Monitoring tab. tab The an sf
Monitoring tab of some elements have subtabs. o n -tr
a n
• When data is displayed in a table, use the Customize ha ฺ s this
)
table link to modify the columns displayed. om de
a ilฺc t Gui
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nunder
• Servers: Theusubtabs s e tothe Monitoring tab are: General (state, version, OS, and so
s t o DChannels
on), Health,
l i ce (statistics on hosts/ports), Performance (Java memory
r n e
information), Threads (Java thread information), Timers (internal timers used by the
n E server), Workload (information on Work Managers), Jobs (Job Scheduler information),
J u a 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
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


Aula Matriz SฺAฺSฺ

Monitoring the Domain

The domain itself has a Monitoring tab, which can show you an
overview of the domain’s health, servers, clusters, and migration.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Choose a certain
state (like “Failed”)
and click Filter to limit
which servers are
displayed.
ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cua nsein tthe
To access domainumonitoring, Domain Structure, click the domain name, and then click
D e
to tab. Itslicsubtabs are Health, Servers, Clusters, and Migration.
the Monitoring
e s
rn for the Health filter are:
The options
n• E All: Show all servers.
Jua • 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


Aula Matriz SฺAฺSฺ

Monitoring All Servers

The servers table in the admin console lists all the servers in a
domain. The information displayed can be customized so you can
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

use this table to see the information important to you.


To customize the information displayed

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a inethetoDomain Structure, expand Environment and select
cutable,
To access the servers
u n s
to D e
Servers. The
e s servers
lic on the Configuration tab.
table is

n Ern inClick
The data
console).
the servers table can be customized (as many tables can in the administration
Customize this table and you can filter the data displayed and adding or
J ua 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


Aula Matriz SฺAฺSฺ

Monitoring Server Health

The admin console server health monitoring page shows the state
of the server’s subsystems and deployments.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to in the Domain Structure, expand Environment and
ua information,
To access the server
u chealth s e
o
select Servers.
t D c en table, select the server of interest by clicking its name. Click the
In the iservers
l
r n es > Health tab.
Monitoring
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 26


Aula Matriz SฺAฺSฺ

Monitoring Server Performance

The admin console server


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

page shows information on


the JVM.

Request the JVM do a Display the current stacks


garbage collection now. for each thread.

ble
fe r a
Have the admin console
t r ans
refresh the screen
periodically.
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to in the Domain Structure expand Environment and
ua information,
To access the server
u chealth s e
o
select Servers.
t D c en table, select the server of interest by clicking its name. Click the
In the iservers
l
r n es > Performance tab.
Monitoring
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 27


Aula Matriz SฺAฺSฺ

Monitoring Data Source Health

The admin console data source monitoring lets you view data
source state and many statistics about its health and activity.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Many data source attributes are


available when you customize the table.

ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e toin the Domain Structure expand Environment, then
To access data sourceu cumonitoring,
n s
Services, and D
to itslname.
select e
ic Click theInMonitoring
Data Sources. the data sources table, select the data source of
interestn e
by sclicking > Statistics tab.
r
E health, activity, and performance data source attributes are available to display by using
nMany
Juathe Customize this table link.

Oracle WebLogic Server 12c: Administration I 8 - 28


Aula Matriz SฺAฺSฺ

Example Data Source Performance Attributes

Customize the data source monitoring table to display


performance data. For example:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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

Failed Reserve The running total of connection requests that could not be ble
Request Count fulfilled fe r a
Leaked Connection The number of connections reserved but not returned to the t r ans
Count connection pool no n-
a
s for use
Number Available a
The number of connections idle and available
h
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuaof the
The following are some
u s e
performance attributes available under data source monitoring :
• Activeto
D icenCurrent Count: The number of connections currently in use by
e s l
Connections
rn
applications
app cat o s
n• E Current Capacity: The current count of JDBC connections in the connection pool in the
Jua 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


Aula Matriz SฺAฺSฺ

JMX, MBeans, Managing, and Monitoring

WebLogic Server manages and monitors its resources by using


the Java Management Extensions (JMX) API.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• JMX provides a standardized way of managing and monitoring


resources through objects call MBeans (managed beans).
• WebLogic
W bL i S Server provides
id a llarge sett off MB
MBeans ffor allll th
the
resources that it manages and monitors.
– These MBeans are used by WebLogic Server tools like the
administration console, WLST, and the Monitoring Dashboard. e
r a bl
nsfe
t r a
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
a einformation
Configuration MBeans
u cucontain
n s about the configuration of WebLogic Server
D
o represent e
resources. They
e
documents. s tEach lic the
instance of
information that is stored in the domain’s XML configuration
WebLogic Server has an in-memory representation of its
E r n
nconfiguration as a collection of these read-only Configuration MBeans.
JuaIn 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.
Th generally
They ll contain
t i only
l ddata
t about
b t th
the currentt state
t t off a server or resource, and
d th
they d
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


Aula Matriz SฺAฺSฺ

Monitoring Dashboard

The Monitoring Dashboard:


• Is accessible from a link on the administration console home
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

page
The dashboard opens
in a new window or tab

• Graphically presents current or historic WebLogic Server


diagnostic data
– Multiple graph types are available e
r a bl
• Allows you to monitor WebLogic Server MBean attributes fe
– From active runtime MBeans (polled metrics) tra ns
o n -
an
– From an archive collected by WLDF (collected metrics)
s
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
The Monitoring Dashboard
u s e to views and tools for graphically presenting diagnostic
cua nprovides
s t o D functionality
data. The underlying
l i ce for generating, retrieving, and persisting diagnostic data is
provided
r n eby the WebLogic Diagnostics Framework (WLDF).
nYouEcan launch the Monitoring Dashboard from the administration console, or you can run it
Juaindependently. 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
Harvester). metrics.

Oracle WebLogic Server 12c: Administration I 8 - 31


Aula Matriz SฺAฺSฺ

Monitoring Dashboard Interface

Explorer View Display


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

Metric Browser

View List

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r tomain panels: the explorer panel and the view display
cua nhas
The Monitoring Dashboard
u s etwo
panel.
s t o D lice
r n e panel has two tabs:
The explorer
n• E View List: A list of existing built-in and custom views. It also contains controls for
Jua 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


Aula Matriz SฺAฺSฺ

Views

• Are a way to organize your charts and graphs


• Typically display metrics that are related in some way
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Are individually started (to collect data) and stopped


• Continue to collect data even when not being displayed

Stop the displayed Stop all active views


view
Create a new view
Start the displayed
ble
view (disabled since Copy the selected view
fe r a
y started))
already
t r ans
n
Delete the selected
o -
view
An active view
s an
) ha ฺ
An inactive view
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a Aeview to is a collection of one or more charts that display captured
The View List tab lists
u cuviews.s
n You can access, create, and update views from the View List
monitoring and
t o D icedata.
diagnostic
tab. When
l
esyou click the name of a view on the View List tab, that view is displayed in the View
r n
E on the right.
nDisplay
JuaThe 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
b tt above
button b th
the ttabs.
b ToT stop
t data
d t collection,
ll ti click
li k th
the red-and-white
d d hit rectangular
t l St
Stop
button. To stop all active views, click the red octagonal Stop All button.

Oracle WebLogic Server 12c: Administration I 8 - 33


Aula Matriz SฺAฺSฺ

Built-in Views

• The dashboard defines built-in views for some of the more


critical runtime performance metrics.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Built-in views cannot be modified (or deleted), but they can


be copied and the copy modified.

Basic JMS metrics for all servers

ble
Basic heap metrics for each
fe r a
server’s JVM
t r ans
Preconfigured no n-
views listed per s a
server h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu thisCopyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
The built-in views are
u e to views of available runtime metrics for all running
cua asetnofspredefined
WebLogic Server
s t o Dinstances
l i ce in the domain. These views display some of the more critical
runtime
r n e
WebLogic Server performance metrics and serve as examples of the dashboard’s
E and graph capabilities.
nchart
JuaYou 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


Aula Matriz SฺAฺSฺ

Creating a Custom View

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

4
• A view is a collection of ble
fe r a
charts.
t r ans
• Each chart contains
no 5 n-
one or more graphs. s a
h
) eฺa
• Each graph displays m
o
ฺc Guid
one MBean attribute. 6 ail
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua created toby a user. Custom views are available only to the user who
A custom view is any
u cview s e
created them.t oYou
l en a custom view again when needed.
D canicaccess
r n
To createesa new custom view with a chart and graphs:
n E
J u a 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
6. Wh the
When h metricsi are iin place,
l click
li k the
h green S
Start b
button to start collecting
ll i d 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


Aula Matriz SฺAฺSฺ

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
d t il )
details)

Menu

ble
fe r a
Pan and zoom
t r ans
Legend Chart
no
controls
n-
X-axis overview
s a
h
) eฺa
o m
Metric Menu
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to that show data points over a specified time span. A chart
A chart contains one u coruamores e
graphs
also includest o D icthat
a legend
l enlists the sources of data for each graph along with their associated
icons and
r n escolors.
E working with a view, you can do the following:
nWhen
Jua • 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


Aula Matriz SฺAฺSฺ

Current or Historical Data

• To view real-time metrics, no set up is needed. When a view


is started, the runtime MBean instances are polled.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• To view historical (collected) metrics, WLDF must have been


previously configured to collect data. Metrics collected by
WLDF are placed into the diagnostic archive
archive. To view
harvested data:
1. In the View List, click the New View button.
2. In the Metric Browser, select a Server.
a b le
3. To see only harvested data, select Collected Metrics Only.
s f er
4
4. D
Drag some attribute
tt ib t from
f the
th Metrics
M t i list
li t to
t the i tran
th new view.
o n -
a n
a s
m ) h eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
The Monitoring Dashboard
u s e to two kinds of diagnostic metrics: real-time data directly
cua ndisplays
s t o D MBeans
from active runtime
l i ce (called polled metrics) and historical data collected by a
r n e configured WLDF artifact called a Harvester (called collected metrics).
previously
E that with polled metrics, if polling has been taking place long enough for old data to be
nNote
Juapurged, 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
b tt
button. Select
S l t the
th new module
d l andd click
li k th
the Configuration
C fi ti > Collected
C ll t d Metrics
M t i tabs
t b tot sett
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
fil can b
file be ffound
dhhere: server_name/data/store/diagnostics.
/d t / t /di ti

Oracle WebLogic Server 12c: Administration I 8 - 37


Aula Matriz SฺAฺSฺ

Enterprise Manager Cloud Control: Review

• Provides comprehensive IT management infrastructure for both


Oracle and non-Oracle hardware and software
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Offers insight into the health of all the components in your


enterprise or private cloud
• Supports private cloud management and self service (IaaS,
(IaaS
PaaS, DBaaS, and MWaaS)
• Is designed for flexibility and customization
• Runs on WebLogic Server, but requires a relational database e
r a bl
nsfe
t r a
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Oracle Enterprise u cua nCloud
Manager s e toControl is Oracle’s integrated, enterprise information
s t oD
technology (IT)
l i ce product line, which provides the industry’s only complete,
management
r n e and business-driven enterprise cloud management solution. Oracle Enterprise
integrated,
E creates business value for IT by leveraging the built-in management capabilities of
nManager
Juathe Oracle stack for traditional and cloud environments, thus enabling customers to achieve
unprecedented efficiency gains while dramatically increasing service levels.
Enterprise Manager Cloud Control (EMCC) also provides on-demand access to servers and
storage in a self-serviced, elastically scalable, and metered manner. The EMCC private cloud
models can be divided into two primary categories:
• Infrastructure as a Service (IaaS),
(IaaS) which allows users to request virtualized compute
compute,
storage, and network resources in order to run applications
• Platform as a Service (PaaS), which provides the specific database (DBaaS) and
middleware (MWaaS) components required by applications
Oracle Cloud Management Pack for Oracle Middleware delivers MWaaS capabilities that
span the entire middleware cloud life cycle. It enables cloud administrators to identify pooled
resources,, configure
g role-based access,, define the service catalog,
g, and define the related
chargeback plans. It enables cloud users to request middleware services and consume them
on demand.

Oracle WebLogic Server 12c: Administration I 8 - 38


Aula Matriz SฺAฺSฺ

Quiz
Q
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,
c. ERROR ALERT,
ALERT CRITICAL
CRITICAL, EMERGENCY
d. ERROR, CRITICAL, EMERGENCY, ALERT

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: a u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 39


Aula Matriz SฺAฺSฺ

Quiz
Q
A log filter can be applied to only one log message destination at
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a time.
a. True
b False
b.

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: b u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 40


Aula Matriz SฺAฺSฺ

Summary

In this lesson, you should have learned how to:


• Configure and access WebLogic Server logs
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Enable WebLogic Server debugging output


• Monitor WebLogic Server health and performance
• Monitor JDBC data sources
• Access diagnostic charts in the Monitoring Dashboard

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 41


Aula Matriz SฺAฺSฺ

Practice 8-1 Overview: Working with WebLogic


g
Server Logs
This practice covers the following topics:
• Accessing the server log by using the admin console
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Creating and applying a log filter

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 42


Aula Matriz SฺAฺSฺ

Practice 8-2 Overview: Monitoring WebLogic Server

This practice covers the following topics:


• Monitoring a server by using the admin console and the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Monitoring Dashboard
• Monitoring JDBC data sources by using the admin console
• Enabling debugging by using the admin console

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 8 - 43


Aula Matriz SฺAฺSฺ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

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

Node Manager
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


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

• Set up and configure Node Manager


• Start managed servers through Node Manager

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 2


Aula Matriz SฺAฺSฺ

Node Manager

Node Manager is a WebLogic Server utility that:


• Can remotely start and stop the administration server or
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

managed servers
• Can monitor the health of an instance of WebLogic Server and
automatically
t ti ll restart
t t it if it fails
f il
• Runs as a separate process on the same machines as
instances of WebLogic Server
• Is available as either a Java-based or a script-based process
a b le
(for UNIX or Linux) s f er
• Can be set up as an operating system service to start n-tr
an
o
automatically when a system is rebooted an s
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a earetooften distributed across multiple domains, machines, and
cuServer
Instances of WebLogic
u n s
D
geographic locations. e
to restartlithe
c
Node Manager is a WebLogic Server utility that enables you to start,
n e
shut down, sand administration server or managed servers from a remote location.
r
E Node Manager is optional, it is recommended if your WebLogic Server environment
nAlthough
Juahosts 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
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
Manager,
there must be a Node Manager process running on that machine.

Oracle WebLogic Server 12c: Administration I 9 - 3


Aula Matriz SฺAฺSฺ

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.

bl e
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 4


Aula Matriz SฺAฺSฺ

Types of Node Manager

• Java based
– Runs within its own Java Virtual Machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Runs on any operating system that runs WebLogic Server


– Can use secure SSL communication, if desired
• Script based
– Runs in its own process
– Available only for UNIX or Linux systems
– Uses Remote Shell (RSH) or Secure Shell (SSH) ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r totwo versions of Node Manager: Java based and script
cuaprovides
Oracle WebLogic Server
u s e
based. t o D icen
l
esa based Node
• rAnJa
Java-based ode Manager
a age runsu s within
t its
ts o
own JJVM p
process.
ocess Thee Ja
Java-based
a based version
e so
E
n of Node Manager determines its configuration from the nodemanager.properties
Jua 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


Aula Matriz SฺAฺSฺ

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

Machine
Domain A
ble
Domain B fe r a
ServerA1
t r ans
Node ServerB1
no n-
ServerA2
Manager s a
h a
ServerB2
) eฺ
ServerA3 o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e tServer,o
In previous releases
u cofuWebLogic
n s a Node Manager process was not associated with a
D
to toServer e
specific WebLogic
Manager e s
process
lic domain,
control server
but instead with a machine. You used the same Node
instances from any WebLogic Server domain, as long as
r n
E server instances ran on the same machine.
those
u a n
J This configuration is still possible.

Oracle WebLogic Server 12c: Administration I 9 - 6


Aula Matriz SฺAฺSฺ

Node Manager Architecture: Per Domain

The default is to have one Java-based Node Manager per


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

Domain A Machine Admin Console


or WLST
ServerA1 Domain B
Node
ServerA2 Manager Start ServerB1
ServerA3 e
r a bl
Admin Console Domain B
nsfe
or WLST
t r a
Domain A ServerB1
no This allows then-
Node s a Node Manager
Start ServerA2 Manager ServerB2 h
) eฺa for each domain

o m to have its own

a ilฺc t Guid configuration.

@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
Starting with WebLogic
u cuaServer s e12.1.2, the default is for a Java version of Node Manager to
o D Server
control all WebLogic
t l i c eninstances belonging to the same domain.
Havingr n es specific (Java
domain-specific
domain (Java-based)
based) Node Managers allows you to have different
n E
configurations for different domains.
J ua

Oracle WebLogic Server 12c: Administration I 9 - 7


Aula Matriz SฺAฺSฺ

How Node Manager Starts a Managed Server

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

Admin Start ServerA2. Node


Server Manager

Create process
3
and start server.
1
Request to ble
start ServerA2. ServerA2 fe r a
4 t r ans
no n-
Obtain latest a
Admin Console configuration
h a s
or WLST (as usual). m ) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
1. The Node Manager
u cuaclient,
s e the administration console or WLST, asks to start the
managedt o D icen
server.
e s l
2. rn
Thee ad
administration
st at o se
server
e cocontacts
tacts tthe
e Node
ode Manager
a age running
u goon tthat
at se
server’s
e s machine,
E asking Node Manager to start that server. The admin server verifies its identity by ac e,

u a n
J 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
4. A usual,l when
h a managedd server comes up, it obtains
bt i ththe llatest
t t configuration
fi ti ffrom itits
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


Aula Matriz SฺAฺSฺ

How Node Manager Can Help


g Server
Shut Down a Managed

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

Admin Shut down ServerA1. Node


Server Manager
Issue OS
5 command to
kill the server’s
Request to process.
1
shut down ble
ServerA1. ServerA1 fe r a
2
t r ans
3 no n-
Shut down a
Admin Console The server h a s
or WLST
m
is unreachable.) eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
1. The Node Manager
u cuaclient,
s e the administration console or WLST, asks to shut down the
managedt o D icen
server.
e s l
2. rn
Thee ad
administration
st at o se
server
e issues
ssues tthe
e sshutdown
utdo co
command
a dddirectly
E server. Normally, the server then performs the shutdown sequence.ect y to tthe
e managed
a aged

u a n
J 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


Aula Matriz SฺAฺSฺ

Configuration Wizard and Node Manager

When creating a domain with the Configuration Wizard, there is


an option for Node Manager.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• You can select the Node Manager check box on the Optional
Configuration page of a wizard.

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 10


Aula Matriz SฺAฺSฺ

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.

To change the Node


ble
Manager home location
fe r a
t r ans
o n-
s an Credentials used by
a client (admin
) ha ฺ server or WLST) to

c o m ide access Node



ail nt Gu Manager
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e to
On the Node Manager
u cupage:n s
• Select:to
D e
e s lic
n Ern- <domain>/nodemanager.
Per Domain: Node Manager home is the default location of

J ua - 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.
• Click Next.

Oracle WebLogic Server 12c: Administration I 9 - 11


Aula Matriz SฺAฺSฺ

Configuring the Java-Based Node Manager

1. Define machines in the domain to represent each computer.


Note that some of the
2. Under each machine configuration:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

configuration can be
done when creating the
A. Assign servers to the machine. domain.

B. Set the Java Node Manager type to Plain or SSL.


C. Set the listen address to the Node Manager computer’s IP
address or its host or DNS name. Select a listen port.
3. In each managed server configuration, set the server start
parameters and the monitoring and restart parameters used
by Node Manager. (If not set by you, these parameters have erab
le
f
default values.)
values ) ans - tr
n o n
s a
a
) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a useethe toSSL type of the Java-based Node Manager in a
It is recommendeduthat cuyou n s
o D iceConfiguring
production environment.
t SSL involves obtaining identity and trust for the Node
Manager e s
and each
l
administration and managed server with which the Node Manager will be
E r n
ncommunicating, and then configuring the Node Manager, the admin server, and the managed
Juaservers with the proper identity and trust. For more information, see “Configuring SSL” in
Administering Security for Oracle WebLogic Server.

Oracle WebLogic Server 12c: Administration I 9 - 12


Aula Matriz SฺAฺSฺ

Configuring Server Start and


g Parameters
Health Monitoring
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to of things you can set in server start scripts. They are:
cuaarensthee kinds
Server Start parameters
u
t
• Java Home:
s o D Where
l i cethe JVM is located to use for running this server. Enter the parent
r n e y of the JDK bin directory.y
directory
n E
• Java Vendor: The Java vendor. This needs to be entered if different Java vendors are
J u a
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
p g encrypted.
yp
Note that if these attributes are left blank, they are set to default values.
Note that these settings are used only when the startScriptEnabled parameter is set to
false.
Oracle WebLogic Server 12c: Administration I 9 - 13
Aula Matriz SฺAฺSฺ

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 g 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
Note that if these attributes are left blank, they are set to default values.
ble
fe r a
t r ans
on-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 14


Aula Matriz SฺAฺSฺ

Configuring the Java-Based Node Manager

4. Install WebLogic Server on the computers where you plan to


run Node Manager (and managed servers).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

5. *Create a directory for Node Manager on each computer:


A. Copy the startNodeManager.sh script to the directory from
<WL_HOME>/server/bin.
WL HOME /ser er/bin
B. Edit the script and set NODEMGR_HOME to the current path.
C. Create and edit a text file named These are done
for you if Node
nodemanager.properties. Manager is set up
ble
D. Set (at least) the following properties:
through the
Configuration
fe r a
— ListenAddress=value
ListenAddress value Wizard.
t r ans
— ListenPort=value
no n-
a
s directory.
* The default Node Manager home is the nodemanager directory under h a
) eฺ by using the
the domain
o m
uid
This is the location used when Node Manager is configured during domain creation
Configuration Wizard and the “Per Domain” Node Manager
a ฺc is selected.
iltype G
g m ent
a r a@ Stud
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to Manager is not a requirement, but a recommended
Creating a unique u cua nfor
directory s eNode
practice, andto theDdefault i cefor the Java-based “per domain” Node Manager.
s l
e start the Node Manager configuration during domain creation by using the
Whenrn you
n E
Configuration Wizard, the default Node Manager Type is “Per Domain.” The default location of
J u aNode 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


Aula Matriz SฺAฺSฺ

Configuring the Java-Based Node Manager

6. On each computer, enroll Node Manager with the domain.


7. Start Node Manager by running startNodeManager.sh.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

8. *Set up a UNIX daemon to start Node Manager automatically


on computer startup.

ble
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
ilฺc t Guid
* Not required, but recommended
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cuaManager
More on enrolling Node
u n s e twith a domain is found later in this lesson.
D
o daemon e
Setting upsatUNIX
e lic (or a Windows service) to start Node Manager is not a
Ern but a recommended practice.
requirement,
n
J ua

Oracle WebLogic Server 12c: Administration I 9 - 16


Aula Matriz SฺAฺSฺ

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.
StopScriptEnabled Stop servers by using a script.
StartScriptName Name of the script used to start servers
StopScriptName ble
Name of the script used to stop servers
fe r a
CrashRecoveryEnabled Automatically restart failed servers after
t r ans
machine restart. n-
n o
StateCheckInterval Time in between checks of a server’s
s a state
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e than to those listed in the slide. See the “Configuring Java
There are many moreu cuproperties
s
Node Manager”
t o DchaptericofenNode Manager Administrator’s Guide for Oracle WebLogic Server.
e s l
n Ern
J ua

Oracle WebLogic Server 12c: Administration I 9 - 17


Aula Matriz SฺAฺSฺ

Node Manager Files

Under the Node Manager home directory:


• nodemanager.properties: Defines a configuration
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

settings for a Java-based Node Manager processes


• nodemanager.domains: Specifies the domains that a Node
M
Manager iinstance
t controls
t l
• nodemanager.log: Is used by a running Node Manager to
log information about its work
Under the domain’s config/nodemanager directory:
a b le
• nm_p password.properties:
p p Stores the encrypted
yp Node nsfe
r
Manager username/password that the Node Manager n - tra
client
o
uses to authenticate itself to Node Manager an s
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sebeing to discussed in this and the next few slides is the domain
Note that the domain
u cdirectory
n Node Manager and the managed servers it controls are
o
directory ontthe D
machinei c ewhere
running. es l
r n
nE
Jua

Oracle WebLogic Server 12c: Administration I 9 - 18


Aula Matriz SฺAฺSฺ

Node Manager Files

Under the domain’s security directory:


• SerializedSystemIni.dat: Is used by Node Manager for
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

encryption and decryption


Under the domain’s directory called
servers/servername/data/nodemanager:
/ /d / d
• boot.properties: Is created by Node Manager to hold a
server’s encrypted credentials
• startup.properties: Keeps track of server start and
a b le
health monitoring options s f er
• servername.lck, servername.pid, - t r an
n o n
servername.state: Are files used internally byaNode
Manager to track a server it started h a s
) m ideฺ
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nse tofile used by Node Manager is created automatically by
Note that the boot.properties
u
Node Manager.
s t oDIt is not
l i e same file (or in the same location) as a boot.properties file
cthe
you can
r n ecreate and place in a server’s security directory.
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 19


Aula Matriz SฺAฺSฺ

Node Manager Files

Under the domain’s directory called


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

• servername.out: Is the log file for a server started by Node


Manager that contains stdout and stderr messages
generated by that server
– You cannot set up “rotation” for this file, as you can with a
server log file, which can be an issue. An easy solution:
— For servers that are started by Node Manager, set the standard out
“severity level” to Critical or higher. Then very few messages a b le
r
go into this file. sfe an
- t r
n on
s a
a
) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 20


Aula Matriz SฺAฺSฺ

Enrolling Node Manager with a Domain

Enrolling Node Manager with a domain copies files required by


Node Manager to the remote computer (or updates existing files).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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
1.
Manager.
2. Run the connect() command to connect to the
administration server of the domain: e
r a bl
connect('username', 'pw', 't3://host:port')
nsfe
t r a
3. Run the nmEnroll() command: no n-
s a
nmEnroll('domain_home', 'node_mgr_home')
h
) eฺa
o m d home
Domain location
a G uiManager
ilฺc t Node
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sethetofirst two arguments are the username and password of an
For the connect() u ccommand,
administrator.
t oThe
l en is the URL to access the administration server.
D thirdicargument
r n es
The nmEnroll() command downloads two files from the administration server to this
E
uan
computer: nm_password.properties and SerializedSystemIni.dat.
J 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


Aula Matriz SฺAฺSฺ

When Not to Use nmEnroll()

• nmEnroll() is for registering Node Manager with a


“WebLogic Server only” domain on a remote machine. It can
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.
— The nmEnroll() command does not transfer the required FMW
component–specific files to the new machine. ble
• Using nmEnroll() is not needed if you have copied the fe r a
t r ans
domain to the new machine by using the pack and unpack
n -
o
utilities. an s
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a you to
cuwhich
There is a scenariouin s e use nmEnroll() after the pack and unpack utilities have
been used tot o
copy
l c en to a remote machine. If, after the domain has been copied
D theidomain
over, the
n s Manager username and password are changed, the credentials in the file on
eNode
theE
r
remote machine (nm_password.properties) will be out-of-date. This means that the
a n
u administration server fails when it tries to contact this Node Manager. However, if you issue
J the nmEnroll() command from the remote machine, the command updates the credentials
in that file.

Oracle WebLogic Server 12c: Administration I 9 - 22


Aula Matriz SฺAฺSฺ

Reminder: Pack

1. On the machine where the domain files reside (and the


administration server runs), use the pack.sh script with the –
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

managed=true option:
cd <MW_HOME>/oracle_common/common/bin
./pack.sh
/pack sh –domain=domain_path/domain_name
domain domain path/domain name
–template=name.jar
-template_name=somename
-managed=true e
r a bl
2. Move the archive file to the machine where you plan to run fe
s
N d M
Node Manager and d th
the managedd servers ((and
d th d -trtan
the products
are already installed). non a
a s
m ) h eฺ
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
cuaamachine
For details of readying
u n s e tfor running managed servers in a domain that contains
D e
Guide n stocomponent.
Fusion Middleware
forethat
lic For example,
Components (beyond WebLogic Server), see the Enterprise Deployment
for Oracle SOA Suite, see the chapter titled “Creating
r
E for an Enterprise Deployment” in the Enterprise Deployment Guide for Oracle SOA
a Domain
a n
u Suite. This document details preparing the network, file system, and database for SOA Suite.
J 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


Aula Matriz SฺAฺSฺ

Reminder: Unpack

3. Before running the unpack.sh script, ensure that the


directory exists in which to place the domain: new_path
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4. Run the unpack.sh script:


cd <MW_HOME>/oracle_common/common/bin
./unpack.sh
/ –domain=new_path/domain_name
i / i
–template=name.jar
-app_dir=new_path/applications
-nodemanager_home=nodemgr_home_dir
ble
fe r a
– The -app_dir
-app dir argument is optional
optional. It specifies the application
t r ans
directory (used by some FMW components). o n -
– The -nodemanager_home argument is also optional.
s a n Use this
to place Node Manager somewhere other )thanha theฺ default
location: <domain>/nodemanager. c o m ide
il ฺ u
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e the tofull path to the directory used to store the applications
The -app_dir option u cuspecifies
s
defined in thet o D icen
template.
e s l
E rn
The -nodemanager
nodemanager_home home option specifies the full path to the Node Manager home
ndirectory. If not used, it defaults to the nodemanager directory under the domain.
Jua

Oracle WebLogic Server 12c: Administration I 9 - 24


Aula Matriz SฺAฺSฺ

Controlling Servers Through Node Manager

After the configuration is set and Node Manager is running on the


remote machines, servers can be started by using the WebLogic
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Server administration console or WLST.

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sofeNode to Manager, servers that it starts can be monitored and
Depending upon the u csettings
n fail.
automatically
t o D icif ethey
restarted
es l
r n
nE
Jua

Oracle WebLogic Server 12c: Administration I 9 - 25


Aula Matriz SฺAฺSฺ

Node Manager: Best Practices

• Do not place the Node Manager home under the WebLogic


Server installation directories.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– The default location for the per-domain Java-based Node


Manager is under the domain directories.
• Use the Java
Java-based
based Node Manager
Manager.
– It is portable and has the latest features.
• Use the “per domain” Node Manager.
– The default with the Java-based Node Manager e
r a bl
– Allows each domain to have a different Node Manager
nsfe
configuration
fi ti t r a
o n-
a n too.
• Use Node Manager to start the administration server,
s ha it.
– If it fails, Node Manager can automatically)restart
c o m ideฺ

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
For Node Manageruto cubeaable s e
to start the administration server, you must use WLST. For
o
more information
t l ento do that, see the section titled “Using Node Manager to Start
Daboutichow
Servers
r n eonsa Machine” in Understanding the WebLogic Scripting Tool.
n E
Ju a

Oracle WebLogic Server 12c: Administration I 9 - 26


Aula Matriz SฺAฺSฺ

Node Manager: Best Practices

• Use a start script to start servers.


– Use the script to set WebLogic Server parameters or prepare
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

resources before the server starts.


– The default for StartScriptEnabled is true.
– The default StartScriptName is startWebLogic.sh.
startWebLogic sh
• In production, use SSL between the admin server and the
Java-based Node Manager.
– This is one-way SSL. le
a b
– Set up SSL by obtaining and configuring Identity and Trust
s f er
k
keystores
t on the
th admin
d i server.
- t r an
on “all
– Configure the admin server to listen on a specific IP,nnot
local addresses.” s a
a
) h eฺ
m
– Set SecureListener=true in nodemanager.properties.
o
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
uabe set to
The parameters that
u ccan s e in a script are JVM and WebLogic Server options. Other
o
things couldtbe D enscript as well (for example, mounting a drive used by the server).
done inicthe
l
n s
einformation
r
For more
E WebLogic Server. about setting up SSL, see the “Configuring
Configuring SSL
SSL” chapter in Securing
nOracle
JuaBecause 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


Aula Matriz SฺAฺSฺ

Quiz
Q
To configure a Node Manager by using the admin console, what
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

resource is selected before you click its Node Manager tab?


a. A managed server
b The administration server
b.
c. A machine
d. A cluster

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: c u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 28


Aula Matriz SฺAฺSฺ

Quiz
Q
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
b.
c. Never

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: b u cua nse to
s t o D lice
r n e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 29


Aula Matriz SฺAฺSฺ

Summary

In this lesson, you should have learned how to:


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

• Set up and configure Node Manager


• Start managed servers through Node Manager

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 30


Aula Matriz SฺAฺSฺ

Practice 9-1 Overview: Configuring and Using


Node Managerg
This practice covers the following topics:
• Configuring the Java-based Node Manager
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Starting Node Manager


• Starting servers through Node Manager by using the
administration console

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 9 - 31


Aula Matriz SฺAฺSฺ
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

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

Deploying Applications
ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a
Aula Matriz SฺAฺSฺ

Objectives

After completing this lesson, you should be able to:


• Deploy an application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Test a deployed application


• Monitor a deployed application
• Load test an application

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 2


Aula Matriz SฺAฺSฺ

Deploying Applications to WebLogic Server

2
4
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
server, and starts the deployment.
The deployment is pushed
out to the target servers.
3 The archive is uploaded to The deployed application ble
the admin server and the is “turned on” to start fe r a
Developers develop the deployment is targeted. servicing
i i client
li t requests.
t
t r ans
application and provide The admin server updates
no n-
the archive file to the the domain configuration.
s a
administrator. h
) eฺa
Admin m
o
Server update
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuamust
1. First, an application
u s e
be developed, tested, and packaged (usually as an application
archive).o D
t l i c en
2. Then spp
eapplication archive file is pplaced where an administrator in charge
g of deployment
p y has
E r
access to it. A deployment tool, such as the administration console, is used to communicate
J uan 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
4. application s code out to the target server (or servers)
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


Aula Matriz SฺAฺSฺ

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 Server
Mgr Mgr

Prod Domain Prod Domain


ble
Cluster
fe r a
M hi
Machine Development
Server Server
t r ans
no n-
Dev Domain
s a Server Server
Admin h a
) eฺ Server
Server o
Server m
Other DB
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to who are responsible for unit-level testing. After the
a developers,
cuby
Applications are created
u s e
D icwith
developers areosatisfied
t l enindividual components, those components are combined and moved
into a test
n s
eenvironment. The system is tested there by a quality organization. After the application
hasE r
passed the system-level quality tests, it is moved into production.
a n
Ju 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.
groups

Oracle WebLogic Server 12c: Administration I 10 - 4


Aula Matriz SฺAฺSฺ

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


EJB JAR
ble
Resource adapter Resource archive .rar
fe r a
Optional package Java archive .jar t r ans
no n-
Enterprise application a
Enterprise archive
s .ear
h
) eฺ a
o m id
a ilฺc t Guadapters
A collection of web applications, EJBs, and resource

@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sstatic tofiles (such as images and HTML pages) as well as
A web application can
u ccontain n e
o
JavaServer Pages
t D(JSPs),
i c eServlets, and other Java code.
e s l
E r n the Java Enterprise
EJBs are p Edition component
p architecture. Theyy are often used as containers

u a ncustom business logic for middleware.


of
J 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


Aula Matriz SฺAฺSฺ

WebLogic Server Deployments

WebLogic-specific deployment units:


• Enterprise applications, web applications, or Java archives as
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

shared libraries
• JMS and JDBC modules

WLS Deployment Archive Name File Extension


Shared library Enterprise .ear /.war / .jar
application, web
application, or Java ble
archive fe r a
t r ans
JMS module/JDBC module XML file
no
.xml
n-
s a
h a
These can be included in an enterprise application.
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o
Oracle WebLogic Server
u cuahasnsome
s e tdeployment units of its own. WebLogic Server has a
D
to very e
deployable unit,
e s
a web application, an
lic to a application,
similar
enterprise
Java optional package, called a shared library. A shared library is
or a JAR file that is deployed so that web applications
andE r n
enterprise applications can share its code.
a n
Ju 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


Aula Matriz SฺAฺSฺ

Other Deployments

Product Deployment Archive Archive File


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

Oracle Application ADF application Enterprise .ear


Development application
Framework (ADF)
Oracle SOA Suite SOA Suite composite Single Single: .jar or
application (SAR composite .sar
stands for SOA application or Multiple: .zip
archive) multiple
composite
ble
applications
fe r a
Oracle WebCenter WebCenter application Enterprise .ear t r ans
no application n-
s a
Oracle Coherence Coherence artifacts a
Grid archive .gar
h
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
u cua nseFramework
Oracle Application Development (ADF) is an end-to-end Java EE framework built on
D
to (JSF). e
JavaServer Faces
deployed e
bysusing the
licJSF is a user
development
interface framework for Java EE. ADF applications can be
environment, JDeveloper, or can be placed in an enterprise
r n
E archive (EAR) and deployed with WLST or the admin console.
application
a n
Ju 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
p y must be created and registered.
g MDS is a
repository for Fusion Middleware Component metadata.

Oracle WebLogic Server 12c: Administration I 10 - 7


Aula Matriz SฺAฺSฺ
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
b using
by i C Coherence*Extend.
h *E t d A An HTTP sessioni titier should
h ld bbe sett up b
by using
i C Coherence*Web.
h *W b
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 individually
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 8


Aula Matriz SฺAฺSฺ

Deployment Terms

• Deploy:
1. Developers provide application files, usually as an archive, to
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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)
clusters). The deployment
is distributed to those servers.
3. An administrator starts the application (so the application starts
servicing requests).
• Undeploy: ble
fe r a
1 An administrator stops the application (making it unavailable
1.
t r antos
clients). o n -
thea
2. An administrator removes the application from s
n
configuration.
m ide ) ha ฺ
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nse to
Deploying an application:
u
s t
1. Developers o Dpackage
l i cetested application files, usually in an archive. They provide the
r n
pp e
application to an administrator in charge g of deployment.
p y The administrator moves the file to a
n Elocation from which it can be accessed by the deployment tool.
a
Ju 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
possible, 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


Aula Matriz SฺAฺSฺ
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
p y from the configuration.
g 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ฺ

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 10


Aula Matriz SฺAฺSฺ

Deployment Terms

• Redeploy:
1. Developers provide a new version of the application.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.
3. application
— Note that with redeployment there is no explicit “start the
application” step, because the application is automatically started.
— WebLogic Server has a strategy called “Production Redeployment”
that allows both versions of the application to be active
a b le
simultaneously. fer ns
• Distribute: Similar to deploy, but the application is not -tra
started. The application is pushed out to its targets, n on to
ready
s a
be started later.
) eฺ h a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nse to
Redeploying an application:
u
t
1. Developers
s o Dcreatelicand
e test a new version of the application. Once tested, they provide it to
an
r n e
administrator g of deployment.
in charge p y
E
n2. The administrator copies over the deployment files (or archive file) with the new version of
J u a 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


Aula Matriz SฺAฺSฺ

Deployment Descriptors

• Deployment descriptor: An XML file packaged within a


deployment that sets properties of the application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Each Java EE deployment has both a standard and a


WebLogic-specific deployment descriptor.
– Since Java EE 5,5 deployment descriptors can be replaced with
annotations in the application code.
web.xml weblogic.xml
... ...
<web-app ... > <weblogic-web-app ...>
a b le
<servlet> <session-descriptor>
s f er
<servlet name>
<servlet-name> <cookie path>
<cookie-path>
- t r an
BenefitsServlet benefits
Developers are responsible for n o n
</servlet-name> </cookie-path> a
creating the deployment descriptors
h
<servlet-class> (or code annotations)</session-descriptor>a s
as part of
m ) eฺ
application development.
stcurr.BenefitsServlet o
<context-root>
c id
...
m ent ailฺ
... Gu
g
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r taostandard and a WebLogic-specific deployment descriptor:
cua unit
Each Java EE deployment
u s e
has
t o
• Web application: l en and weblogic.xml
D icweb.xml
r
• Webn esservice: webservices.xml and weblogic
weblogic-webservices.xml
webservices.xml
E
n• Enterprise JavaBean: ejb-jar.xml and weblogic-ejb-jar.xml
J u a
• Resource adapter: ra.xml and weblogic-ra.xml
• Enterprise application: application.xml and weblogic-application.xml

Oracle WebLogic Server 12c: Administration I 10 - 12


Aula Matriz SฺAฺSฺ

Deployment Plans

• A WebLogic Server deployment plan is an XML document that


can override an application’s configuration (deployment
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

descriptors). A deployment plan is:


– Optional
– Used to update deployment descriptor values
– Useful when moving an application from one environment to
another (such as from development to test or test to production)
– A separate file, outside of the deployment archive
ble
plan.xml fe r a
tra ns
<?xml version='1.0' encoding='UTF-8'?>
n -
<deployment-plan ... >
a no
a s
<application-name>timeoff.war</application-name>
h
<variable-definition>
m ) eฺ
<variable> ... lฺc o uid
m ai nt G
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua deployment to plans, see the section “Understanding WebLogic Server
For more information
u cabout s e
o
Deployment Plans”
t l en
D in theicAdministering Server Environments for Oracle WebLogic Server
e
document. s
n Ern plans are covered in the Oracle WebLogic Server 12c: Administration II course.
Deployment
Jua

Oracle WebLogic Server 12c: Administration I 10 - 13


Aula Matriz SฺAฺSฺ

Exploded Versus Archived Applications

• An application can be deployed as a set of directories and


files. This is called an “exploded directory” application.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• An application file and directory structure can be placed within


the appropriate archive file, and that single file can be
deployed.
deployed
• Exploded directory applications are most often used during
development, and archived applications during test and
production. e
– There is nothing that prevents exploded application r a bl
ns fe
deployments in test and production or archive file deployments
r a
t
during development, however. on- n
s a
a
) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 14


Aula Matriz SฺAฺSฺ

Autodeploy

• A development mode domain can automatically deploy


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

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.
2. directory When it
detects a new application, it automatically:
A. Adds the application to the configuration.
B. Targets the application to itself, the admin server.
C. Starts the application (the application starts servicing requests). ble
fe r a
• Autodeploy is a convenient feature for developers, which ns
allows them to quickly deploy and test an application.on-t
ra
an
• Autodeploy is disabled in a production mode domain.
s
) h eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
cuaworks
Note that autodeployment
u s e to redeploy an application, too. When you copy over an
application archive
t o l enautodeploy directory, the administration server notices the new
Dfile inicthe
timestamp
n s automatically redeploys the application. To achieve the same automatic
eand
E r
redeployment off an exploded directory application, create a file
f called REDEPLOY and place it in
n
Juathe 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


Aula Matriz SฺAฺSฺ

Server Staging Mode

The Staging Mode of a server determines how the server


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

• stage: During the deployment process the application is


pushed out to the remote server’s Staging Directory.
• nostage: The
Th server accesses the th application
li ti ffrom an
accessible location (often shared storage). You must ensure
the application is placed in this location. The location is
specified during deployment.
a b le
• external_stage: Similar to stage, except the application fer
mustt be
b copied
i d iinto
t th
the St
Staging
i DiDirectory
t b
before
f b i -i tran
beginning
s
the deployment process (manually or by some otherno n
tool).
s a
a
) h eฺ
o m
The Staging Mode’s default is stage.
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a isefound to in the admin console under the server’s Configuration >
The Staging Mode of u ca userver s
Deployment tab.
t o D icen
e s l y is the stage
E r n
The default g
Stagingg Directory g directoryy under the server’s directoryy under the

u a n
domain. This can be modified, if desired.
J When deploying an application, the Staging Mode of the target servers can be overridden.

Oracle WebLogic Server 12c: Administration I 10 - 16


Aula Matriz SฺAฺSฺ

WebLogic Server Deployment Tools

The following tools can be used to deploy applications:


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

• WLST
– Can be used interactively or to run a script
– Example:
deploy('app', '/apps/app.ear', targets='cluster1')

• The weblogic.Deployer class e


r a bl
– For command-line deployment fe
– Example: t r ans
o n-
java weblogic.Deployer
s an
ha ฺ
-adminurl http://host01.example.com:7001
)
o m ide
-username weblogic -password Welcome1
c
ฺ Gu cluster1
ail -targets
-deploy -source /apps/app.ear
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e to console is shown later in this lesson.
Deploying by using u cuadministration
the
n s
D e
pp rne
stoScriptinglicTool (WLST) has many commands related to the deployment of
The WebLogic
applications:
n E
• deploy(): Deploys an application, targets it, distributes it, and starts it
Ju a
• 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.
Note that the Fusion Middleware Control can also be used to deploy applications.

Oracle WebLogic Server 12c: Administration I 10 - 17


Aula Matriz SฺAฺSฺ

WebLogic Server Deployment Tools

The following tools can be used to deploy applications:


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

– It is an Apache open-source, Java-based “make utility”


– Ant and WebLogic-specific Ant tasks come with the WebLogic
S
Server installation.
i t ll ti
— The wldeploy task is the Ant version of the
weblogic.Deployer utility.
• Maven
ble
– It is an Apache open-source tool for managing Java projects.
fe r a
– A plug-in
l i iis available
il bl with
ith th
the W
WebLogic
bL i S t ll ti tran
Server iinstallation.
s
o n -
• Enterprise Manager Cloud Control n
s a
– Cloud Control can deploy, undeploy, and redeploy
) a
h ฺ applications
to WebLogic Server. m
co uide
i l ฺ
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nsJava
Apache Ant is an open-source
u e tolibrary designed to build projects. WebLogic Server comes
o D iand
with an Ant installation,
t c eprovides custom Ant tasks. To use Ant, ensure that the Ant
executable s l
e (or batch file) is in the PATH and the WebLogic Server classes have been added to the
E r n
CLASSPATH. The Ant executable (for (f Linux)) or batch file
f (for
(f Windows)) can be found
f here:
n
Jua<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
p cloud management
g p
product line. Cloud Control enables yyou to monitor and manage
g the
complete Oracle IT infrastructure from a single console.

Oracle WebLogic Server 12c: Administration I 10 - 18


Aula Matriz SฺAฺSฺ

Starting and Stopping an Application

• Newly deployed applications must be started. There are two


possible “start levels:”
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– 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.
A special port set up for inter-server communication
• Applications must be stopped before they are undeployed. ble
fe r a
– When work completes: Allows current users of the application
t r ans
to complete their work and disconnect
o n -
a n whether
– Force stop now: Stops the application immediately,
s
or not it is being used
m ideฺ ) ha
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o two options:
cua nsyou
When you start an application,
u e thave
• Servicingt Drequests:
o all i ce WebLogic Server makes the application immediately available to all
e s l
E r n
clients.
a n• Servicing only administration requests: WebLogic Server makes the application available
Ju 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 p
port is configured,
g , 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


Aula Matriz SฺAฺSฺ
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 p now: WebLogic g Server stopsp the application
pp immediately,
y, regardless
g of the work
that is being performed and the users that are connected.
• Stop, but continue servicing administration requests: WebLogic Server stops the
application after all its work has finished, but then puts the application in administration
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 20


Aula Matriz SฺAฺSฺ

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

ble
fe r a
2
t r ans
no n-
s a
h a
) 5 eฺ
o m
3
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
cua nse to
1. Lock the configuration.
u
s t o D Structure,
2. In the Domain l i ce select Deployments.
r n
3 Above
3. e the Deployments table,
table click the Install button.
button
n E
J ua 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


Aula Matriz SฺAฺSฺ

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

ble
7
fe r a
t r ans
no n-
s a
h a
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
6. After the deployment
u s e to click Next.
cuaisnselected,
t o D thislideployment
7. Select Install
s ce as an application and click Next. (The other option is to
e
rn the application
install pp as a library.)
y)
E
n8. Select the targets and click Next.
Jua

Oracle WebLogic Server 12c: Administration I 10 - 22


Aula Matriz SฺAฺSฺ

Deploying an Application

Security roles (who) and policies


(what they can do) for the 9
application are determined by the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

deployment descriptors.

Security roles are created by using


the admin console. Security policies
are defined in the deployment
descriptors.

ble
fe r a
Security roles and policies are
created by using the admin console.
t r ans
no n-
s a
This option is provided for backward h
) eฺa
o m
ilฺc t Guid
compatibility with WebLogic Server
versions before 9.0.
a
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
9. The install Application
u s e to page of the wizard contains optional configuration items. If
cua nAssistance
s t o Dare acceptable,
the defaults
l i ce click Next. Otherwise, enter or select the following, and then
click
r n eNext:
n E - Name: The name of the deployment as it is displayed in the admin console
Jua - 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
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


Aula Matriz SฺAฺSฺ
- Source accessibility:
- Use the defaults defined by the deployment’s targets: This is the default and the
recommended option.
py this application
- Copy pp onto every
y target
g for me: This ignores
g the Staging
g g 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.
- I will make the deployment accessible from the following location: This option
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.
- Copy this plan onto every target for me.
- Do not copy this plan to targets. e
r a bl
ns fe
t r a
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 24


Aula Matriz SฺAฺSฺ

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

10

11

ble
fe r a
12 t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
a thee deployment
10. Choose whetheru ctouviewn s configuration screen next or not, review the
D
to and lclick
deployment, e
ic Finish.
e s
E rnthe Change
11. In g Center,, click Activate Changes.g

uan
12. To start the application, select the new deployment in the Deployments table. Click the Start
J 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


Aula Matriz SฺAฺSฺ

Undeploying an Application

Note: A running application


cannot be undeployed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

ble
fe r a
t r ans
no n-
3 s a
h
) eฺ a
c o m id 4
i l ฺ u
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
1. In the Domainu Structure, e toDeployments.
cua nsselect
t
2. Select the
D ice Click the Stop button and select either When work completes or
o deployment.
e s l A runningg application
E rn work completes can takeppquite a while.
Force
when
Stopp Now. cannot be undeployed.
For example,
p y
with
Stopping
a
pp g an application
web
pp
application, it will be
n
Jua 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


Aula Matriz SฺAฺSฺ

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

6 ble
fe r a
t r ans
no n-
Note that although the deployment is
s a
no longer in the configuration, the 7 h
) eฺa
deployment files (or the archive file)
o m
have not been deleted.
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to and the configuration is locked, select the application in
cua nsisestopped
5. Now that the application
u
s t o D ltable
the Deployments i ce again. Then click the Delete button.
n
6. When
r e asked if yyou are sure,, click Yes.
n7.EIn the Change Center, click Activate Changes.
Jua

Oracle WebLogic Server 12c: Administration I 10 - 27


Aula Matriz SฺAฺSฺ

Redeploying an Application

1 $> cp /uploaded/timeoff.war /apps/timeoff.war


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

2 3

ble
fe r a
t r ans
4
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu thisCopyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to with the new version.
1. Copy over theu cua application
current s e
2. Lock thet o D icen
configuration.
e s l
3. rnthe Domain Structure
3 In Structure, select Deployments.
Deployments
n4.ESelect the deployment. Click the Update button.
Jua

Oracle WebLogic Server 12c: Administration I 10 - 28


Aula Matriz SฺAฺSฺ

Redeploying an Application

It is an error when
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

redeploying to
5 move the
deployment files,
so do not use this.

You can move (or


add) a deployment
plan, however.
ble
fe r a
The application does
t r ans
no
not need to be
manually started. n-
6 s a
h
) eฺa
o m
7 ilฺc
a G uid
g m ent
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a button totakes you to a review screen with essentially the same
cuNext
5. Click Finish. (The
u s e
o D icen
information.)
t
e s l , click Activate Changes.
E rn
6. In the g
Change Center, g

uan
7. The application should automatically be active. (You do not need to explicitly start it.)
J 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.
document

Oracle WebLogic Server 12c: Administration I 10 - 29


Aula Matriz SฺAฺSฺ

Monitoring Deployed Applications: Admin Console

The administration console allows you to monitor applications:


1. Select the name of the deployed application in the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Deployments table.
2. Click the Monitoring tab.
3. Click the subtab of interest.

ble
fe r a
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
The subtabs under u cua ns(for
Monitoring e atoweb application) are:
t o D licInformation
• Web Applications:
s
e about web applications including the context root of the
n
rppe
application,, the server on which it is running,
g, the application
pp state,, the number of Servlets,,
n E the number of active HTTP sessions, and so on
u a
J • 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


Aula Matriz SฺAฺSฺ

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,
Servlet, sessions creation time of each
session, work manager and thread information, and more
EJB Targeted servers, total number of EJBs that have been activated,
current number of beans in use from the pool, total number of times a
bean has been accessed from the cache, current number of beans in
the cache, for a message-driven bean if it is connected to its ble
destination, and more fe r a
t r ans
Web service Web service name, number of servers where the service is active,
o n -
number of service errors, total number of times the service
a n been
has
invoked, average service response time, and more s
) ha ฺ
Enterprise Web application, web service, and EJB monitoring
c o m idasedescribed
application above, as well as JDBC and JMS module ฺ Gu
ail nmonitoring
m
g de t
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a Help o a full list of available information.
tfor
cuonline
See the admin console
u s e
t o D icen
e s l
n Ern
Jua

Oracle WebLogic Server 12c: Administration I 10 - 31


Aula Matriz SฺAฺSฺ

Monitoring Deployed Applications:


g Dashboard
Monitoring
1. In the View List, expand the server
and select the built-in view called 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Application Work Managers on


servername.
2 Click the start button
2. button.
3. Find the charts for the application of
interest. 1

ble
fe r a
t r ans
no n-
3
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
a e tino this built-in view are the completed requests by the
The two charts for each
u cuapplication
n s the pending requests/stuck thread count for the application’s
D e
toIn this example,
application’s work
e
work manager.s lic the work manager is the default work manager.
manager, and

n
WhatEisrna work manager? WebLogic Server uses a self-tuning thread pool. WebLogic Server does
Juaprioritize 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


Aula Matriz SฺAฺSฺ

Application Errors

• WebLogic Server errors generally show up in the server log as


messages from some troubled subsystem.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Application errors often show in the server log as a Java


Exception followed by a stack trace.
– A stack
t k trace
t shows
h allll th
the methods
th d th
thatt were iinterrupted
t t d when
h
the error occurred.
– Stack traces are used by developers to track down their faulty
code.
ble
Exception
fe r a
####<...> <Error> <HTTP>…Servlet failed with
t r ans
an Exception
o n -
java.lang.ArrayIndexOutOfBoundsException: 3 n
s a
a
at stcurr.BadClass.causeError(BadClass.java:9)
) h eฺ
o m
at jsp_servlet._vision._jspService(_vision.java:7)
d number
... Package ilฺc file uiLine
ma ent G
Class Method Source
g
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to that were executing when an uncaught exception or
cuaallnthe
A Java stack trace shows
u s emethods
D stackictrace
error occurred.oThe
t e is listed from the last method that was running to the first.
Developers s l
e look through the trace looking for code they wrote that caused the problem. The error
andE r n
stack trace are written to the server’s log file, as well as system out.
a n
Ju 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


Aula Matriz SฺAฺSฺ

Application Testing

• The administration console displays test URLs based on the


application configuration. Select the deployment from the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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 possible
that there are still issues with the application
– If a link does not work:
It could indicate a deployment ble

problem fe r a
It is also possible that the t r ans

o n-
application is OK and
accessed through some other s an
URL ) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 34


Aula Matriz SฺAฺSฺ

Performance Testing Methodology

1. Define the expected workload.


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

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.
6. Perform the test again.
7. Analyze the results. ble
fe r a
8
8. Repeat steps 55–7.
7
t r ans
no n-
s a
h
) eฺa
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r toon good design, good implementation, defined performance
Good system performance
u cuadepends
s e
objectives, and
t o D icentuning. Performance tuning is an ongoing process. Use tools that
performance
e s
providenperformance
l
metrics that you can compare against performance objectives. The goal is to
meet r performance objectives, not to eliminate all bottlenecks. Resources within a system are
Ethe
n
Juafinite; 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


Aula Matriz SฺAฺSฺ

Load and Stress Testing

• Load testing measures performance for a system at different


levels of concurrent request loads.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• 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 requires:
– Measurable performance goals, often stated as Service Level
Agreements (SLAs) e
r a bl
— Example SLA: “The 90th percentile response time for the
s fe
application under two times a normal load should be within 5 ran
t
seconds.” on- n
sa
– Load testing tools that can generate the data needed
ha ฺ
)
m ide
ฺ c o
m ail nt Gu
@ g de
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
u cuathatnsaneapplication
Functional testing verifies demonstrates the correct behavior under certain
D
toconcurrent e
inputs, whereas
example, e s
500
licusers)
load testing determines whether an application can support a specified load (for
with specified response times. Load testing is used to create
E r n
benchmarks.
a n
Ju 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
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


Aula Matriz SฺAฺSฺ

Load Testing Tools

Many commercial and open-source load testing tools are


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

• The Grinder
• JMeter
• HP LoadRunner
• RadView WebLOAD
• Oracle Load Testing (part of Oracle Application Testing Suite)
ble
fe r a
t r ans
no n-
s a
h
) eฺ a
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
JMeter is an Apache u cua nproject
Jakarta s e tothat can be used as a load-testing tool for analyzing and
D iceof a variety of services, with a focus on web applications. JMeter can
measuring theoperformance
t
e
be usednas s l
a unit test tool for JDBC database connections, web services, JMS, and HTTP. JMeter
alsoE r
supports assertions to ensure that the data received is correct.
a n
Ju 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)
environment), 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


Aula Matriz SฺAฺSฺ

The Grinder

• The Grinder:
– Is an open source load-testing tool based on Java and Python
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Supports a distributed, agent-based load simulation model


– Provides a graphical console to manage agents and view
results
– Supports HTTP/S (links, forms, cookies, and so on) but can be
extended to support additional protocols
• A Grinder agent: e
– Uses a specific number of processes and worker threads r a bl
s fe
– Executes
E t a suppliedli d ttestt script
i t with
ith each
h th
thread
d tran n -
n o
s a
a
) h eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
uatesting to
The Grinder is a Java
u cload s e framework that makes it easy to run a distributed test using
o D machines.
many “load injector”
t l i c en It is freely available under a BSD-style open-source license, and is
based on
n s open source technologies such as Jython, HTTPClient, and XMLBeans.
eother
r
Etest context runs in its own “worker” thread. The threads can be split over many processes
a n
Each
Ju 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
generated. The source of the data can be flat files
files, random generation
generation, a database
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


Aula Matriz SฺAฺSฺ

The Grinder Architecture

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

Test
Worker
Report results Script
Thread
Worker
Thread 2
CPU 3 Thread
Grinder System
HTTP
Console under
CPU test
ble
Agent
fe r a
1 St t test
Start t t
t r ans
Workerno Test n-
s a Script
Thread
Worker
Thread h
) e2ฺa
Report results 3 Thread o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to test scripts across a number of machines. The framework
cua for
The Grinder is a framework
u s e
running
has three types
t o ofDprocesses
l i c en(or programs): worker processes, agent processes, and the console.
Workern
r es
processes interpret Jython test scripts and perform tests using a number of worker
E Agent processes manage worker processes. The console coordinates the other
threads.
n
Ju aprocesses, 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
p is called a “run.”

Oracle WebLogic Server 12c: Administration I 10 - 39


Aula Matriz SฺAฺSฺ

The Grinder Proxy

• The Grinder tests are Python scripts, which can be:


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

– Recorded using the TCPProxy


• To use TCPProxy:
– Configure your web browser to proxy requests through the
TCPProxy and then use your web application
– TCPProxy creates a script that includes all GET and POST
requests, cookies, and user “think times” e
r a bl
nsfe
t r a
no n-
TCPProxy
a
h a s
m ) eฺ
Generates lฺc o uid
a scriptm a i t G
g e n
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to
The TCPProxy is a u cuaprocess
proxy s e that you can place in a TCP stream, such as the HTTP
o
connection between
t D youricweb
l en browser and a server. It filters the request and response streams,
sending the
r n esresults to the terminal window (stdout). You can control its behavior by specifying
E filters. The TCPProxy’s main purpose is to automatically generate HTTP test scripts that
different
n
a
Ju be replayed with The Grinder’s HTTP plug-in.
can
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


Aula Matriz SฺAฺSฺ

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
– Th number
The b off workerk processes to
t start
t t
– The number of threads to start in each worker process
– The number of times that each thread should run the test
– Think time adjustments (speed up or slow down) e
r a bl
– Output and logging levels
nsfe
• If The Grinder console is not available when an agent is n - tra
started, it starts running tests immediately. a no
h a s
• Test script files can also be distributed to agents
) eby ฺ using the
console.
m
o uid
ilฺc
g ma ent G
a r a@ Stud
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to are controlled by setting properties in the
a processes
The Grinder workeru cuagent
and s e
t o
grinder.properties
l enAll properties have default values. If you start a Grinder agent
D icfile.
r n es a grinder.properties file, the agent communicates with the console by using
process without
E addresses and uses one worker process, one thread, and makes one run through the test
default
n
Ju ascript 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.
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
i d
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


Aula Matriz SฺAฺSฺ

The Grinder Console

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

Distribute
test scripts

ble
fe r a
t r ans
no n-
s a Results for individual
h
) eฺ a requests
Overall results for
o m
the entire test
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
ua sprocesses,” to and “Stop processes” menu items send signals to The
The “Start processes,”
u c“Reset n e
Grinder processes
t o Dthat are
i c elistening. These controls are disabled if no agents are connected to the
console. e
On sthe
l
Processes tab, you can check whether any agents are connected.
r n
E“Start processes” control signals to worker processes that they should move into the running
a n
The
Ju 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.
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


Aula Matriz SฺAฺSฺ

Finding Bottlenecks

• A CPU-bound system cannot process additional workload


because the processor is too busy (at or near 100%).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

– Possible causes include:


— Too frequent garbage collection
— Excessive memory allocation
allocation—resulting
resulting in paging
• An I/O bound system’s processor is not fully utilized
(< 75%). The performance remains the same regardless of
the client load.
ble
– Common culprits include:
fe r a
— Accessing remote disks too frequently
t r ans
— Database issues
n o n-
Too few connections, poorly written queries

s a
Insufficient network bandwidth h
) eฺa

o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r to server cannot do any more work. Possible causes of a
a application
After the CPU is bound,
u cuthe s e
n frequent garbage collection, excessive paging, and poorly
CPU-bound system
t o D includei c etoo
designed s
eapplications. l
You can monitor the JVM garbage collection to see whether or not it is a
r n
E You can also use Java profilers to monitor your applications to see whether they have
problem.
a n
Ju 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 yyour bottleneck if it gets
g saturated. Monitor yyour 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


Aula Matriz SฺAฺSฺ

Correcting Bottlenecks

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

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
and take the longest to run. Developers should make
those methods more efficient.
Web application Precompile JSPs. Ensure that Servlet Reload Check,
ble
performance Resource Reload Check, and JSP Page Check all have
fe r a
the value of -1. Session replication
p takes resources,,
t r ans
developers should use the session sparingly.
no n-
Database performance a
Developers should increase the efficiency of their queries.
s
h a
DBAs should tune the database.
) eฺ
o m
a ilฺc t Guid
@ gm den
a r a S tu
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r o one collection algorithm and many options with which you
The Oracle HotSpotuJVMcuahasnmore
s e tthan
can experiment.
t D theicOracle
o See e documentation as well as whitepapers in the Oracle Technology
Network e s l
(http://www.oracle.com/technetwork).
r n
Elesson titled “Starting Servers” covers setting JVM memory arguments.
a n
The
Ju 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
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


Aula Matriz SฺAฺSฺ

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
id th
those defaults,
d f lt so it iis good
d tto ensure th
these attributes
tt ib t h have th
their
i production
d ti values.
l
Most web applications store objects in the HTTPSession. To provide failover, session data is
replicated. This takes resources. The larger the session, the more resources the session replication
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

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.

bl e
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this
a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 45


Aula Matriz SฺAฺSฺ

Quiz
Q
An application must be stopped to be undeployed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a. True
b. False

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: a u cua nse to
s t o D lice
r n e
n E
Ju a

Oracle WebLogic Server 12c: Administration I 10 - 46


Aula Matriz SฺAฺSฺ

Quiz
Q
A redeployed application must be manually restarted before it can
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

be used.
a. True
b False
b.

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
Answer: b u cua nse to
s t o D lice
r n e
n E
Ju a

Oracle WebLogic Server 12c: Administration I 10 - 47


Aula Matriz SฺAฺSฺ

Summary

In this lesson, you should have learned how to:


• Deploy an application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Test a deployed application


• Monitor a deployed application
• Load test an application

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 48


Aula Matriz SฺAฺSฺ

Practice 10-1 Overview: Deploying an Application

This practice covers the following topics:


• Deploying an application
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Redeploying an application
• Undeploying an application

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 49


Aula Matriz SฺAฺSฺ

Practice 10-2 Overview: Load Testing an Application

This practice covers the following topics:


• Using The Grinder to load test WebLogic Server
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Viewing the load test results in The Grinder console

ble
fe r a
t r ans
o n-
s an
) ha ฺ
c o m ide

ail nt Gu
m
g de
r a @ tu
a S
d u cu this Copyright © 2016, Oracle and/or its affiliates. All rights reserved.

a ( j u se
r
u cua nse to
s t o D lice
rn e
n E
J u a

Oracle WebLogic Server 12c: Administration I 10 - 50

You might also like