Student Guide 2 PDF
Student Guide 2 PDF
Student Guide 2 PDF
e
s
n
e
ic
el
l
b
a
fe
s
n
a
e
a
d
i
h
u
u) nt G
d
e
II Student Guide
Volume
e
s
d
s
c
tu
S
@
l
s
vo e thi
t
s
ea us
j
(
d
n
h
o
J
vo
t
s
a
D58682GC20
Edition 2.0
July 2010
D68357
to
Authors
Shankar Raman
Disclaimer
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Steve Friedberg
Technical Contributors
and Reviewers
Anand Rudrabatla
Angelika Krupp
Bala Kothandaraman
David Cabelus
Holger Dindler Rasmussen
Matthew Slingsby
Mike Blevins
Mike Lehmann
Nagavalli Pataballa
Serge Moiseev
Shailesh Dwivedi
ic
Joh
Takyiu Liu
el
l
b
a
fe
s
n
a
-tr
n
o
TJ Palazzolo
a n e
s
a uid
Werner Bauer
h
)
William Albert
du ent G
e
Will Hopkins
ss tud
c
ol@ this S
v
t
Graphic Designer as
se
e
j
u
(
Satish Bettegowda
old
v
t
as
Editors
E
n
Steve Button
e
s
n
e
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners.
Amitha Narayan
Malavika Jinka
Publishers
Shaik Mahaboob Basha
Veena Narasimhan
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Contents
n
h
o
J
Preface
1
Introduction
Objectives 1-2
Course Prerequisites 1-3
Course Objectives 1-4
Course Schedule 1-6
Facilities in Your Location 1-8
Summary 1-9
ic
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
vo
t
s
a
e
s
n
e
iii
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s seServer 11g
4 Installing OracleaWebLogic
e
j
u
(
Objectives
4-2
d
l
o 4-3
vMap
Road
t
s
a
n EOracle WebLogic Server Installation 4-4
Joh
ic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
Documentation 4-23
Road Map 4-24
Specialized Installations 4-25
Downloading Software from OTN 4-27
Quiz 4-28
Summary 4-31
Practice 3 Overview: Installing Oracle WebLogic Server 11g 4-32
5
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
ic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
n
h
o
J
7
vo
t
s
a
ic
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
weblogic.Server 8-10
Starting a Managed Server Using the Administration Console 8-12
Shutting Down a Server 8-13
Shutting Down a Domain 8-14
vii
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
9 Configuring Node Managers
s
a uid
h
Objectives 9-2
)
du ent G
Road Map 9-3
e
ss tud
What Node Managers Can Do c9-4
Road Map 9-6
ol@ this S
v
t
s 9-7 se
What Is a Machine?
a
e
j
(of Machinesuto Other Components 9-8
Relationship
d
l
vo a Machine 9-9
t
Creating
s
a
EDefining
Names and OS of Machines 9-10
n
h
Assigning Servers to a Machine 9-11
Jo
viii
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
vo
t
s
a
ix
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
11 Deployment Concepts
Objectives 11-2
Road Map 11-3
Overview of Deployment 11-4
What Is Deployed? 11-5
Deployment Process 11-7
Deployment Methods 11-8
Deployment Tools 11-9
Console Deployment Method 11-10
Console Deployment Production Mode 11-11
Preparing a New Application 11-12
Preparing a New Application: Targeting 11-13
Preparing a New Application: Settings 11-14
Deploying or Undeploying Applications 11-15
Redeploying an Application 11-16
Starting and Stopping an Application 11-17
Editing Deployment Descriptors 11-18
Monitoring an Application 11-19
Application Testing 11-20
Deleting Applications 11-21
Command-Line Deployment 11-22
Deployment with weblogic.Deployer 11-23
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s seExamples 11-24
More weblogic.Deployer
a
e
j
u
(
Deployingld
Applications with WLST 11-25
vo an Application with WLST 11-26
t
Deploying
s
a
n EDeployment with WLST 11-27
Joh
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
vo
t
s
a
xi
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
13 Advanced Deployment
Objectives 13-2
Road Map 13-3
What Is a Deployment Plan? 13-4
Configuring an Application for Multiple Deployment Environments 13-5
Sample Deployment Plan 13-7
Creating a Deployment Plan 13-8
Creating a New Deployment Plan 13-10
weblogic.PlanGenerator 13-11
Using the Administration Console to Generate a Deployment Plan 13-12
Modifying and Saving Data to Create a New Plan 13-13
New Deployment Plan Shows Changed Values 13-14
Using an Existing Deployment Plan to Configure an Application 13-15
Using an Existing Deployment Plan 13-17
Directory Structure for Easier Production Deployment 13-18
Generic File-Loading Overrides 13-19
Performing a Sanity Check in Production Without Disruption to the Clients 13-20
Road Map 13-21
Staged Deployment 13-22
Road Map 13-23
Application Availability 13-24
Production Redeployment and Application Versioning 13-25
WebLogic Production Redeployment 13-27
Production Redeployment 13-28
Advantages of Production Redeployment 13-29
Requirements and Restrictions for Production Redeployment 13-30
Redeploying a New Application Version 13-31
Redeploying Versus Distributing 13-32
Distributing a New Version of the Production Application 13-33
Distributing a New Application Version 13-35
Production Redeployment 13-36
Quiz 13-37
Summary 13-40
Practice 13 Overview: Deploying Production Applications 13-41
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
n
h
o
J
vo
t
s
a
ic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
ic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
n
h
o
J
vo
t
s
a
16 Introduction to Clustering
Objectives 16-2
Road Map 16-3
xiv
ic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
vo
t
s
a
17 Configuring a Cluster
Objectives 17-2
Road Map 17-3
Preparing Your Environment 17-4
Hardware 17-5
IP Addresses and Host Names 17-6
Cluster Address 17-7
Road Map 17-8
Methods of Configuring Clusters 17-9
Creating a Cluster by Using the Administration Console 17-10
Setting Cluster Attributes 17-12
Configuring Cluster Communication 17-13
xv
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
xvi
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
ic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
el
l
b
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
fe
s
n
a
xvii
ic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
Obtaining a Digital Certificate:
ol@keytool
is S Examples 20-12
v
h
t
t
s 20-14
Configuring Keystores
a
se
e
j
u
(
Configuring
ld SSL for an Oracle WebLogic Server 20-15
o
v
Road
st Map 20-16
a
n EProtecting Against Attacks 20-17
Joh
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz 20-35
Summary 20-37
Practice 20: Overview Configuring Keystores 20-38
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
Index
Glossary
xix
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Preface
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Profile
Before You Begin This Course
Before you begin this course, you should be able to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
Preface - 3
to
Related Publications
Oracle Publications
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Title
Part Number
E10105-04
E10125-04
E10143-03
E
n
h
Jo
Preface - 4
el
l
b
a
E10144-03
fe
s
n
a
-tr
n
o
a n e
read.me files
s
a uid
h
)
International Oracle Users Group (IOUG)
u narticles
tG
d
e
e
Oracle Magazine
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
(
d
l
o
stv
Installation and users guides
ic
e
s
n
e
to
Typographic Conventions
The following two lists explain Oracle University typographical conventions for
words that appear within regular text or within code samples.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Object or Term
Example
Courier New
User input;
commands;
column, table, and
schema names;
functions;
PL/SQL objects;
paths
e
s
n
e
Log in as scott
ic
Initial cap
Triggers;
Assign a When-Validate-Item trigger to
user interface object the ORD block.
names, such as
button names
Click the Cancel button.
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
tG
du Foremore
n
e
Titles of
information on the subject see
d SQL
ss tuOracle
c
courses and
Reference
S
@
l
s
manuals;
Manual
vo e thi
t
s
emphasized
s
ea words
j
u
(
or phrases;
Do not save changes to the database.
d
Italic
vo
t
s
a
el
l
b
a
E
n
h
Jo
Quotation marks
placeholders or
variables
Lesson or module
titles referenced
within a course
Preface - 5
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
Convention
Object or Term
Example
Uppercase
Commands,
functions
SELECT employee_id
FROM employees;
Lowercase,
italic
Syntax variables
Initial cap
Forms triggers
Lowercase
Column names,
table names,
filenames,
PL/SQL objects
ic
fe
s
n
a
vo
t
s
a
el
l
b
a
. . .
OG_ACTIVATE_LAYER
(OG_GET_LAYER ('prod_pie_layer'))
. . .
-tr
n
o
a n e
SELECTs last_name
a employees;
id
h
FROM
u
)
G
du ent USER
Text that must se CREATE
scott
d
s
u
c
t
be entered
@by a is S IDENTIFIED BY tiger;
l
o
user
tv e th
s
a
s
e
j
u
(
d
Bold
e
s
n
e
Preface - 6
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
After completing this lesson, you should be able to:
Configure JDBC and JDBC data sources
Configure data source scope
Contrast two-tier and multi-tier JDBC architecture
Configure a connection pool
List the benefits of connection pools
Describe how data sources are used
le
b
Deploy JDBC resources to a target
a
er
f
s
View the server JNDI tree
an
r
t
on
Complete a connection pool checklist
n
a e
s
a
Explain the components of JDBC
URLs
id
h
u
)
u nt G
dsource
Monitor and test a data
e
e
s
e
s
n
e
to
lic
d
s
u
c
t
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s
jea use
d(
l
o
Objectives tv
as
E
Scenario
n
h
o
J The Medical Records application needs to store data in a relational database. The application
programmers do not have experience with the particular database vendor that you have chosen, but
are familiar with SQL from another vendor. They want to isolate the vendor- and platform-specific
commands and write generic SQL that would work against any kind of relational database.
Eventually, they plan to migrate to Oracle Database, and would like to preserve all of their work now
as being vendor agnostic.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Overview of JDBC
High-level architecture of JDBC and the driver model
Design of a multi-tier architecture
Drivers provided by Oracle WebLogic Server
Data sources
Monitoring and testing data sources
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
JDBC Review
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
Perform SQL
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Application
Get connection
JDBC
driver
DB
JDBC Review
vo
t
s
Ea API is a natural Java interface for working with SQL. It builds on Open Database
The
JDBC
n
JohConnectivity (ODBC) rather than starting from the beginning, so programmers familiar with ODBC
find it very easy to learn.
The value of JDBC lies in the fact that an application can access virtually any data source and run on
any platform with a Java Virtual Machine (JVM). That is, with JDBC, it is not necessary to write one
program to access a Sybase database, another to access an Oracle database, another to access an IBM
DB2 database, and so on. You can write a single program using the JDBC API. Because the
application is written in Java, you need not write different applications to run on different platforms,
such as Windows and Linux.
JDBC accomplishes database connections by using a driver mechanism that translates the JDBC calls
to native database calls. Although most available drivers are fully written in Java (Type 4) and are
thus platform independent, some drivers (Type 2) use native libraries and are targeted to specific
platforms.
Oracle WebLogic Server includes several Type 4 JDBC drivers, which are compliant with the JDBC
3.0 specification. In addition, the Type 4 drivers support the following JDBC 4.0 specification
features:
Connection validation
Client information storage and retrieval
Autoload driver classes (when using Java Platform, Standard Edition 6 [Java SE 6])
Oracle WebLogic Server 11g: Administration Essentials 14 - 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
App
App
JNDI lookup
Connection
Connection
Connection
e
s
n
e
ic
el
l
b
a
fe
s
n
a
DB
tr
n
o
Connectionn
a e
App
s
a
id
h
u
JDBC
driver
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
JDBC DatatSources
vo
s
EaWebLogic Server can manage your database connectivity through JDBC data sources and
Oracle
n
Johmultidata sources. Each data source that you configure contains a pool of database connections that
Get connection
Perform SQL
are created when the data source instance is createdwhen it is deployed or targeted, or at server
startup. The connection pool can grow or shrink dynamically to accommodate the demand, as
indicated by the dotted connection at the top of the pool.
Applications look up a data source on the Java Naming and Directory Interface (JNDI) tree or in the
local application context (java:comp/env), depending on how you configure and deploy the
object, and then request a database connection. When finished with the connection, the application
uses the close operation on the connection, which simply returns the connection to the connection
pool in the data source.
Oracle WebLogic Server data sources allow connection information such as the JDBC driver, the
database location (URL), and the username and password to be managed and maintained in a single
location, without requiring the application to worry about these details. In addition, limiting the
number of connections is important if you have a licensing limitation on your database or it can
support only a specific capacity.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
lic
Deployed as part of Java Platform, Enterprise Edition (Java
e
l
b
a
EE) enterprise applications
r
e
sf
n
Accessible only by the containing application
a
r
-t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Data Source
vScope
t
s
a WebLogic Server administrators and developers can define the JDBC data sources.
EOracle
Both
n
JohRegardless of which approach you take, each JDBC data source is represented by an XML file that is
called a module. The concept of scope is useful when there is a potential namespace clash. For
example, if developer 1 makes application A that uses data source X, and developer 2 makes
application B that also uses a different data source X, the scope is set at an application level. (You
may wonder why not name it AX and BX, but that is beside the point.) Alternatively, if both
application A and application B wanted to use the same data source X, it would be scoped at the
server level by the administrator.
WebLogic administrators typically use the Administration Console or the WebLogic Scripting Tool
(WLST) to create and deploy (target) JDBC modules. These JDBC modules are considered system
modules, are stored in the domains configuration repository as separate XML files, and are referred
to by the domains config.xml file.
Alternatively, developers define data sources in XML descriptor files, and then package the JDBC
modules within a Java EE enterprise application for administrators to deploy. These JDBC modules
are considered application modules. Because the modules are deployment descriptors, they can also
be modified for different environments using Java EE deployment plans.
All WebLogic JDBC module files must end with the -jdbc.xml suffix, such as examplesdemo-jdbc.xml. Oracle WebLogic Server checks the file name when you deploy the module.
Oracle WebLogic Server 11g: Administration Essentials 14 - 6
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Multi-Tier Architecture
Client
Java applet or
Java DBMS client
Server
Data source
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
DBMS
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Multi-Tier Architecture
vo
t
s
Ea tier makes it possible to maintain control over access and the kinds of updates that can be
The
middle
n
Johmade to corporate data. Another advantage is that it simplifies the deployment of applications.
Finally, in many cases, the multi-tier architecture can provide performance advantages.
Until recently, the middle tier has typically been written in languages such as C or C++, which offer
fast performance. However, with the introduction of optimizing compilers that translate Java
bytecode into efficient machine-specific code and technologies, such as Enterprise JavaBeans, the
Java platform is fast becoming the standard platform for middle-tier development. This is a big plus,
making it possible to take advantage of Javas multithreading and security features.
With enterprises increasingly using the Java programming language for writing server code, the
JDBC API is being used more and more in the middle tier of a three-tier architecture. Some of the
features that make JDBC a server technology are its support for connection pooling, distributed
transactions, and disconnected rowsets. The JDBC API is what allows access to a data source from a
Java middle tier.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Type 4 Drivers
Type 4 drivers are all-Java driver implementations that do not
require client-side configuration.
Client
Java app
JDBC API
to
ic
l
e
l
b
DBMS
ra
e
f
s
tran
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
JDBC driver
e
s
n
e
Type 4 Drivers
vo
t
s
Ea4 driver is a database driver that is written in 100% pure Java. Drivers that are written in Java
An
Type
Johhave all the performance benefits because they do not have the extra layers between the program and
the database. They can operate on any platform and can be downloaded from a server (for example,
when using an applet). Because the driver can be downloaded from a server, the client machine does
not require preconfiguration of a native driver. This preconfiguration is why the Type 1, 2, and 3
drivers are now deprecated. All that remains are Type 4 drivers.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
er
f
s
an
By default, these drivers are added to the
servers
r
t
on
classpath.
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
WebLogic JDBC
vo Drivers
t
s
Ea
The
WebLogic
Type 4 JDBC drivers are installed with Oracle WebLogic Server in the
n
h
<WL_HOME>/server/lib
folder, where <WL_HOME> is the directory in which you installed
Jo
Oracle WebLogic Server. Driver class files are included in the manifest classpath in
weblogic.jar, so the drivers are automatically added to your classpath on the server.
This release includes support for Oracle 11g and 11g Real Application Clusters (RAC). Support for
11g RAC continues to rely on the well-proven integration architecture using multidata sources for
X/Open Distributed Transaction Processing (XA) with load balancing.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Overview of JDBC
Data sources
Describing a data source and how it works
Using the Administration Console to create a data source
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
What Is a Connection
Pool?
vo
t
s
a
EWebLogic Server opens JDBC connections to the database during the WebLogic startup
Oracle
n
h
Jo process and adds the connections to the pool. This is faster than creating a new connection on
demand. The size of the pool is dynamic and can be fine-tuned.
The connection pool within a JDBC data source contains a group of JDBC connections that
applications reserve, use, and then return to the pool. The connection pool and the connections within
it are created when the connection pool is registered, usually when starting up Oracle WebLogic
Server or when deploying the data source to a new target.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Managed server
JNDI
DataSourceA
: Connection
: Connection
DBMS
: Connection
Component
e
s
n
e
to
ic
: Connection
el
l
b
a
fe
s
n
JDBC Conn.
traPool
n
DataSourceC
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
JDBC Connection
vo Pooling
t
s
Ea in the slide shows the flow from the applications through the JNDI tree, through the
The
graphic
n
JohJDBC connection pools, and finally to the database. In Oracle WebLogic Server, you can configure
database connectivity by configuring the JDBC data sources and the multi-data sources, and then
targeting or deploying the JDBC resources to the servers or clusters in your WebLogic domain.
Each data source that you configure contains a pool of database connections that are created when
the data source instance is createdwhen it is deployed or targeted, or at server startup. Applications
look up a data source on the JNDI tree or in the local application context (java:comp/env),
depending on how you configure and deploy the object, and then request a database connection.
When finished with the connection, the application calls connection.close(), which returns
the connection to the connection pool in the data source.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
li
e
l
A connection pool allows an application to borrow
ba
a
r
e
DBMS connection.
sf
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Benefits oftConnection
Pools
vo
s
a
E a DBMS connection is a very slow process when compared to assigning an existing
Making
n
h
Jo connection. When Oracle WebLogic Server starts, connections from the connection pools are opened
and are available to all clients. When a client closes a connection from a connection pool, the
connection is returned to the pool and is available for other clients; the connection itself is not closed.
There is little cost in opening and closing pool connections. The alternative is for application code to
make its own JDBC connections as needed. A DBMS runs faster with dedicated connections than if
it has to handle incoming connection attempts at run time.
Connection information, such as the JDBC driver class name, the database location (URL), and the
username and password can be managed in one location using the Administration Console.
Application developers can obtain a connection without having to worry about these details.
Limiting the number of DBMS connections is important if you have a licensing limitation for DBMS
connections or a resource concern.
Clients use a connection pool by borrowing a connection, using it, and then returning it to the pool
by closing it. The connection pool can grow or shrink dynamically to accommodate demand. The
Administration Console is used to set a connection pools initial capacity, maximum capacity, and
capacity increment.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Modular Configuration
and Deployment of JDBC Resources
vo
t
s
a
Example
E of a JDBC configuration:
n version="1.0" encoding="UTF-8"?>
<?xml
h
o
<jdbc-data-source
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-dataJ source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-datasource.xsd" xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source"
xmlns:sec="http://xmlns.oracle.com/weblogic/security"
xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>MedRecGlobalDataSourceXA</name>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@localhost:1521:orcl</url>
<driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
<properties>
<property>
<name>user</name>
<value>medrec</value>
</property>
</properties>
<passwordencrypted>{AES}fyOq41+FkMM+ZhcliHQTX21fDGIyKOvdNwHi1B8P528=</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>5</initial-capacity>
<max-capacity>10</max-capacity>
<capacity-increment>1</capacity-increment>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>jdbc/MedRecGlobalDataSourceXA</jndi-name>
<global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Lookup
data source
Managed server
Connection pool
Return data source 2
3 getConnection()
Return connection
JNDI
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
DBMS
a
d
i
h
u
) tG
uaccess
5 Database
d
Connection
n
e
e
s
d
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
old Connection Pools Are Used
How Data Source
v
t
aansexample of how a data source is used by the client. The sequence of events is as follows:
E
This
is
n1. A client performs a lookup in the Oracle WebLogic Server JNDI tree.
h
o
J
Data source
2. The client retrieves a data source object. A data source object contains a reference to the
connection pool.
3. After a data source object is obtained, the client tries to get a database connection.
4. A specific connection is returned from the pool. The pool may have to be extended to create a
new free connection, or there might not be any more free connections.
5. The connection then directly accesses the database through the connection.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
Notice non-XA
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Creating a Data
vo Source Using the Administration Console
t
s
a
E
You
can create data sources via the Administration Console (as shown here) or WLST. Make sure
n
Johthat the JDBC drivers that you want to use to create database connections are installed on all the
servers on which you want to configure database connectivity. Some JDBC drivers are installed with
Oracle WebLogic Server, including the WebLogic Type 4 JDBC drivers for DB2, Informix, MS SQL
Server, Oracle, and Sybase.
1. In the Domain Structure tree, expand Services > JDBC and then select Data Sources.
2. On the Summary of Data Sources page, click New.
3. In the JDBC Data Source Properties section of the Create a New JDBC Data Source page,
enter or select the following information and click Next:
- Name: Enter a configuration name for this JDBC data source.
- JNDI Name: Enter the JNDI path to which this JDBC data source will be bound.
Applications look up the data source on the JNDI tree by this name when reserving a
connection.
- Database Type: Select the database that you want to connect to. If your DBMS is not
listed, select Other.
- Database Driver: Select the JDBC driver that you want to use to connect to the database.
The list includes common JDBC drivers for the selected DBMS. For example, the nonXA driver was selected, but you could have selected the XA driver. The non-XA will
show an extra page for configuration.
Oracle WebLogic Server 11g: Administration Essentials 14 - 16
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Non-XA Configuration
This appears only if a non-XA driver was selected previously.
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Non-XA Configuration
vo
t
s
a
If n
youEselected a non-XA JDBC driver, you are presented with two transaction options: Supports
JohGlobal Transactions and Supports Local Transactions. If you select the non-XA option, WebLogic
can use several alternative strategies to emulate XA on your non-XA driver.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
Sample schemas
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Data Source
Properties
vConnection
t
s
a
InntheEConnection Properties section of the Create a New JDBC Data Source page, enter values for
h
Jo the following properties and click Next:
Database Name: This field is overloaded, which means there are multiple kinds of information
that could go in this field depending on the context. It is not always the name of the database
that you want to connect to. Exact database name requirements vary by JDBC driver and by
DBMS. If you used Oracles Driver for Service Connections, the service name would be the
full name orcl.example.com; if you used Oracles Driver for Instance Connections, the
instance name would be just orcl. RAC naming is different as well. In any case for Oracle, it
is not the database name.
Host Name: Enter the DNS name or IP address of the server that hosts the database.
Port: Enter the port on which the database server listens for connections requests. For Oracle
databases, you can verify this by entering lsnrctl status.
Database User Name: Enter the database user account name that you want to use for each
connection in the data source.
Password/Confirm Password: Enter the password for the database user account.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Test Configuration
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Test Configuration
vo
t
s
a
InntheETest Database Connection section of the Create a New JDBC Data Source page, review the
Johconnection parameters and click Test Configuration. WebLogic attempts to create a connection from
the Administration Server to the database. Results from the connection test are displayed at the top of
the page. If the test is unsuccessful, you should correct any configuration errors and retry.
Selecting a target is optional. You can click Finish after testing without assigning a target. The JDBC
source will be configured, but not deployed. If you skip selecting the target, there is a chance to
deploy the JDBC source later. Select a server target (or not), and then click Finish.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
1
2
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Configuration
ConnectiontvPool
s
Ea
The
screenshot
in the slide shows how you can modify a connection pool after the data source is
n
h
Jo created.
Before modifying a connection pool, you should know:
The JDBC URL of the database
The connection properties used to authenticate a user or optionally configure the driver
The maximum number of connections that your application will be allowed by the DBA
After creating your initial data source configuration in the console, you can tune its connection pool
settings:
1. In the Domain Structure tree, expand Services > JDBC and then select Data Sources. After
selecting your data source, select Configuration > Connection Pool.
2. Enter values for the available data source attributes.
Note: The exclamation mark in a yellow triangle means that changing these values requires
restarting some components.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid More options not
h
)
shown
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Advanced
ConnectiontvPool
s
Eofathe key options are found under the Advanced section, including:
Some
n
Joh Initial Capacity: This is the number of physical connections to create when deploying the
connection pool. This is also the minimum number of physical connections that the connection
pool will keep available.
Maximum Capacity: This is the maximum number of physical connections that this
connection pool can contain. For optimal performance, set the value of Initial Capacity equal to
the value for Maximum Capacity, although that disables the dynamic resizing.
Capacity Increment: When there are no more available physical connections to satisfy
connection requests, Oracle WebLogic Server creates this number of additional physical
connections and adds them to the connection pool up to the maximum capacity.
Test Frequency: This is the number of seconds between when Oracle WebLogic Server tests
unused connections. This requires that you specify a Test Table Name. DUAL is included in all
Oracle database installations for such a purpose as this. Connections that fail the test are closed
and reopened to reestablish a valid physical connection. If the test fails again, the connection is
closed.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Source
Targeting atv
Data
s
a
E
This
is the second opportunity to deploy a JDBC to a target. Any previous targets are prechecked
n
Johwhen this page is displayed. When you target a JDBC data source, a new instance of the data source
is created on the target. When you select a server as a target, an instance of the data source is created
on the server. When you select a cluster as a target, an instance of the data source is created on all
member servers in the cluster.
1. Navigate to the data source that you want to modify and click the Targets tab.
2. Select each server or cluster on which you want to deploy the data source, and click Save.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
JDBC data
ice
l
source
e
l
rab
wls:/base_domain/serverConfig> jndi()
wls:/base_domain/jndi> cd('AdminServer')
wls:/base_domain/jndi/AdminServer>
dr-ejb
dr-javax
dr-weblogic
-r-cgDataSource
-r-cgDataSource-nonXA
-r-mejbmejb_jarMejb_EO
-r-samplesDataSource
ls()
to
sf
n
a
tr
n
o
weblogic.rmi.cluster.ClusterableRemoteObject
a n e
weblogic.rmi.cluster.ClusterableRemoteObject
s
a uid
weblogic.rmi.cluster.ClusterableRemoteObject
h
)
weblogic.rmi.cluster.ClusterableRemoteObject
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Demonstration
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Demonstration
vo
t
s
Eademonstration at the following URL:
See
the
n
Johhttp://www.oracle.com/technology/obe/fusion_middleware/wls103/appdeploy/configure/datasource/
Conf_DS_WLS.htm
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
JDBC URLs
Database locations are specified using a JDBC Uniform
Resource Locator (URL).
Example 1:
This URL specifies that the oracle:thin subprotocol
should be used to connect to an Oracle database:
e
s
n
e
jdbc:oracle:thin:@dbhost:1521:SALESINFO
ic
Example 2:
el
l
b
a
er
f
s
This URL can be used to access a PointBase
an database:
r
t
on
n
a e
jdbc:pointbase:server://dbhost:9092/HRDATABASE
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
JDBC URLstvo
as
If n
youEuse a JDBC driver developed by a third party, the documentation tells you what
to usethat is, what to put after jdbc: in the JDBC URL. The syntax for a
Johsubprotocol
JDBC URL is jdbc:subprotocol:subname.
subprotocol identifies the database connectivity mechanism.
subname identifies the data source. The subname can vary depending on the subprotocol.
The contents and syntax of subname depend on subprotocol. subname can also specify a
network address for the databasefor example, subname can be specified using
//hostname:port/dbname.
For Example 1
dbhost: The host name or IP address
1521: The default listener port
SALESINFO: The system identifier (SID), the name of the database
For Example 2
subprotocol is pointbase:server.
subname is a location of the PointBase database named HRDATABASE.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Connection Properties
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
ConnectiontvProperties
s
Ea properties are a set of key/value pairs that are passed to the driver when database
Connection
n
Johconnections are created. Connection properties are specific to the driver. For a complete list, see your
driver documentation.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Oracle
Sybase
MSSQL
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid, database.home,
cache.size, crypto.communication
h
PointBase
)
database.pagesizedu
tG
n
e
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Specifying tConnection
Properties
vo
s
a
E connection properties can be set in the pointbase.ini file. You can select the
PointBase
n
h
pointbase.ini
parameters to configure the database properties. By configuring the database
Jo
Informix
to
properties, you can increase the performance of your system. However, PointBase should not be used
in a production environment, so performance for that DBMS is less critical.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Overview of JDBC
Data sources
Monitoring and testing data sources
Monitoring
Testing
Suspend/resume
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Data source
retested
successfully.
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
Monitor data
s
a uid
source statistics.
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Monitoringtand
vo Testing a Data Source
s
a create a JDBC data source and target it to one or more servers, you can monitor it in the
Eyou
After
n
JohAdministration Console. Locate and select your new data source and select Monitoring > Statistics.
Statistics are displayed for each deployed instance of the data source. Optionally, click Customize
this table to change the columns displayed in the Statistics table. For example, some of the available
columns (not displayed by default) include:
Active Connections Current Count: The number of connections currently in use by
applications
Active Connections Average Count: The average number of active connections from the time
that the data source was deployed
Connections Total Count: The cumulative total number of database connections created in
this data source from the time that the data source was deployed
Current Capacity: The current count of JDBC connections in the connection pool in the data
source
Highest Num Available: The highest number of database connections that were available at
any time in this instance of the data source from the time that the data source was deployed
Waiting for Connection High Count: The highest number of application requests
concurrently waiting for a connection from this instance of the data source
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
on a
given
server
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
take this
h
)
action.
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
o Life Cycle
ConnectiontvPool
s
Ea a connection pool is automatically started when it is deployed. You can manually stop
Byndefault,
Johand restart the connection pool. This might be necessary if you change the username/password or
some other characteristic of the connection. If you wanted to gracefully shut down an application,
you might start by shutting down the connection pool.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
OFF
ON
ON
Control and
Monitoring
pages
e
s
n
e
ic
myDomain
myDomain
el
l
b
a
er
myDomain
nsf
ra
t
n
myD
myD
myD
o
n
a
S
S
s ide S
a
h
myD
myD
) t Gu
mySvr1
mySvr1
u
mySvr1
d
S
S
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
oldData Source
Fixing an Offline
v
t
as
If n
youEstart your domain managed servers while the Database is not available, the Data Source
Johinstance does not show up on the Control and Monitoring pages. So you cannot select it for Resume
nor Start operations and it will not be found in the JNDI tree.
You can start the Database and then do either of the following options:
1. Restart the managed servers (which could take a long time and you may have application
downtime) or
2. A better way is to wait for the database to come back up, then Lock & Edit > Remove the
Data Source from Target > Save > Activate.
This is a complete undeployment of your Data Source on a running server. The Data
Source remains defined to the domain though, just not targeted.
3. Then you redeploy it again with: Lock & Edit > Put Data Source again on its Target(s) >
Save > Activate.
This is a clean restart of your Data Source on a running WLS.
If this is a typical situation for some company (starting WLS when Database is unavailable),
you also can set Initial Capacity = 0, that means the Data Source Java object is created and bound to
the JNDI tree, but no connections are created. The instance shows up in the JNDI tree and on the
Control and Monitoring pages. You have to set Capacity Increment >= 1 and then connections are
created on the first client request.
Oracle WebLogic Server 11g: Administration Essentials 14 - 32
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which is NOT an available configuration attribute for a JDBC
data source?
a. Host name
b. Queue size
c. Test frequency
d. Initial capacity
e
s
n
e. Capacity increment
ce
to
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: b tvo
asare valid settings for a data source except queue size. Data sources use connection pooling,
E
All
these
nnot a queue.
h
but
o
J
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which are the two levels of data sources available in Oracle
WebLogic Server?
a. Connection
b. Web
c. Application
d. Process
e. System
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: c, tevo
as that system data sources are scoped to the domain, whereas application data sources are
E
Remember
n
h
deployed
as part of an application.
o
J
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Client applications look up data sources from the local servers
___________ tree:
a. Application
b. Web
c. LDAP directory
d. JNDI
e
s
n
e. System
ce
el
l
b
a
fe
s
n
a
n
h
o
J
vo
t
s
a
Answer: d
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Practice 14 Overview:
Configuring JDBC Data Sources
This practice covers the following topics:
Creating JDBC modules (via GUI and WLST)
Deploying JDBC modules
Testing JDBC modules
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Practice 14tOverview:
Configuring JDBC Data Sources
vo
s
a
E
See
A for the complete steps to do the practice.
n Appendix
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
After completing this lesson, you should be able to:
Describe JMS
Describe how Oracle WebLogic Server JMS is
implemented
Configure JMS server
Configure connection factories
Configure queues and topics
le
Configure persistent messages
b
a
er
f
s
Deploy an application that uses JMS
an
r
t
Monitor JMS resources and messages
non
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
e
s
n
e
lic
Objectivestvo
as
E
Scenario
n
h
o
J Consider an online order entry application that integrates with a shipping application. In this
case, you may not want the online customer to keep waiting for the shipping application to
finalize the shipping process.
Generally, in such cases, the following steps are performed:
1. The customer places an order using the order entry application.
2. When the order is completed and confirmed (may involve a credit check and so on), the
order details are placed in a message queue.
3. The shipping application regularly checks the order message queue, picks up the orders
from the message queue, assigns the appropriate shipping agency (for example, UPS,
FedEx, or USPS), and appropriately generates shipping labels.
4. In addition, the shipping may append the shipping details to the order message.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Message-Oriented Middleware
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Message-Oriented
Middleware
vo
t
s
a
Emessage-oriented middleware became widely used when providers created architectures that
The
n
h
Jo could operate in a standard way on a variety of platforms and enabled asynchronous
communication between applications. These providers gained popularity in enabling integration
of mainframes and personal computers.
Even though there is much competition and variety in message-oriented middleware products,
they tend to fall into one of the following categories:
Point-to-point
Publish/Subscribe
Request-reply
JMS Messaging Models
JMS supports the point-to-point (PTP) and Publish/Subscribe messaging models. The models are
very similar, except the following:
The PTP messaging model enables delivery of a message to exactly one recipient.
The Publish/Subscribe messaging model enables delivery of a message to multiple
recipients.
The request-reply messaging model is more suited in a synchronous messaging environment
where the requester and replier are in conversational modethe requester waits for a response
from the replier before continuing work. It is not explicitly supported in JMS.
Oracle WebLogic Server 11g: Administration Essentials 15 - 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Point-To-Point Queue
Many message producers can serialize messages to multiple
receivers in a queue.
Messages are
delivered to one client.
Caller
(Producer)
Incoming Calls
queue
3
1
Rep - A
e
s
n
e
ic
el
l
b
a
er- B
Rep
f
s
an
-t2r
n
o
Oracle WebLogic Servera n
Rep - C
s
e
a
d
h Gui
)
u
ed dent
s
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
d
Caller
(Producer)
to
Point-To-Point
vo Queue
t
s
Eausing a PTP queue, multiple message producers can put messages onto a single queue.
When
n
JohThe queue serializes the messages in a linear order. Multiple receivers can take messages off the
queue; the messages typically come off in a first-in, first-out (FIFO) order; the oldest message
on the queue is the first one to be taken off.
A message can be delivered only to one receiver. Receivers are also referred to as consumers.
An example of when to use a PTP queue would be at a call center.
Calls are routed into the network through a PBX. The PBX system places incoming calls
onto an Incoming Calls queue. When a service representative is available, the
representative requests for the next caller in the system.
The system pulls off the queue the caller who has been waiting the longest (FIFO method)
and routes the caller to the service representative.
After the conversation is established between an in-queue customer and a representative, it
becomes a synchronous communication. (This is similar to request-reply mode).
This is only an example and, in many cases, the responses are not just pure FIFO but weightings
assigned by the organizations.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Publish/Subscribe Topics
Publishing and subscribing to a topic decouples producers from
consumers.
Messages are delivered
to multiple clients.
Publisher
Distribution
topic
se
Subscriber en
lic
e
l
b
a
r
e
f Subscriber
to
ns
a
r
t
- 1
3
2n
o
Publisher
Oracle WebLogic Server
Subscriber
a n e
s
a
d
h Gui
)
u
ed dent
s
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
old Topics
Publish/Subscribe
v
t
s
athe
E
Having
publishers publish to a topic rather than directly to a list of subscribers decouples the
n
h
Jo publishers and subscribers.
By doing this, a publisher is not required to manage the number of subscribers (if any) that must
receive the message. By delegating the message delivery work to the message-oriented
middleware server (which manages the topic), the publisher does not have to manage the
delivery of guaranteed messages, fault tolerance of its production, load balancing, or other
issues. By decoupling a subscriber from the publisher, the subscriber does not have to determine
whether its publisher is active. If the message-oriented middleware server is executing, the needs
of both the publishers and the subscribers are met.
An example of using a Publish/Subscribe topic is a stock ticker application.
A typical system would set up a topic for each stock that is traded on the exchanges.
When a trade is made on a stock, the respective exchange publishes a message to the topic
that is associated with the stock traded.
Clients who are interested in receiving updates about the status of their stocks use a
program to subscribe to the topics of each stock they are interested in.
When the topic update is recognized, the message server broadcasts the message to all the
interested (clients) stock ticker programs.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
bl
a
r
fe
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Oracle WebLogic
vo Server JMS Features
t
s
Ea
An
enterprise
messaging system enables applications to asynchronously communicate with one
n
h
Jo another through the exchange of messages. A message is a request, report, and/or event that
contains information needed to coordinate communication between different applications. A
message provides a level of abstraction, which allows you to separate the details about the
destination system from the application code.
The Oracle WebLogic Server implementation of JMS fully supports the point-to-point and
Publish/Subscribe models of the messaging middleware.
Oracle WebLogic Server also provides acknowledgement-based (ACK) guaranteed message
delivery (GMD) by enabling persistent storage of messages until the receiver of the message
issues an acknowledgement of receipt.
Oracle WebLogic Server JMS uses its built-in support for JDBC and JDBC connection pools to
persist JMS messages in a database.
Oracle WebLogic Server supports transactional message delivery. Transactional message
delivery gives the developer the ability to put a JMS session into a transaction context. In Oracle
WebLogic Server JMS, the message is not visible or available for consumption until the
transaction is committed. A session can optionally roll back the transaction, which has the
transaction drop the messages it had previously buffered.
Oracle WebLogic Server 11g: Administration Essentials 15 - 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Q1
T1
WLS Server
Q2
T2
CF
Sender/
Publisher
C1
JMS Server B
JMS Server A
Topic2
Topic1
JMS Client
Receiver/
Subscriber
Queue2
Queue1
JEE
Module
e
s
n
e
to
lic
e
l
JDBC b
raPersistence
e
f
ans
-tr
n
o
C2
C3
n
a
s
e
a
d
i
h
Sender/
Receiver/
u
) tSubscriber
G
Publisher edu
n
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
JEE
Module
C4
or
Oracle WLS
voJMS Architecture
t
s
a components of the WebLogic JMS Server architecture include:
Emajor
The
n
Joh JMS servers that can host a defined set of modules and any associated persistent storage
that resides on a WebLogic Server instance. JMS server configuration is stored in the
domain config.xml file.
JMS modules that contain configuration resources (such as queues, topics, and connections
factories) and are defined by XML documents that conform to the weblogic-jms.xsd
schema
Client JMS applications that either produce messages to destinations or consume messages
from destinations
Java Naming and Directory Interface (JNDI), which provides a resource lookup facility.
JMS resources such as connection factories and destinations are configured with a JNDI
name. The run-time implementations of these resources are then bound to JNDI using the
given names.
WebLogic persistent storage (file store or JDBC) for storing persistent message data
In the slide, C1 and C4 are remote JMS clients, C2 and C3 are server-side JMS clients. As a
sample flow, C1 can do a JNDI lookup and download Connection Factory CF and Topic T1.
Then C1 creates the Connection, Session, and Publisher object and publishes a message. C4 can
do the same to receive the message.
Oracle WebLogic Server 11g: Administration Essentials 15 - 9
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ConnectionFactory
Connection
2
Create a
connection.
WLS
JNDI
Destination: Queue
Create a
session.
Session
Look up a
destination.
Destination: Topic
JMS Server
e
s
n
e
to
ic
el
l
b
a
er
f
s
To a
send
n messages,
r
t
these
are required:
n
o
Connection
a n e-- Session
s
Send
a uid
message. 5u) h
Client
- Destination
G
t
d
n
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Typical JMS
voMessaging Process
t
s
Eaimplementations, developers use a connection factory to enable their applications to
InnJMS
Johconnect to a queue or topic.
Destination
Destination
is returned. 4
A connection factory is a lightweight object stored on a JNDI tree that is used to create
connections to destinations. A connection is a communication link to the JMS server that is used
to create sessions.
Sessions are bound to destinations to create senders, receivers, publishers, subscribers, and
empty message objects. A session is also used to demarcate transactions.
Destination, a lightweight object stored on JNDI, is the target for the messages.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Transacted Messaging
Producer
e
s
n
e
to
ic
el
l
b
a
erConsumer
f
s
an
-tr
n
o
are
nMessages
Messages arrive
a
removed
s ide
at the destination.
a
h
) t Gufrom the destination.
u
Queue
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
o
Transacted
vMessaging
t
s
a can participate in a distributed or local transaction. There are two scenarios:
Eclients
JMS
n
Joh On the Producer side, a transaction begins and some operations, such as sending messages,
are performed. If the transaction commits, all the messages are sent to the destination. If
the transaction rolls back, none of the messages arrive at the destination.
On the Consumer side, a transaction begins and some operations, such as processing
messages, are performed. If the transaction commits, the processed messages are removed
from the destination. If the transaction rolls back, the messages stay in the destination.
Notice that the left red line of the Queue is indented by one message (yellow box) indicating that
the producing transaction ends when the message reaches the queue. The right red line of the
Queue is also indented by one message as per above. The consuming transaction begins when
the consumer starts to remove the message from the queue.
The point is that while the message is on the queue, and not being produced or consumed, there
is no transaction.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
JMS Administrative
Tasks
vo
t
s
a
Eadministrator, you are responsible for configuring and monitoring most aspects of JMS.
As
an
n
h
Jo The architecture of your system determines the type of JMS destinations to configure. It is your
responsibility to monitor the Oracle WebLogic Server JMS and gather statistics. All these
administrative tasks are discussed throughout this lesson.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Managed Server A
JMS Server 1
Queue A
Queue B
Topic Z
Managed Server B
JMS Server 2
Queue C
Topic Y
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Oracle WLS
voJMS Implementation
t
s
Eayou implement JMS in WLS, you configure the following JMS resources:
When
n
Joh Configure the necessary JMS servers and target them to the appropriate managed servers.
Configure JMS modules.
Within the JMS modules, you define the queue or topic resources.
Then using the subdeployment definitions, target the queues to the appropriate JMS
servers. Queues and topics can be targeted to only a single JMS server, while Connection
factories, uniform distributed queues, and uniform distributed topics can be targeted to
multiple JMS servers or a cluster. Clusters are discussed in the lesson titled Introduction
to Clustering.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
3
o Server
Creating atv
JMS
s
a create and configure a JMS server by using the Administration Console. To create a
YouE
can
n
server, perform the following steps:
JohJMS
1. Expand the Services node in Domain Structure in the left panel, and then expand the
Messaging node. Click JMS Servers. The summary of JMS servers appears in the right
pane.
2. Click Lock & Edit to enable editing configuration. Then click New at the JMS Servers
table. The Create a New JMS Server dialog box appears.
3. Enter values for the following configuration parameters:
- Name: The name of the JMS server
- Persistent Store: The backing store used by destinations. A value of none means that
the JMS server will use the default persistent store that is configured on each targeted
WLS instance.
4. Click Next to target a JMS server.
5. When you specify that you want to create a new store in step 3, the Select store type
page appears. You can select File Store or JDBC Store.
- If you specify File Store, the File store properties page appears. When creating a
file store for the JMS Persistent store, the path name to the directory must exist on
your system, so be sure to create it before completing this page.
- If you selected JDBC Store, in the Create new JDBC Store page, select a
configured JDBC data source or configure a new JDBC data source for the store. You
cannot configure a JDBC data source that is configured to support global
transactions.
Oracle WebLogic Server 11g: Administration Essentials 15 - 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
1
2
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Configuring
voa JMS Server
t
s
a change the configuration of already created JMS servers or add configurations on a
Ecan
You
n
JohJMS server by performing the following steps:
1. Select Services > Messaging > JMS Servers from the Domain Structure pane. Locate and
click the link to the JMS server that you want to configure.
2. Enter the values appropriately on the Settings for HRJMSServer page.
You can set persistent stores at the time of creating a JMS server. If you have already configured
persistent stores, you can assign one of them when configuring the JMS server.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
JMS Modules
config.xml
deploy
to
ic
el
l
b
a
EAR
weblogicapplication.xml
DD
e
s
n
e
fe
s
n
a
-tr
n
o
n
ademo-jms.xml
MyJMSDescriptors
e
a
d
i
jms.xml
h
u
u) nt G
d
e
Application module s
System module
de
s
u
c
t
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
JMS Modules
vo
t
s
a
Emodules
JMS
are application-related definitions that are independent of the domain
n
h
Jo environment. You create and manage JMS resources either as system modules or application
modules.
JMS system modules are typically configured using the Administration Console or the
WebLogic Scripting Tool (WLST), which adds a reference to the module in the domains
config.xml file. System modules are owned and modified by the WebLogic
administrator and are available to all applications.
JMS application modules are a WebLogic-specific extension of Java EE modules and can
be deployed either with a Java EE application (as a packaged resource) or as stand-alone
modules that can be made globally available. Application modules are owned and modified
by WebLogic developers, who package JMS resource modules with the applications EAR
file.
After the initial deployment is completed, an administrator has only limited control over the
deployed applications. For example, administrators are allowed only to ensure the proper life
cycle of these applications (deploy, undeploy, redeploy, remove, and so on) and tune parameters,
such as increasing or decreasing the number of instances of any given application to satisfy the
client needs. Other than life cycle and tuning, any modification to these applications must be
completed by the application development team.
Oracle WebLogic Server 11g: Administration Essentials 15 - 18
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
JMS Modules
e
s
n
e
to
lic
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
JMS Modules
vo (continued)
t
s
Eathe process of deploying a JMS application, you link the application components to the
During
n
Johenvironment-specific JMS resource definitions, such as the server instances (deployment target)
that should host a given application component, and the location to use for persisting JMS
messages.
With modular deployment of JMS resources, you can migrate your application and the required
JMS configuration from environment to environment, such as from a testing environment to a
production environment, without opening an enterprise application file (such as an EAR file) or
a stand-alone JMS module, and without extensive manual JMS reconfiguration.
JMS configuration resources, such as destinations and connection factories, are stored outside of
the WebLogic domain configuration file as module descriptor files, which conform to the
weblogic-jms.xsd schema. JMS modules do not include the JMS server definitions.
The JMS system modules must be targeted to one or more Oracle WebLogic Server instances or
to a cluster. The targetable resources that are defined in a system module must also be targeted
to a JMS server or the Oracle WebLogic Server instances within the scope of a parent modules
targets. Additionally, the targetable JMS resources within a system module can be further
grouped into subdeployments during the configuration or targeting process to provide further
loose-coupling of the JMS resources in a WebLogic domain.
Oracle WebLogic Server 11g: Administration Essentials 15 - 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Module
Creating atv
JMS
s
EaModule may be created by the administrator using the Administration Console, or by the
AnJMS
Johprogrammer with an IDE and packaged with the application. To create a JMS System Module
using the Administration Console, perform the following steps:
1. Select MedRecDomain > Services > Messaging > JMS Modules > New.
2. Enter a Name, and optionally a descriptor and location for the descriptor.
3. (Not shown) Select one or more Targets for this module, such as the Administration Server
or one or more of the managed servers, or a cluster.
4. You can add modules (such as Connection factories, Queues, and Topics) at this time, or
not. If you choose not to add modules now, you can come back at a later time to add or
modify modules.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Modular JMS
voResource Configuration and Deployment
t
s
Ea
Ansubdeployment
for JMS destinations is a mechanism by which queues and topics, and possibly
h
Jo connection factories, are grouped and targeted to a single JMS server. Queues and topics depend
on the JMS servers they are targeted to for the management of persistent messages, durable
subscribers, and message paging. To reconfigure a subdeployments targets, use the parent
system modules subdeployment management page.
For example, if you want to co-locate a group of queues with a connection factory that is
targeted to a specific JMS server, you can associate the queues with the subdeployment that the
connection factory belongs to, provided that the connection factory is not already targeted to
multiple JMS servers (for example, targeted to a server instance hosting multiple JMS servers).
Creating Packaged JMS Modules: You create packaged JMS modules using an enterpriselevel integrated development environment (IDE) or a development tool that supports the editing
of XML descriptor files. You then deploy and manage stand-alone modules using the JSR 88
based tools, such as the weblogic.Deployer utility or the WebLogic Administration
Console.
Deploying a Packaged JMS Module: The deployment of packaged JMS modules follows the
same model as all the other components of an application: individual modules can be deployed
to a single server, a cluster, or individual members of a cluster.
Oracle WebLogic Server 11g: Administration Essentials 15 - 21
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Connection Factories
Message priority
Message time-to-live (TTL)
Message persistence
Transactional behavior
Acknowledgement policy
Flow control
e
s
n
e
ic
el
l
b
a
an
Uses WebLogics default connection settings
r
t
on
Is located on the server JNDI tree at
n
a
weblogic.jms.ConnectionFactory
as ide
h Gu
)
u
ed dent
s
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
d
o
Connection
vFactories
t
s
Ea factories are resources that enable JMS clients to create JMS connections. A
Connection
n
Johconnection factory supports concurrent use, enabling multiple threads to access the object
simultaneously. WebLogic JMS provides preconfigured default connection factories that can be
enabled or disabled on a per-server basis. You can also configure one or more connection
factories to create connections with predefined options that better suit your application.
Some connection factory options are dynamically configurable. You can modify the following
parameters for connection factories:
General configuration parameters, including modifying the default client parameters,
default message delivery parameters, load-balancing parameters, unit-of-order parameters,
and security parameters
Transaction parameters, which enable you to define a value for the transaction timeout
option and to indicate whether an XA queue or XA topic connection factory is returned,
and whether the connection factory creates sessions that are XA aware
Flow control parameters, which enable you to tell a JMS server or a destination to slow
down message producers when it determines that it is becoming overloaded
When connection factory options are modified at run time, only the incoming messages are
affected; stored messages are not affected.
Oracle WebLogic Server 11g: Administration Essentials 15 - 22
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ab
r of the default
You need to configure a new connection factory only if the preconfiguredfe
settings
s
factories are not suitable for your application. The main difference
between
an the preconfigured
r
t
settings for the default connection factories and a user-defined
onconnection factory is the default
n
value for the XA Connection Factory Enabled optionstoaenableeJTA
transactions. Also, using
a
d
i
h
default connection factories means that you have
u over targeting the Oracle WebLogic
) no control
G
u
t
d
Server instances where the connection factory
may
be
deployed.
However, you can enable or
e den
s
disable the default connection factories
WebLogic Server basis.
u
cs on a tper-Oracle
n
h
o
J
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
1
2
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
3
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Creating atv
Connection
Factory
s
a
E each JMS module, the connection factory resource names must be unique. All the
Within
n
h
Jo connection factory JNDI names in any JMS module must be unique across an entire WebLogic
domain.
1. In the Administration Console, expand Services > Messaging, and click JMS Modules.
Select an existing JMS module.
2. In the Summary of Resources table, click New.
3. Select the Connection Factory resource type and click Next.
4. Enter Name and JNDI Name for the new connection factory, and click Next.
5. (Not shown) For basic default targeting, accept the default targets that are presented in the
Targets box, and then click Finish. For advanced targeting, click Advanced Targeting,
which allows you to select an existing subdeployment or to create a new one. When a valid
subdeployment is selected, its targeted JMS servers, servers, or cluster appear as selected
in the Targets box.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Configuring
voa Connection Factory
t
s
EaAdministration Console, navigate to the connection factory resource that you want to
Innthe
Johconfigure. Click the Configuration tab as shown in the slide. You can configure the properties
using the Default Delivery subtab.
Default Priority: The default priority that is used for messages when a priority is not
explicitly defined. Values are between 0 and 9.
Default Time-to-Live: The maximum length of time, in milliseconds, that a message will
exist. This value is used for messages when a priority is not explicitly defined. A value of 0
indicates that the message has an infinite amount of time to live.
Default Time-to-Deliver: The delay time, in milliseconds, between when a message is
produced and when it is made visible on its destination
Default Delivery Mode: Whether or not messages should use a persistent store, if one is
associated with the JMS server
Default Redelivery Delay: The delay time, in milliseconds, before rolled back or
recovered messages are redelivered
Send Timeout: The maximum length of time, in milliseconds, that a sender will wait when
there is not enough space available (no quota) on a destination to accommodate the
message being sent. The default time is 10 milliseconds.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Destination
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Destination
vo
t
s
Eadestination identifies a queue (point-to-point) or topic (Publish/Subscribe) for a JMS
AnJMS
Johserver.
After configuring a JMS server, configure one or more queue or topic destinations for each JMS
server. You configure destinations explicitly or by configuring a destination template that can be
used to define multiple destinations with similar attribute settings.
A JMS destination identifies a queue (point-to-point) or topic (Publish/Subscribe) resource
within a JMS module. Each queue and topic resource is targeted to a specific JMS server. A JMS
servers primary responsibility for its targeted destinations is to maintain information about the
persistent store that is used for any persistent messages that arrive on the destinations and to
maintain the states of the durable subscribers created on the destinations.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Queue Destinations
In JMS point-to-point messaging, note the following:
Clients communicate with a queue destination.
Messages are distributed to consumers in a serial fashion
(first in, first out).
Each message is delivered only to a single consumer.
e
s
n
e
to
ic
Sender
Queue
el
l
b
Receiver
ra
e
f
s
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Receiver
Queue Destinations
vo
t
s
a messaging model enables one application to send a message to another. PTP messaging
EPTP
The
n
Johapplications send and receive messages using named queues. A queue sender (producer) sends a
message to a specific queue. A queue receiver (consumer) receives messages from a specific
queue. Multiple queue senders and queue receivers can be associated with a single queue, but an
individual message can be delivered to only one queue receiver.
If multiple queue receivers are listening for messages on a queue, WebLogic JMS determines
which one will receive the next message on a first come, first serve basis. If no queue receivers
are listening on the queue, messages remain in the queue until a queue receiver attaches to the
queue.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Topic Destinations
In JMS Publish/Subscribe messaging, the following is true:
Clients communicate with a topic destination.
Messages are broadcast to all subscribers.
A message can be saved until at least one subscriber has
consumed it (durable).
e
s
n
e
Publisher
Topic
to
lic
e
l
b
Subscriber
a
r
e
sf
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Subscriber
Topic Destinations
vo
t
s
a
EPublish/Subscribe
The
(pub/sub) messaging model enables an application to send a message to
n
h
Jo multiple applications. Pub/sub messaging applications send and receive messages by subscribing
to a topic. A topic publisher (producer) sends messages to a specific topic. A topic subscriber
(consumer) retrieves messages from a specific topic. Unlike the PTP messaging model, the
pub/sub messaging model allows multiple topic subscribers to receive the same message. JMS
retains the message until all topic subscribers have received it.
The pub/sub messaging model supports durable subscribers. For durable subscriptions,
WebLogic JMS stores a message in a persistent file or database until the message is delivered to
the subscribers or has expired, even if those subscribers are not active at the time the message is
delivered. To support durable subscriptions, a client identifier (client ID) must be defined for the
connection by the JMS client application. Support for durable subscriptions is a feature that is
unique to the pub/sub messaging model, so client IDs are used only with topic connections;
queue connections also contain client IDs, but JMS does not use them.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
3
u nt G
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Creating atv
Destination
(Topic)
s
a
Eyou create a JMS system module, you can configure resources for the module, including
After
n
h
Jo stand-alone queues and topics, distributed queues and topics, connection factories, JMS
templates, destination sort keys, destination quota, foreign servers, and JMS store-and-forward
(SAF) parameters.
For each destination, you can optionally select a subdeployment or create a new subdeployment
for the resource. A subdeployment is a mechanism by which targetable JMS module resources
(such as queues, topics, and connection factories) are grouped and targeted to a server resource
(such as JMS servers, server instances, or a cluster).
1. In the Administration Console, expand Services > Messaging and click JMS Modules.
Select an existing JMS module.
2. On the Configuration page, click New above the Summary of Resources table.
3. Select the type of destination to create: Queue or Topic. Click Next.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
4
6
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
5
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Creating atv
Destination
(Topic) (continued)
s
a
4. EEnter Name and JNDI Name for the destination. Click Next.
n
h
Jo 5. A subdeployment is a mechanism by which JMS resources are grouped and targeted to a
server instance, cluster, or SAF agent. If necessary, you can create a new subdeployment
by clicking the Create a New Subdeployment button. You can also reconfigure
subdeployment targets later by using the parent modules subdeployment management
page. If a subdeployment already exists, pick that name from the pull-down, click Next and
skip to step 7.
6. Specify a subdeployment name.
7. Select an existing Subdeployment from this JMS module (such as the one you just created
or one previously created). Your new JMS destination will be targeted to the JMS servers
indicated by the subdeployment. If the subdeployment already exists, the targets will
already be specified.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
r
The message paging feature enables automatic
of
eclearing
f
s
n
virtual memory especially for nonpersistent
amessages.
r
t
n
ostructure
You can specify an appropriate folder
for writing
n
a e
s
paged-out messages.
ha uid
u) nt G
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Thresholdtand
vo Quota
s
a Flow Control feature, you can direct a JMS server or destination to slow down message
Ethe
With
n
when it determines that it is becoming overloaded. Flow control thresholds are
Johproducers
attributes used for configuring size and number of message thresholds for the JMS server and its
destinations. When the upper or lower threshold is reached, triggered events are launched.
Quotas limit the number of messages or the size of all the messages that can be stored. Messages
sent that would put the intended target over its quota are rejected, and the sender receives an
exception. Quotas enable administrators to control the size of the backlog.
Paging
With the message paging feature, JMS servers automatically attempt to free up virtual memory
during peak message load periods. Message paging is always enabled on JMS servers, and so a
message paging directory is automatically created without having to configure one. You can
specify a directory and paged-out messages are written to files in this directory.
If a JMS server is associated with a file store (either user-defined or the servers default store),
paged persistent messages are generally written to that file store, while nonpersistent messages
are always written to the JMS servers paging directory.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
1=Threshold
disabled or
no quota limit
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Configuring
voThresholds and Quotas
t
s
a have created either servers or destinations, you may configure their thresholds and
Eyou
After
n
Johquotas. This slide shows a sample panel for a queue. A value of 1 means that the threshold is
disabled or there is no quota limit.
Bytes Threshold High: The upper byte threshold beyond which specified JMS events are
triggered
Bytes Threshold Low: The lower byte threshold below which specified JMS events are
triggered
Messages Threshold High: The upper threshold to trigger events based on the number of
messages stored in the destination
Messages Threshold Low: The lower threshold that triggers events based on the number
of messages stored in the destination
Bytes Maximum: The maximum number of bytes that may be stored in this destination
Messages Maximum: The maximum number of messages that may be stored in the
destination
Blocking Send Policy: Determines whether smaller messages are delivered before larger
ones when a destination has exceeded its maximum number of messages
- FIFO prevents the JMS server from delivering smaller messages when larger ones are
already waiting for space.
- Preemptive allows smaller send requests to preempt previous larger ones when there
is sufficient space for smaller messages on the destination.
Oracle WebLogic Server 11g: Administration Essentials 15 - 32
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Durable subscribers
Configuring durable subscribers
Persistent and nonpersistent messages
Persistent backing stores using the Console
Monitoring JMS
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
lic
Specify where the messages are persisted
e
l
b
a
r
Configure persistent connection factories and destinations
e
f
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Durable Subscribers
and Subscriptions
vo
t
s
a
E
Nondurable
subscriptions last for the lifetime of their subscriber object. That is, a client will see
n
h
Jo the messages published on a topic only while its subscriber is active. An inactive subscriber does
not see messages that are published on its topic.
Support for durable subscriptions is a feature that is unique to the Publish/Subscribe messaging
model. Client IDs are used only with topic connections.
An inactive durable subscription is one that exists but does not currently have a message
consumer subscribed to it.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Publisher client
Topic A
(A durable subscription)
JMS server
Associated
with
to
ic
el
l
b
a
Persistent store
database or file
fe
s
n
a
-tr
n
o
a n e
s
a uid
Active client
h
)
u nt G
(A durabledsubscriber)
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Client registers ID
e
s
n
e
How a Durable
vo Subscription Works
t
s
Ea subscriber registers a durable subscription with a unique identity that is retained by
Andurable
JohJMS. Subsequent subscriber objects with the same identity resume the subscription in the state it
was left in by the previous subscriber. If there is no active subscriber for a durable subscription,
JMS retains the subscribers messages until they are received by the subscriber or until they
expire.
Sessions with durable subscribers must always provide the same client identifier. Each client
must specify a name that uniquely identifies (within the client identifier) each durable
subscription that it creates. Only one session at a time can have a TopicSubscriber for a
particular durable subscription.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Configuring
voa Durable Subscription
t
s
EaJMS servers can use the same backing store.
No
two
n
JohFile persistence is much faster than JDBC because JDBC persistence relates to reads from and
writes to a database that could potentially be a bottleneck for your system. Synchronization
occurs one by one. To enhance the speed and efficiency of persisting to a database, you may like
to consider the use of Oracle Coherence.
JMS backing stores can increase the amount of memory required during the initialization of an
Oracle WebLogic Server as the number of stored messages increases. If initialization fails due to
insufficient memory, when you are rebooting an Oracle WebLogic Server, increase the heap size
of the Java Virtual Machine (JVM) proportional to the number of messages that are stored in the
JMS backing store. Try to reboot again.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Persistent Messaging
e
In-progress messages can be delivered despite server
s
n
restart.
ice
l
e
bl
Topic subscribers can consume missed messages
despite
a
r
e
reconnecting to the server.
nsf
tra
n
no
JMS server
a
Store
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
to
PersistenttMessaging
vo
s
Ea message is guaranteed to be delivered only once. It is not considered sent until it has
Anpersistent
Johbeen safely written to a WebLogic persistent store that is assigned to each JMS server during
configuration.
Nonpersistent messages are not stored. If a connection is closed or recovered, all nonpersistent
messages that have not yet been acknowledged will be redelivered. After a nonpersistent
message is acknowledged, it will not be redelivered.
WebLogic persistent stores provide built-in, high-performance storage solutions for the Oracle
WebLogic Server subsystems and services that require persistence. For example, they can store
persistent JMS messages or temporarily store messages that are sent using the JMS store-andforward feature. The persistent store supports persistence to a file-based store or to a JDBCenabled database. Each server instance, including the administration server, has a default
persistent store that requires no configuration. The default store is a file-based store that
maintains its data in a group of files in the data\store\default directory of a server
instance.
Configure persistent messaging if:
Development requires durable subscriptions (use durable subscribers in the application)
You require that in-progress messages persist across server restarts
Oracle WebLogic Server 11g: Administration Essentials 15 - 37
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
3
1
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
2
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Store
Creating atv
JMS
s
Eais a default store for every WebLogic Server instance. The default store can be
There
n
Johconfigured, but cannot point to a database. You may need to create a custom store to point to a
database. Similarly, you may want to create a custom file store on your choice of storage device
that can enable you to migrate the store to another server member in a cluster. When configuring
a file store directory, the directory must be accessible to the server instance on which the file
store is located.
1. In the left pane of the console, expand Services and select Persistent Stores.
2. On the Summary of Persistent Stores page, select the store type from the New list.
3. If File Store is selected, update the following on the Create a new File Store page:
- Name: Name of the store
- Target: Server instance on which to deploy the store
- Directory: Path name to the directory on the file system where the file store is
placed. This directory must exist on your system, so be sure to create it before
completing this tab.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
lic
The required infrastructure (tables and so on) is created
e
l
b
automatically using Data Definition Language (DDL).
era
sf
n
a
-tr
n
o
JMS server
a n e Database
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
2
3
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Must be nonXA
o JDBC Store
Creating atv
JMS
s
Ea Store using JDBC Store is associated with a Data Source. If a Data Source exists,
AnPersistent
Johyou can pick it from the pull-down. If none exist (or if the existing a Data Sources are XA
because XA cannot be used as a JDBC Store), you must Create a New Data Source by clicking
the button.
Prefix Name: The prefix for table names, if:
The database management system requires fully qualified names, such as schema
You must differentiate between the JMS tables for two Oracle WebLogic Servers to store
multiple tables on one DBMS
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr 2
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Assigningta
voStore to a JMS Server
s
Ea your new custom persistent store with a JMS server by using the Persistent Store field
Associate
n
Johof the Configuration > General tab. If this field is set to (none), the JMS server uses the default
file store that is automatically configured on each targeted server instance.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
PersistenttConnection
Factory
vo
s
a
E Delivery Mode: Used for messages for which a delivery mode is not explicitly defined.
Default
n
h
Jo It can be persistent or nonpersistent.
The preferred method, according to the JMS specification, is to configure the connection factory
with the client ID. For Oracle WebLogic Server JMS, this means adding a separate connection
factory definition during configuration for each client ID. Applications look up their own topic
connection factories in JNDI and use them to create connections containing their own client IDs.
Alternatively, an application can set its client ID programmatically.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
1 =
Destination
will not
override the
message
producer.
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Configuring
voDestination Overrides
t
s
a mode assigned to all messages that arrive at the destination can be set to override
Edelivery
The
n
Johthe delivery mode specified by the message producer. A value of No-Delivery specifies that the
producers delivery mode will not be overridden.
This attribute is dynamically configurable, but only incoming messages are impacted; stored
messages are not impacted.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Servers
MonitoringtvJMS
s
a monitor the run-time statistics for an active JMS server. From the Monitoring tab, you
Ecan
You
n
Johcan also access run-time information for a JMS servers destinations, transactions, connections,
and server session pools.
1. Expand Services > Messaging and click JMS Servers. Select a JMS server.
2. Click the Monitoring tab. By default, a Monitoring subtab is displayed, which provides
general statistics for all destinations on every JMS server in the domain. These statistics
include the number and size of messages processed by the JMS server.
The Active Destinations tab displays the statistics for each active JMS destination for the
domain.
The Active Transactions tab displays all active JMS transactions for the domain. For
troubleshooting, you can force commits or rollbacks on selected transactions. Simply select a
transaction, and then click either the Force Commit or the Force Rollback button.
The Active Connections tab displays all active client JMS connections for the domain. For
troubleshooting, you can destroy selected connections. Simply select a connection, and then
click the Destroy button above the table.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
Pause or resume message
)
production and consumption.
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
o Managing Destinations (Active Queues and Topics)
Monitoringtvand
s
a use this page to monitor information about a JMS consumer, which receives messages
Ecan
You
n
Johfrom a JMS queue (QueueReceiver) or topic (TopicSubscriber).
For troubleshooting, you can temporarily pause all run-time message production, insertion (inflight messages), and consumption operations on any or all destinations targeted to the selected
JMS server. These message pausing options enable you to assert administrative control over
the JMS subsystem behavior in the event of an external resource failure.
The available columns include:
Messages Current: The current number of messages in the destination. This does not
include the pending messages.
Messages Pending: The number of pending messages in the destination. A pending
message is one that has either been sent in a transaction and not been committed or that has
been received and not been committed or acknowledged.
Messages High: The peak number of messages in the destination since the last reset
Messages Received: The number of messages received in this destination since the last
reset
Messages Threshold: The amount of time in the threshold condition since the last reset
Consumers Current: The current number of consumers accessing this destination
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Monitoring Queues
ra
e
f
s
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
MonitoringtvQueues
s
Ethisa page to view run-time statistics about the current queue resource. Run-time statistics
Use
n
Johinclude counts, pending, and threshold data for consumers, bytes, and messages for the queue.
To access the queues message management page, select the check box next to its name, and
then click the Show Messages button.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Managing tMessages
in a Queue
vo
s
a
Ecan enable viewing of messages in the Administration Console using these steps:
You
n
h
Jo 1. In the Administration Console, navigate to the queue resource that you want to configure:
- Navigate to JMS Resources in System Modules, and then to JMS resources in an
application module
2. Click the Monitoring tab.
3. Select the check box next to the queue, and then click Show Messages to access the
queues JMS Messages table.
4. You can then perform the following administrative procedures on a specific message or
selected messages:
- Click a message in the queue to open the View Contents page, where you can view
the contents of a JMS message.
- Click New to create a new JMS message. You can specify header and body content
when creating the message, which will then be produced on the current queue.
- Select messages for deletion and click Delete to delete them from the current queue.
- Click Move to transfer selected JMS messages from the current queue to another
destination, including a destination on a different JMS server.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which are the correct messaging model and JMS destination
type associations?
a. Queue: Publish/Subscribe
b. Queue: Point-to-point
c. Topic: Publish/Subscribe
d. Topic: Point-to-point
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: b,tvco
as that a JMS queue is for simple point-to-point messaging, whereas a topic is for
E
Remember
n
h
o
Publish/Subscribe
messaging in which messages are broadcast to all listening consumers.
J
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which are the available resource types within an Oracle
WebLogic Server JMS module?
a. Connection factory
b. Queue
c. Topic
d. Server
e. Store
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: a,tv
b,oc
s
Ea that JMS destinations (queues and topics) and connection factories are commonly
Remember
n
Johdeployed as part of a JMS module.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Practice 15 Overview:
Configuring JMS Resources
This practice covers the following topics:
Configuring JMS resources such as:
JMS server, JMS module, queue, and topic
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Practice 15
Configuring JMS Resources
vOverview:
t
s
a
See
Appendix A for the complete steps to do the practice.
nE
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
Introduction to Clustering
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
After completing this lesson, you should be able to do describe:
The benefits of Oracle WebLogic cluster
Basic cluster architecture
Multitier cluster architecture
Communication among clustered server instances
The key criteria for selecting suitable cluster architecture
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Objectivestvo
as
E
Scenario
n
h
o
J Clustering provides availability and scalability benefits to servers. As the administrator at
MedRec, you want to understand the benefits of clustering and the architectural considerations
to help you decide on the appropriate structure for your environment.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
What is a cluster?
Benefits of clustering
HTTP clustering and proxy plug-in
Introduce EJB clustering
Cluster architecture
Cluster communication
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
What Is a Cluster?
A cluster:
Is a logical group of managed servers within a domain
domain
Supports features to
provide high
machine
machine
availability for:
Whole servers
Web applications and
services
EJB applications
JDBC resources
JMS
server
cluster
server
e
s
n
e
to
ic
el
l
b
a
erserver
f
s
an
-tr
n
o
server
n
a
s
e
Is transparent to clients
a
d
i
h
u
u) nt G
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
What Is a Cluster?
vo
t
s
Ea WebLogic Server cluster consists of one or more Oracle WebLogic Server instances
An
Oracle
n
Johrunning simultaneously and working together to provide increased scalability and reliability. A
cluster appears to clients as one Oracle WebLogic Server instance. The server instances that
constitute a cluster can run on one machine or on different machines.
By replicating the services provided by one instance, an enterprise system achieves a fail-safe
and scalable environment. It is good practice to set all the servers in a cluster to provide the
same services.
You can increase a clusters capacity by adding server instances to the cluster on an existing
machine, or by adding machines to the cluster to host the incremental server instances.
The clustering support for different types of applications is as follows:
For Web applications, the cluster architecture enables replicating the HTTP session state of
clients. You can balance the Web application load across a cluster by using an Oracle
WebLogic Server proxy plug-in or an external load-balancer.
For Enterprise JavaBeans (EJBs) and Remote Method Invocation (RMI) objects, clustering
uses the objects replica-aware stub. When a client makes a call through a replica-aware
stub to a service that fails, the stub detects the failure and retries the call on another replica.
For JMS applications, clustering supports clusterwide transparent access to destinations
from any member of the cluster.
Oracle WebLogic Server 11g: Administration Essentials 16 - 4
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Benefits of Clustering
Concept
Description
Scalability
Load balancing
Application
failover
e
s
n
e
to
fe
Availability
s
After a system failure on one server, a
it n
automatically
r
t
continues ongoing work on another
n- server.
o
n
a
After a system failure ons one server,
it continues
e
a
d
i
h
Migration
ongoing work by moving
ucomponent to another
) t the
G
u
d
server.
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
old
Benefits oftvClustering
as WebLogic Server cluster provides the following benefits:
E
An
Oracle
n
h
o
J Scalability: The capacity of a cluster is not limited to one server or one machine. Servers
can be added to the cluster dynamically to increase capacity. If more hardware is needed, a
new server on a new machine can be added.
Load Balancing: The distribution of jobs and associated communications across the
computing and networking resources in your environment can be even or weighted,
depending on your environment. Even distributions include round-robin and random
algorithms.
Application Failover: Distribution of applications and their objects on multiple servers
enables easier failover of the session-enabled applications.
Availability: A cluster uses the redundancy of multiple servers to insulate clients from
failures. The same service can be provided on multiple servers in a cluster. If one server
fails, another can take over. The capability to execute failover from a failed server to a
functioning server increases the availability of the application to clients.
Migration: This ensures uninterrupted availability of pinned services or components
those that must run only on a single server instance at any given time, such as the Java
Transaction API (JTA) transaction recovery system, when the hosting server instance fails.
Understanding the technical infrastructure that enables clustering helps programmers and
administrators to maximize the scalability and availability of their applications.
Oracle WebLogic Server 11g: Administration Essentials 16 - 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Proxy Servers
vo for HTTP Clusters
t
s
Eaare how clients interact with the cluster, whether they are hardware or software based.
Proxies
n
JohYou have three basic choices of proxy depending on your cluster architecture:
HTTPClusterServlet, a Web server plug-in, or a physical load balancer (such as Local
Director or F5 Networks Big IP). These proxy choices are generally available regardless of the
architecture type, but some architectures might dictate the type of proxy that will be needed.
You can configure Oracle WebLogic Server clusters to operate alongside existing Web servers.
In such an architecture, a bank of Web servers provides static HTTP content for the Web
application, using a WebLogic proxy plug-in or HttpClusterServlet to direct servlet and
JSP requests to a cluster.
There are two alternative proxy architectures: two-tier and multitier.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Server
EJB
el
l
b
a
Up
fe
s
n
a
-tr
n
o
n
aServer
s
e
a
d
i
h
u
u) nt G EJB
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Stub
to
ic
EJB
Client
e
s
n
e
Down
High Availability
vo for EJBs
t
s
Ea for clustered EJBs is accomplished using the objects replica-aware stub. When a client
Failover
n
Johmakes a call through a replica-aware stub to a service that fails, the stub detects the failure and
retries the call on another replica.
With clustered objects, automatic failover generally occurs only in cases where the object is
idempotent. An object is idempotent if any method can be called multiple times with no
different effect than calling the method once.
Method-level failover for a stateful service requires state replication. Oracle WebLogic Server
satisfies this requirement by replicating the state of the primary bean instance to a secondary
server instance, using a replication scheme similar to that used for HTTP session state.
Oracle WebLogic Server uses the round-robin algorithm as the default load-balancing strategy
for clustered object stubs when no algorithm is specified. Weight-based load balancing improves
on the round-robin algorithm by taking into account a preassigned weight for each server. Oracle
WebLogic Server provides server affinity that can be used to turn off load balancing for external
client connections. If an object is configured for server affinity, the client-side stub attempts to
choose a server instance to which it is already connected and continues to use the same server
instance for method calls.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
ic
el
l
b
a
Cluster communication
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Performance
Efficient state persistence
Optimal load balancing
Effective failover
Reliable communication
to
lic
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
e
s
n
e
o
Selecting a
Architecture
vCluster
t
s
a
E architecture is considered subjective and good architecture is usually a point of debate,
Although
n
h
Jo there are some general considerations that should be addressed when selecting a cluster
architecture:
Performance
Efficient state persistence (through replication or other means)
Optimal load balancing
Effective failover
Reliable communication
These factors ultimately decide the success or failure of your clustered services.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Cluster Architecture
to
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Cluster Architecture
vo
t
s
Ea are usually broken into three functional tiers: Web tier, presentation tier, and object
Applications
n
Johtier. In programming circles, these are also known as the model, view, and control. You tend to
abstract them a little more when talking about clustering, but they are effectively the same.
The Web tier provides the static, idempotent presentation of a Web application and is generally
the first piece that clients come in contact with. Often, the Web tier is handled by a Web server,
such as Oracle HTTP Server, Apache, Internet Information Server (IIS), or Netscape Enterprise
Server (NES).
The presentation tier provides the dynamic content, such as servlets, JSP, and so forth. This tier
also acts as a consumer to the business logic represented in the business tier. The presentation
tier typically contains implemented design patterns or run-time frameworks that allow the client
to interact with the business tier and generate a dynamic view of that tier per request or session.
The presentation tier is handled by WebLogic and is accessed via direct or indirect client
requests to the presentation tier elements.
The business tier provides access to business logic, middleware, and integrated systems.
Typically, these are handled by various types of EJBs or server services, such as JMS and JDBC.
WebLogic also handles this tier, but there are other applications, services, and servers that
participate at this level.
Oracle WebLogic Server 11g: Administration Essentials 16 - 11
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
EJB
container
e
s
n
e
ic
server 2
Web
container
EJB
container
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
Firewall
)
Cluster
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Basic Cluster
voArchitecture
t
s
a recommended cluster architecture combines all Web application tiers and puts the
Ebasic
The
n
Johrelated services (static HTTP, presentation logic, and objects) into one cluster.
The basic architecture has the following advantages:
Easy administration: Because one cluster hosts static HTTP pages, servlets, and EJBs,
you can configure the entire Web application and deploy or undeploy objects using one
Administration Console. You do not need to maintain a separate bank of Web servers (and
configure Oracle WebLogic Server proxy plug-ins) to benefit from clustered servlets.
Flexible load balancing: Using load-balancing hardware directly, in front of the Oracle
WebLogic Server cluster, enables you to use advanced load-balancing policies for access
to both HTML and servlet content.
Robust security: Putting a firewall in front of your load-balancing hardware enables you
to set up a demilitarized zone (DMZ) for your Web application using minimal firewall
policies.
Optimal performance: The combined-tier architecture offers the best performance for
applications in which most or all the servlets or JSPs in the presentation tier typically
access objects in the object tier, such as EJBs or JDBC objects.
A DMZ is a logical collection of hardware and services that is made available to outside,
untrusted sources.
Oracle WebLogic Server 11g: Administration Essentials 16 - 12
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Advantages:
Easy administration
Flexible load balancing
Robust security
Disadvantages:
It cannot load-balance EJB method calls.
Load-balancing across the tiers may become unbalanced.
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Basic Cluster
voArchitecture: Advantages and Disadvantages
t
s
a
Ebalancing
Load
and failover can be introduced only at the interfaces between Web application
n
h
Jo tiers. So, when tiers are deployed to a single cluster, you can load-balance only between clients
and the cluster. Because most load balancing and failover occur between clients and the cluster
itself, a combined-tier architecture meets the needs of most Web applications.
However, such basic clusters provide no opportunity for load-balancing method calls to
clustered EJBs. Because clustered objects are deployed on all Oracle WebLogic Server instances
in the cluster, each object instance is available locally. Oracle WebLogic Server optimizes
method calls to clustered EJBs by always selecting the local object instance, rather than
distributing requests to remote objects.
If the processing load on individual servers becomes unbalanced, it may eventually become
more efficient to submit method calls to remote objects rather than process methods locally.
To use load balancing for method calls to clustered EJBs, you must split the presentation and
object tiers of the Web application onto separate physical clusters, thereby ensuring that all the
object calls are remote calls and the load is balanced.
Consider the frequency of invocations of the object tier by the presentation tier when you decide
between a combined-tier and a multitier architecture. If presentation objects usually invoke the
object tier, a combined-tier architecture may offer better performance than a multitier
architecture.
Oracle WebLogic Server 11g: Administration Essentials 16 - 13
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
server 3
EJB
container
e
s
n
e
ic
server 2
Web
container
server 4
EJB
container
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
id B
ha GuCluster
Firewall
Clusteru
A)
ed dent
s
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
old Architecture
Multitier Cluster
v
t
s
Eaarchitecture illustrated in the slide, two separate Oracle WebLogic Server clusters are
Innthe
Johconfigured:
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Advantages:
Disadvantages:
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Multitier: Advantages
and Disadvantages
vo
t
s
a
Emultitier architecture provides the following advantages:
The
n
h
Jo Load-balancing EJB methods: By hosting servlets and EJBs on separate clusters, the
servlet-method calls to the EJBs can be load-balanced across multiple servers.
Improved server load balancing: Separating the presentation and object tiers onto
separate clusters provides you with more options for distributing the load of the Web
application. For example, if the application accesses HTTP and servlet content more often
than EJB content, you can use a large number of Oracle WebLogic Server instances in the
presentation tier cluster to concentrate access to a smaller number of servers that host the
EJBs. For example, if your Web clients make heavy use of servlets and JSPs but access a
relatively small set of clustered objects, the multitier architecture enables you to
concentrate the load of servlets and EJB objects appropriately. You may configure a
servlet cluster of 10 Oracle WebLogic Server instances and an object cluster of three
managed servers, while still fully using each servers processing power.
Higher availability: By using additional Oracle WebLogic Server instances, the multitier
architecture has fewer points of failure than the basic cluster architecture. For example, if
an Oracle WebLogic Server that hosts the EJBs fails, the HTTP- and servlet-hosting
capacity of the Web application is not affected.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
s
n
e
c
e li
b
a
r
e
f
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Web layer
(Proxy)
HTTP
Server
Load
balancer
server 1
Servlet/
JSP
EJB
container
to
ic
Plug-in
HTTP
e
s
n
e
fe
s
n
a
server 2
el
l
b
a
EJB
-tr container
n
o
Plug-in
a n JSP
s
e
a
d
i
h
Firewall
) t Gu
Cluster
u
d
n
e
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Basic Cluster
voProxy Architecture
t
s
a proxy architecture contains two physical layers of hardware and software.
Etwo-tier
The
n
JohWeb Layer
Server
Servlet/
The proxy architecture uses a layer of hardware and software that is dedicated to the task of
providing the applications Web tier. This physical Web layer can consist of one or more
identically configured machines that host one of the following application combinations:
Oracle WebLogic Server with HttpClusterServlet
Apache with the Oracle WebLogic Server Apache proxy plug-in
Netscape Enterprise Server with the Oracle WebLogic Server NSAPI proxy plug-in
Microsoft Internet Information Server with the Oracle WebLogic Server Microsoft-IIS
proxy plug-in
Regardless of which Web server software you select, remember that the physical tier of the Web
servers should provide only static Web pages. Dynamic contentservlets and JSPsare proxied
via the proxy plug-in or HttpClusterServlet to an Oracle WebLogic Server cluster that
hosts servlets and JSPs for the presentation tier.
Servlet/Object Layer
The recommended two-tier proxy architecture hosts the presentation and object tiers on a cluster
of Oracle WebLogic Server instances. This cluster can be deployed either on a single machine or
on multiple separate machines. The Servlet/Object layer differs from the combined-tier cluster in
that it does not provide static HTTP content to application clients.
Oracle WebLogic Server 11g: Administration Essentials 16 - 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Web layer
(Proxy)
HTTP
Server
Load
balancer
server 1
Web
container
e
s
n
e
ic
Plug-in
HTTP
server 3
EJB
container
server 2
el
l
b
a
r 4
eserver
f
s
an
EJB
-tr
n
container
o
Plug-in
a n e
s
a uid
h
Firewall
)
Cluster B
du ent GCluster A
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Multitier Cluster
vo Proxy Architecture
t
s
a also use a bank of Web servers as the front end to a pair of Oracle WebLogic Server
Ecan
You
n
Johclusters that host the presentation and object tiers.
Server
Web
container
Using stand-alone Web servers and proxy plug-ins provides the following advantages:
You can use existing hardware.
If you already have a Web application architecture that provides static HTTP content to
clients, you can easily integrate the existing Web servers with one or more Oracle
WebLogic Server clusters to provide dynamic HTTP and clustered objects.
You can use familiar firewall policies.
Using a Web server proxy at the front end of your Web application enables you to use familiar
firewall policies to define your DMZ. In general, you can continue placing the Web servers in
your DMZ while disallowing direct connections to the remaining Oracle WebLogic Server
clusters in the architecture. The diagram in the slide depicts this DMZ policy.
However, there are some disadvantages:
Additional administration
Limited load balancing options
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
Additional administration
lic
e
l
bWeb
Explicit configuration of sticky sessions for stateful
a
r
e
f
applications
ans
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Proxy Plug-Ins
Proxy plug-ins:
Delegate dynamic content requests to WLS servers and
balance load across a cluster in a round-robin fashion
Route HTTP requests to back-end WLS instances based on
session cookie or URL rewriting
Avoid routing to failed servers in the cluster
sf
n
a
tr
-Server 1
OHS
n
o
n
a
s
e
mod_wl_ohs
a
d
i
h
u
Server 2
u) nt G
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
C
l
u
s
t
e
r
Proxy Plug-Ins
vo
t
s
Ea plug-in may be essential in an environment where Oracle HTTP Server (OHS) or other
Anproxy
JohWeb servers serve static pages, and an Oracle WebLogic Server (possibly on a different host) is
delegated to serve dynamic pages (such as JSPs or pages generated by HTTP servlets). To the
end user (the browser), the HTTP responses still appear to come from the same sourcethe
Web server running the plug-in. Oracle WebLogic Server on the back end is invisible. The
HTTP-tunneling facility of the WebLogic client/server protocol can operate through the plug-in,
providing access to all Oracle WebLogic Server services (not just dynamic pages).
Oracle WebLogic Server plug-ins provide efficient performance by reusing connections from
the plug-in to Oracle WebLogic Server. The plug-in maintains keep-alive connections
between the plug-in and Oracle WebLogic Server.
For documentation on plug-ins, see Oracle Fusion Middleware Using Web Server Plug-Ins with
Oracle WebLogic Server 11g Release 1 (10.3.3).
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
to
OHS as Proxy
vo Web Server
t
s
EaHTTP Server is based on the Apache Web server. It serves both static and dynamic
Oracle
n
Johcontent and supports applications developed in Java, PL/SQL, C, C++, PHP, or PERL. OHS
supports single sign-on, clustered deployment and high availability, and Web Cache. In addition,
plug-ins that are available as separate components enable integration with non-Oracle HTTP
Servers.
A mod_wl_ohs module is available in OHS and enables you to integrate your WebLogic
Server environment with OHS immediately after the configuration of the OHS instance and the
domains.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
WLS HttpClusterServlet
HttpClusterServlet:
domain
machine
server
WLS Proxy
Admin
Server
cluster
server
client
machine
ic
client
Server
el
l
b
a
fe
s
n
a
-tr
n
o
HttpClusterServlet
n
aserver
s
e
a
d
i
h
u
u) nt G
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Internet
client
e
s
n
e
server
WLS HttpClusterServlet
vo
t
s
Ea
HttpClusterServlet
proxies the requests from an Oracle WebLogic Server to other
n
h
Jo Oracle WebLogic Server instances within a cluster. HttpClusterServlet provides load
balancing and failover for the proxied HTTP requests.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
Multicast broadcasts one-to-many communications among
ice
l
e
clustered instances.
bl
a
r
e
fcluster
Unicast is an alternative to multicast to handle
s
n
tra configuration
messaging and communications. The unicast
n
o
is much easier because it doessnot
a nrequire
cross-network
e
a
d
h Gui
configuration that multicast) requires.
u
ed dent
s
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
old
Server Communication
in a Cluster
v
t
s
a
E
Peer-to-peer
communications between server instances in a cluster use IP sockets. IP sockets
n
h
Jo provide a simple, high-performance mechanism for transferring messages and data between two
to
applications.
WebLogic Server uses IP multicast for all one-to-many communications among server instances
in a cluster. This communication includes:
Clusterwide JNDI updates: Each WebLogic Server instance in a cluster uses multicast to
announce the availability of clustered objects that are deployed or removed locally. Each
server instance in the cluster monitors these announcements and updates its local JNDI tree
to reflect current deployments of clustered objects. For more details, see the section titled
Clusterwide JNDI Naming Service later in this lesson.
Cluster heartbeats: Each WebLogic Server instance in a cluster uses multicast to
broadcast regular heartbeat messages that advertise its availability. By monitoring
heartbeat messages, server instances in a cluster determine when a server instance has
failed. (Clustered server instances also monitor IP sockets as a more immediate method of
determining when a server instance has failed.)
IP multicast is a broadcast technology that enables multiple applications to subscribe to an IP
address and port number and listen for messages. A multicast address is an IP address in the
range 224.0.0.0239.255.255.255.
Oracle WebLogic Server 11g: Administration Essentials 16 - 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
One-To-Many Communications
e
s
n
e
to
c
If your cluster spans multiple subnets, your network mustlibe
e
l
b
configured to reliably transmit messages.
a
r
e
sf
A firewall can break IP multicast transmissions.
n
a
-tr with other
n
The multicast address should not be oshared
a n e
applications.
s
a uid
h
)
Multicast storms may occur.
G
u
ed dent
s
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
d
One-To-Many
vo Communications
t
s
EaWebLogic Server uses multicast to broadcast regular heartbeat messages that advertise
Oracle
n
Johthe availability of individual server instances in a cluster. The servers in a cluster listen to
heartbeat messages to determine when a server has failed. (Clustered servers also monitor IP
sockets as a more immediate method of determining when a server has failed.)
All servers use multicast to announce the availability of clustered objects that are deployed or
removed locally. Servers monitor the announcements so that they can update their local JNDI
tree to indicate the current deployments of clustered objects.
Because multicast controls the critical functions related to detecting failures and maintaining the
clusterwide JNDI tree, it is important that neither the cluster architecture nor the network
topology interfere with multicast communications.
If server instances in a cluster do not process incoming messages on a timely basis, increased
network traffic and heartbeat retransmissions can result. The repeated transmission of multicast
packets on a network is referred to as a multicast storm, and can stress the network and attached
stations, potentially causing end-stations to hang or fail. Increasing the size of the multicast
buffers can improve the rate at which announcements are transmitted and received, and prevent
multicast storms.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ce
li
e
l
b
ra
e
f
ns
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Considerations
vo When Using Unicast
t
s
a
Efollowing
The
considerations apply when using unicast to handle cluster communications:
n
h
Jo All members of a cluster must use the same message type. Mixing between multicast and
unicast messaging is not allowed.
You must use multicast if you need to support a previous version of WebLogic Server
within your cluster.
Individual cluster members cannot override the cluster messaging type.
The entire cluster must be shut down and restarted to change the messaging type.
JMS topics configured for multicasting can access WebLogic clusters configured for
unicast because a JMS topic publishes messages on its own multicast address that is
independent of the cluster address. However, the following considerations apply:
- The router hardware configurations that allow unicast clusters may not allow JMS
multicast subscribers to work.
- JMS multicast subscribers need to be in a network hardware configuration that allows
multicast accessibility.
- For more details, see Create and Configure Clusters in Programming WebLogic
JMS.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Peer-To-Peer Communications
Oracle WebLogic Server uses peer-to-peer communications
for:
Accessing nonclustered or pinned objects that reside on a
remote server instance in the cluster
Replicating HTTP session states and stateful session EJB
states between a primary and a secondary server
Accessing the clustered objects that reside on a remote nse
ce
server instance (typically, in a multitier cluster architecture)
e li
b
a
r
e
f
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Peer-To-Peer
voCommunications
t
s
Easocket configuration is crucial to the performance of an Oracle WebLogic Server cluster.
Proper
n
JohTwo factors determine the efficiency of socket communications in Oracle WebLogic Server:
Whether the servers host system uses a native or a pure-Java socket reader
implementation
For systems that use pure-Java socket readers, whether or not the server is configured to
use enough socket reader threads
IP sockets provide a simple, high-performance mechanism for transferring messages and data
between two applications. Clustered Oracle WebLogic Server instances use IP sockets for the
following:
Accessing nonclustered objects that are deployed to another clustered server instance on a
different machine
Replicating HTTP session states and stateful session EJB states between a primary and
secondary server instance
Accessing clustered objects that reside on a remote server instance (This generally occurs
only in a multitier cluster architecture.)
Note: The use of IP sockets in Oracle WebLogic Server actually extends beyond the cluster
scenarioall RMI communication takes place using sockets (for example, when a remote Java
application accesses a remote object).
Oracle WebLogic Server 11g: Administration Essentials 16 - 30
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
abc.myObject
The myObject
object is bound
to the abc
subcontext on
WLS A.
Server B
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr Server C
n
o
n 2
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
Server D
Clusterwide
voJNDI Naming Service
t
s
Eaaccess objects and services by using a JNDI-compliant naming service. Server instances
Clients
n
Johin a cluster use a clusterwide JNDI tree. A clusterwide JNDI tree contains a list of locally
available services and the services offered by clustered objects from other servers in the cluster.
Each WebLogic Server in a cluster builds and maintains its own local copy of the clusterwide
JNDI tree. As a server instance boots or as new services are dynamically deployed to a running
server instance, the server instance first binds the implementations of those services to the local
JNDI tree. The slide shows the following steps of clusterwide JNDI tree formation:
1. Server A has successfully bound an implementation of a clustered object into its local
JNDI tree. Because the object is clustered, it offers this service to all other members of the
cluster.
2. A copy of myObject is sent to all other WebLogic Server instances in the cluster and
bound in their abc subcontext notifying them that this service is available on Server A.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
bl
a
r
fe
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Name Conflicts
vo and Resolution
t
s
Ea JNDI conflicts may occur when new services are advertised over multicast or
Cluster-level
n
Johunicast. For example, if you deploy a pinned RMI object on one server instance in the cluster,
you cannot deploy a replica-aware version of the same object on another server instance.
If two server instances in a cluster attempt to bind objects using the same name, local binding
may succeed. However, the server instances with conflicting names will refuse to bind the server
instances replica-aware stub in to the JNDI tree. A conflict of this type would remain until one
of the two server instances was shut down or until the clustered object is undeployed from all
servers.
To avoid name conflicts, deploy all cluster-level objects to all members of the cluster. Also,
avoid deploying clustered and nonclustered objects in a server.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which is a benefit of multitier cluster architecture?
a. Requires fewer servers compared to the basic architecture
b. Possibility to load-balance method calls to clustered EJBs
c. Easier security implementation
d. None
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: btvo
as architecture, you can balance load on EJBs clustered across multiple servers.
E
With
multitier
n
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
In a multitier cluster architecture where you want to loadbalance EJB objects, you configure them:
a. Within one cluster
b. In different clusters
c. Along with the Web-tier clients in the same server
d. In different domains
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: atvo
as
E
Load
balancing
in Oracle WebLogic Server works within a cluster. You cannot load balance
n
h
Jo across multiple clusters or domains. Because you intend to use multitier cluster, the Web server
and EJB objects need to be separated. So options 2, 3, and 4 are not applicable in this case.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
Configuring a Cluster
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
After completing this lesson, you should be able to:
Prepare your environment for a cluster
Create and configure a cluster
Add servers to a cluster
Start up and shut down clustered servers
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Objectivestvo
as
E
Scenario
n
h
o
J The Medical Records department has decided to implement and evaluate clustering on a test
application to better understand the clustering functionality. Before implementing a cluster, you
need to configure the Oracle HTTP Server as the Web tier front end for your applications. You
create a basic cluster using MedRecSvr2 and MedRecSvr3 managed servers. Later, you deploy
and configure the test application so that HTTP session replication is enabled.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Cluster architecture
Network and security topology
Machines
Names and addresses
Configuring a cluster
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ra
e Web
A single firewall between untrusted clients andsfthe
n
server layer
tra
n
no the cluster
A firewall between the proxy layer
a and
s ide
a
h
Configure the Node Manager.
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
oldEnvironment
Preparing tYour
v
as
E
The
architecture
that you choose affects how you set up your cluster of servers. The cluster
n
h
Jo architecture may also require that you install or configure other resources, such as load
A single firewall between untrusted clients and the Web server layer can be used with both the
basic cluster architecture and the multitier cluster architecture. This creates a demilitarized zone
around the Web servers.
A firewall between the proxy layer and the cluster means that you need to bind the clustered
server instances to publicly listed DNS names. If the internal and external DNS names are not
identical, you need to configure the ExternalDNSName property for each server instance.
The Node Manager is useful for starting a managed server that resides on a different machine
than its administration server. The Node Manager also provides features that help increase the
availability of managed servers in your cluster.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Hardware
e
s
n
e
to
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Hardware tvo
as benefits of a cluster are load balancing and failover. If multiple servers in a cluster are
E
The
main
n
h
o
on
the same computer, these benefits are minimized. If the computer fails, all the servers on it
J
fail and, although you may be load balancing, it is still only the computer that handles the
processing.
Load balancers and proxy servers need to know which servers are in a cluster. So, in general,
you need to configure the IP address of each server in a cluster in the load balancer or proxy
server. If the servers are assigned to a machine with a dynamically assigned IP address, the IP
address can change, and the load balancer or proxy server would not be able to find it. So ensure
that you configure the cluster on machines that have static IP addresses.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
IP Addresses
voand Host Names
t
s
a
Einternal
Ifnthe
and external DNS names of an Oracle WebLogic Server instance are not identical,
h
Jo use the ExternalDNSName attribute for the server instance to define the servers external
DNS name. Outside the firewall, ExternalDNSName should translate to the external IP
address of the server.
If clients access Oracle WebLogic Server over the default channel and T3, do not set the
ExternalDNSName attributeeven if the internal and external DNS names of an Oracle
WebLogic Server instance are not identicalto avoid unnecessary DNS lookups.
Cluster Address
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
bl
a
r
fe
ns
a
r
t
n
o
The dynamic cluster address is created
n in the form of:
a
s ide
listenaddress1:listenport1,listenaddress2:
a
h
) t Gu
u
listenport2,listenaddress3:listenport3
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
old
Cluster Address
v
t
as
E
Each
ListenAddress:ListenPort
combination in the cluster address corresponds to the
n
h
Jo managed server and network channel that received the request. The order in which the
ListenAddress:ListenPort combinations appear in the cluster address is random; the
order varies from request to request.
The cluster address forms a portion of the URL that a client uses to connect to the cluster. The
cluster address is used for generating EJB handles and entity EJB failover addresses. (This
address may be either a DNS host name that maps to multiple IP addresses or a commaseparated list of single address host names or IP addresses.)
If network channels are configured, it is possible to set the cluster address on a per-channel
basis.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Administration Console
Configuration Wizard
WLST
Ant
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Methods of
Clusters
vConfiguring
t
s
a
Ecan use different methods to configure a cluster.
You
n
h
Jo Configuration Wizard: The Configuration Wizard is the recommended tool for creating a
new domain with the cluster.
WebLogic Server Administration Console: If you have an operational domain within
which you want to configure a cluster, you can use the Administration Console.
WebLogic Scripting Tool (WLST): You can use the WLST in a command-line scripting
interface to monitor and manage clusters.
JMX: WebLogic Server provides a set of MBeans that you can use to configure, monitor,
and manage WebLogic Server resources through JMX.
WebLogic Server API: You can write a program to modify the configuration attributes,
based on the configuration API provided with WebLogic Server. This method is not
recommended for initial cluster implementation. For further information, refer to the
documentation: Oracle Fusion Middleware Developing Custom Management Utilities
With JMX for Oracle WebLogic Server 11g Release 1 (10.3.1).
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
1
3
2
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr 6
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
7. Click OK.
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Setting Cluster
vo Attributes
t
s
Ea
Some
of the important cluster attributes are:
n
h
Jo Default Load Algorithm: The algorithm to be used for load balancing between replicated
services if none is specified for a particular service. The round-robin algorithm cycles
through a list of Oracle WebLogic Server instances in order. Weight-based load balancing
improves on the round-robin algorithm by taking into account a preassigned weight for
each server. In random load balancing, requests are routed to servers at random.
Cluster Address: The address that is to be used by clients to connect to this cluster. This
address may be either a DNS host name that maps to multiple IP addresses or a commaseparated list of single address host names or IP addresses.
Number Of Servers In Cluster Address: The number of servers to be listed from this
cluster when generating a cluster address automatically. This setting has no effect if
Cluster Address is explicitly set.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Configuring
voCluster Communication
t
s
Eayou configure multicast mode of communication, you may want to set up the following
When
n
Johparameters using the Advanced configuration:
Multicast Send Delay: The amount of time (between 0 and 100 milliseconds) to delay
sending message fragments over multicast to avoid operating systemlevel buffer overflow
Multicast TTL: The number of network hops (between 1 and 255) that a cluster multicast
message is allowed to travel. 1 restricts the cluster to one subnet.
Multicast Buffer Size: The multicast socket send or receive buffer size (at least 64
kilobytes)
Idle Periods Until Timeout: The maximum number of periods that a cluster member
waits before timing out a member of a cluster
Enable Data Encryption: The option to enable encryption of data exchanges between
servers in a cluster
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Adding Cluster
vo Members: Option 1
t
s
a
1. EIn the Administration Console, expand Environment, and then click Clusters. Select the
n
Joh cluster to which you want to assign the servers. Finally, select Configuration > Servers.
2. Click Add.
3. To add an existing server to the cluster, select the Select an existing server, and add it as a
member of this cluster option, and then select a server from the list.
To create a new server as part of a cluster, select the Create a new server and add it to this
cluster option.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
id
3) ha
u
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Adding Cluster
vo Members: Option 2
t
s
a
1. EIn the left pane of the Console, select Environment > Servers.
n
Joh 2. Select an existing server or create a new one. Confirm that the Configuration > General tab
is displayed.
3. Specify whether or not this server will be a stand-alone server or will belong to a cluster.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
e
s
n
e
lic
Clusters and
voWLST
t
s
a in the slide demonstrates the creation of a new cluster by using the WLST. After
Eexample
The
n
Johyou create a new ClusterMBean, update each ServerMBean and assign the ClusterMBean to it.
These three lines of code:
cmo.createCluster('HRWebCluster')
cd('/Clusters/HRWebCluster')
cluster = getMBean('/Clusters/HRWebCluster')
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Synchronizing
vo When Starting Servers in a Cluster
t
s
Eaan Oracle WebLogic Server instance that participates in a cluster, you use the same
To
start
n
Johprocedure as you would for starting any managed server. You identify the administration server
that the instance should use. All the configuration information for the server is obtained from the
configuration repository that is associated with the administration server.
If clustered server instances do not have open sockets for peer-to-peer communication, failed
servers may also be detected via the Oracle WebLogic Server heartbeat. All the server instances
in a cluster use multicast or unicast to broadcast regular server heartbeat messages to the other
members of the cluster. Each heartbeat message contains data that uniquely identifies the server
that sends the message. Servers broadcast their heartbeat messages at regular intervals of 10
seconds. In turn, each server in a cluster monitors the multicast or unicast address to ensure that
the heartbeat messages of all peer servers are being sent.
If a server that is monitoring the multicast or unicast address misses three heartbeats from a peer
server (that is, if it does not receive a heartbeat from the server for 30 seconds or longer), the
monitoring server marks the peer server as failed. It then updates its local JNDI tree, if
necessary, to retract the services that were hosted on the failed server. Thus, servers can detect
failures even if they have no sockets open for peer-to-peer communication.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
Configuring
voOHS as Proxy Server
t
s
Ea
To
effectively
use the load balancing and failover features of the cluster, you should configure a
n
h
Jo proxy. Because OHS is already enabled with mod_wl_ohs, you can easily configure Oracle
HTTP Server as the proxy server for the cluster. You can edit the httpd.conf file of the OHS
instance and do one of the following:
Set the mod_wl_ohs configuration directives in the httpd.conf file.
Create a configuration file such as the mod_wl_ohs.conf file with necessary
configuration directives and set an appropriate include directive in httpd.conf.
A typical mod_wl_ohs.conf file looks like this:
$ cat mod_wl*conf
LoadModule weblogic_module
"${ORACLE_HOME}/ohs/modules/mod_wl_ohs.so"
<IfModule mod_weblogic.c>
WebLogicCluster w1s1.com:7021,w1s2.com:7021,w1s3.com:7021
ErrorPage http://myerrorpage.mydomain.com
MatchExpression *.jsp
</IfModule>
<Location /medrec>
SetHandler weblogic-handler
</Location>
$
Oracle WebLogic Server 11g: Administration Essentials 17 - 21
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
$> ./opmnctl stopproc process-type=OHS
n
a
s
e
$> ./opmnctl startproc process-type=OHS
a
d
i
h
u
u) nt G
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Starting and
voStopping OHS Manually
t
s
EaHTTP Server is managed by OPMN, which manages the Oracle Application Server
Oracle
n
Johprocesses. You can use opmnctl to start, stop, and restart Oracle HTTP Server.
You can include the path ( <INSTANCE_HOME>/opmn/bin) to the opmnctl location or
change the directory to before using the opmnctl commands. INSTANCE_HOME is the
location where the Web Tier instance containing this OHS instance has been configured. For
example, in the classroom environment, opmnctl is available in
/u01/app/work/instances/bin.
To start the Oracle HTTP Server process in the local instance:
$> ./opmnctl startproc process-type=OHS
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Verifying Access
vo Through OHS
t
s
a verify that you are able to access the applications deployed to a cluster through OHS by
Ecan
You
n
Johdirecting your request to the port on which OHS is listening for requests. You can get the HTTP
Listen port of OHS using the opmnctl status l command. In the slide, OHS is running
(HTTP) on port 7777.
Now, you can try to make a request to this port and see that the application is accessible.
If it works, you will see a cool splash page as shown in the next slide.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Successful
of OHS Splash Page
vAccess
t
s
a
Explore
n E the clickable areas at your leisure.
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which of the following is NOT an available configuration
attribute associated with Oracle WebLogic Cluster?
a. Messaging mode
b. Multicast TTL
c. Multicast port
d. Broadcast server
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: dtvo
as that although clusters support a messaging mode for broadcast communication
E
Remember
n
h
o
(unicast
or multicast), there is no attribute called broadcast server.
J
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Practice 17 Overview:
Configuring Clusters
This practice covers the following topics:
Creating a cluster
Assigning two servers to the cluster
Verifying the port and status of Oracle HTTP Server
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Practice 17
Configuring Clusters
vOverview:
t
s
a
See
Appendix A for the complete steps to do the practice.
nE
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
Managing Clusters
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
After completing this lesson, you should be able to:
Deploy applications to a cluster
Describe the replication of a session state in a cluster
Configure replication groups
Configure in-memory replication
Configure Java Database Connectivity (JDBC) replication
e
s
n
Configure file replication
ice
l
e
bl
Configure a multitier cluster for Enterprise JavaBeans
a
r
e
(EJB) applications
nsf
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
18 - 2
Objectivestvo
as
E
Scenario
n
h
o
J You deploy the application that you are using to evaluate the HTTP session failover feature.
Configure Oracle HTTP Server to load balance between two managed servers in a cluster.
Verify that the session failover happens appropriately.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Deploying applications
Selecting a cluster as the target
Two-phase deployment
Production redeployment
ic
e
s
n
e
el
l
b
a
fe
s
n
a
18 - 3
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
er
f
s
Targeting
ana cluster
r
t
instead
on of a single server
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 4
DeployingtApplications
to a Cluster
vo
s
a
E of the deployment tool that you use, when you initiate the deployment process, you
Regardless
n
h
Jo specify the components to be deployed and the targets to which they will be deployed. The main
difference between the way you deploy an application to a normal server and a cluster lies in
your choice of the target. When you intend to deploy an application to the cluster, you select the
target from the list of clusters and not from the list of servers.
Ideally, all servers in a cluster should be running and available during the deployment process.
Deploying applications when some members of the cluster are unavailable is not recommended.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Two-Phase Deployment
le
b
a
r
sf
n
a
tr
n
o
a n e
2
s
1
a
d
i
h
) t Gu Enable client access.
Distribute application. du
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
18 - 5
to
o
Two-Phase
vDeployment
t
s
Eadeploying applications to a cluster, they may be packaged into a .war, .ear, or .jar
When
n
Johfile, or an exploded directory. WebLogic clusters use the concept of two-phase deployment.
Phase 1: During the first phase of deployment, application components are distributed to
the target server instances and the planned deployment is validated to ensure that the
application components are successfully deployed. During this phase, user requests to the
application being deployed are not allowed. If failures are encountered during the
distribution and validation processes, the deployment is aborted on all server instances,
including those on which the validation succeeded. Files that have been staged are not
removed; however, container-side changes performed during the preparation are reverted.
Phase 2: After the application components are distributed to targets and validated, they are
fully deployed on the target server instances, and the deployed application is made
available to the clients. If a failure occurs during this process, deployment to that server
instance is canceled. However, a failure on one server of a cluster does not prevent
successful deployment on other clustered servers.
If a cluster member fails to deploy an application, the failed application will not start in order to
ensure cluster consistency. Also if the managed server is restarted with a failed application, the
managed server may get started in ADMIN mode. The two-phase commit feature enables you to
avoid situations in which an application is successfully deployed on one node and not on the
other.
Oracle WebLogic Server 11g: Administration Essentials 18 - 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 6
to
Considerations
vo for Deploying to Cluster
t
s
Eayou deploy an application to a cluster, you should run all the servers in the cluster. If a
When
n
Johserver is unavailable when the application is deployed, WebLogic switches to a relaxed
deployment model. In this model, deployments continue to all other nodes. Deployment
completes on the partitioned server after it becomes reachable. When the unavailable server
becomes available, it may experience a performance hit as the deployment restarts on that
server.
It is possible that even though a server is running, it cannot be reached by the administration
server of the domain. Such an unreachable server is called a partitioned server. Oracle
WebLogic Server allows deployment to such a partitioned server. This is also referred to as
partial deployment. One potential problem with partial deployment is that during the
synchronization with other members of the clusterwhen other servers in the cluster reestablish
communications with the previously partitioned server instancethe user requests to the
deployed applications and the attempts to create secondary sessions on that server instance may
fail causing inconsistencies in cached objects.
You can configure Oracle WebLogic Server to disallow relaxed or partial deployments by using
the enforceClusterConstraints tag with weblogic.Deployer.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
Application (Version 1)
ic
el
l
b
a
Application (Version 2)
Deployed
Server A
fe
s
n
a
-tr
n
o
a n e
Version 2
s
aCluster uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
18 - 7
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
o
Production
in a Cluster
vRedeployment
t
s
a
E redeployment enables you to update and redeploy an application in a production
Production
n
h
Jo environment without stopping the application or otherwise interrupting the applications
Application (Version 1)
to
Application (Version 2)
Server B
availability to clients. You are saved the tasks of scheduling application down time, setting up
redundant servers to host new application versions, manually managing client access to multiple
application versions, and manually retiring older versions of an application.
The slide shows a cluster that contains Server A and Server B. Both servers initially run version
1 of the application. When version 2 of the application is deployed to the cluster, it is deployed
to both servers in the cluster. However, because different clients are using the application on
different servers, version 1 may be retired at different points. If the clients have completed using
the application on Server A, any new requests are to version 2 of the application. On Server B,
the client may still be interacting with version 1.
In a WebLogic Server cluster, each clustered server instance retires its local deployment of the
retiring application version when the current workload is completed. This means that an
application version may be retired on some clustered server instances before it is retired on other
servers in the cluster. However, in a cluster failover scenario, client requests that are failed over
are always handled by the same application version on the secondary server, if the application
version is still available. If the same application version is not available on the secondary server,
the failover does not succeed.
Oracle WebLogic Server 11g: Administration Essentials 18 - 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
JDBC-based
File-based
Best practices
EJB clustering
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 8
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
Replication is configured for each Web
within
n application
a
s ide
its weblogic.xml file.
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
18 - 9
Copyright
t
t
s
e
ea us
j
(
oldFailover
HTTP Session
v
t
as
E
Web
application
components, such as servlets and JavaServer Pages (JSPs), maintain data on
n
h
Jo behalf of clients using an HttpSession instance that is available on a per-client basis. To
provide high availability of Web applications, shared access to one HttpSession object must
be provided. HttpSession objects can be replicated within Oracle WebLogic Server by
storing their data using in-memory replication, file system persistence, or in a database.
In a cluster, the load-balancing hardware or the proxy plug-in in Web Server redirects the client
requests to any available server in the Oracle WebLogic Server cluster. The cluster member that
serves the request obtains a replica of the clients HTTP session state from the available
secondary server in the cluster.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Session persistence is configured using the <sessiondescriptor> element in the weblogic.xml deployment
descriptor file.
Each persistence method has its own set of configurable
parameters.
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 10
to
HTTP Session
vo State Replication
t
s
a
Ebalancing
Load
for servlet and JSP HTTP session states can be accomplished using separate
n
h
Jo load-balancing hardware or by using the built-in load-balancing capabilities of a WebLogic
proxy plug-in.
For clusters that use a bank of Web servers and WebLogic proxy plug-ins, the proxy plug-ins
provide only a round-robin algorithm for distributing requests to the servlets and JSPs in a
cluster.
Clusters that use a hardware load-balancing solution can use any load-balancing algorithm that
the hardware supports, including advanced load-based balancing strategies that monitor the
utilization of individual machines.
Note: This release of Oracle WebLogic Server provides Asynchronous HTTP Session
Replication (AsyncRep) to improve cluster performance.
AsyncRep gives you the option to choose asynchronous session replication to the secondary
server. It also provides the ability to throttle the maximum size of the queue that batches up
session objects before the batched replication takes place.
AsyncRep is used to specify the asynchronous replication of data between a primary server and a
secondary server. In addition, this option enables the asynchronous replication of data between a
primary server and a remote secondary server located in a different cluster according to the
cluster topology of MAN.
Oracle WebLogic Server 11g: Administration Essentials 18 - 10
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Server
fe
s
n
a
Server
el
l
b
a
-tr
n
o
a n e
s
a uid
Secondary
Primary
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 11
to
ic
Cluster
Server
e
s
n
e
HTTP Session
vo In-Memory Replication
t
s
Eain-memory replication, Oracle WebLogic Server copies a session state from one server
Using
n
Johinstance to another. The primary server creates a primary session state on the server to which the
client first connects and a secondary replica on another Oracle WebLogic Server instance in the
cluster. The replica is kept up-to-date so that it can be used if the server that hosts the Web
application fails.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 12
o
In-Memorytv
Replication
and Proxy Servers
s
a
E in-memory replication for HTTP session states, you must access the Oracle WebLogic
To
use
n
h
Jo Server cluster using either a collection of Web servers with identically configured WebLogic
proxy plug-ins or a load-balancing hardware.
The WebLogic proxy plug-in maintains a list of Oracle WebLogic Server instances that host a
clustered servlet or JSP, and forwards HTTP requests to these instances using a round-robin
strategy.
Oracle WebLogic Server uses client-side cookies to keep track of the primary and secondary
servers that host the clients servlet session state. If client browsers have disabled the cookie
usage, Oracle WebLogic Server can also keep track of the primary and secondary servers using
URL rewriting. With URL rewriting, both locations of the client session state are embedded into
the URLs that are passed between the client and the proxy server. To support this feature, you
must ensure that URL rewriting is enabled on the Oracle WebLogic Server cluster.
To support direct client access via the load-balancing hardware, the Oracle WebLogic Server
replication system allows clients to use secondary session states regardless of the server to which
the client fails over. Oracle WebLogic Server uses client-side cookies or URL rewriting to
record the primary and secondary server locations. However, this information is used only as a
history of the servlet session state location. When accessing a cluster via the load-balancing
hardware, clients do not use the cookie information to actively locate a server after a failure.
Oracle WebLogic Server 11g: Administration Essentials 18 - 12
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
In-Memory Replication
Cluster
Server 1
Primary
Server 2
Secondary
ic
el
l
b
a
Primary
e
s
n
e
fe
s
n
a
r
-tServer
n
3
o
n
a
Primary failure makes the backup
s ide Secondary
a
h
) t Gu
object the primary object.
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
18 - 13
Copyright
t
t
s
e
ea us
j
(
old
In-Memorytv
Replication
as
E
Web
application
components, such as servlets and JSPs, maintain data on behalf of clients using
n
h
Jo an HttpSession instance that is available on a per-client basis.
To provide high availability of Web applications, shared access to one HttpSession object
must be provided. HttpSession objects can be replicated within Oracle WebLogic Server by
storing their data with in-memory replication, file system persistence, or in a database.
With in-memory replication, replicated objects are not accessible on all server instances in the
cluster. Rather, when an object is created, it is called the primary object. On another server
instance, a backup object is created. In the event of a failure of the primary object, the backup
object is promoted as the primary object. If a failover occurs, another backup object is created.
This is optimal because replication of object data must occur only between the primary and
backup objects (rather than the entire cluster).
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Primary = C
6 Secondary
=B
Primary = A
3 Secondary
=B
Client
Client
Proxy
Proxy
1
Server A
Primary
18 - 14
ld
Server C
ServerA
fe
s
n
a
Server B
-tr
n
o
2
a n e
s
a 1 uidSecondary
Secondary
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
to
ic
el
l
b
a
4
Server B
e
s
n
e
Server C
5
Primary
o
In-Memorytv
Replication:
Example
s
a
Egraphic in the slide depicts a client accessing a Web application that is hosted in a cluster.
The
n
h
Jo All client requests are forwarded to the Oracle WebLogic Server cluster via a proxy, such as
HttpClusterServlet or a Web server plug-in.
To provide failover services for the Web application, the primary server replicates the clients
session state to a secondary server in the cluster. This ensures that a replica of the session state
exists even if the primary server fails (for example, due to a network failure).
In the example in the slide, initially Server A is the primary server and Server B is configured as
the secondary server, whereby Server A replicates the session state to Server B.
If the primary server (Server A) fails, the proxy sends the request to another member of the
cluster, say Server C.
Because Server C is not secondary, it gets the session information from Server B that hosts the
replica of the session state.
Now that Server C is serving the request, it becomes the primary and Server B remains
secondary.
In the HTTP response, the proxy updates the clients cookie to reflect the new primary and
secondary servers to account for the possibility of subsequent failovers.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
A collection of Web servers, or a single Web server, with
s
n
WebLogic proxy plug-ins (configured identically)
ice
l
e
bl
Oracle WebLogic Server configured with
a
r
e
HTTPClusterServlet
nsf
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
18 - 15
to
Requirements
vo for In-Memory Replication
t
s
EaRequirements
Proxy
n
JohThe WebLogic proxy plug-ins maintain a list of Oracle WebLogic Server instances that host a
clustered servlet or JSP and forward HTTP requests to these instances by using a simple roundrobin strategy.
The supported Web servers and proxy software include:
Oracle HTTP Server with the mod_wl_ohs module configured
Oracle WebLogic Server with HttpClusterServlet
Netscape Enterprise Server with the Netscape (proxy) plug-in
Apache with the Apache Server (proxy) plug-in
Microsoft Internet Information Server with the Microsoft-IIS (proxy) plug-in
Load Balancer Requirements
If you choose to use load-balancing hardware instead of a proxy plug-in, you must use hardware
that supports secure sockets layer (SSL) persistence and passive cookie persistence. Passive
cookie persistence enables Oracle WebLogic Server to write cookies through the load balancer
to the client. The load balancer, in turn, interprets an identifier in the clients cookie to maintain
the relationship between the client and the primary Oracle WebLogic Server that hosts the HTTP
session state.
Oracle WebLogic Server 11g: Administration Essentials 18 - 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
replicated
replicated-if-clustered
async-replicated
async-replicated-if-clustered
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
...
<session-descriptor>
<persistent-store-type>replicated</persistent-store-type>
</session-descriptor>
...
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 16
Configuring
voIn-Memory Replication
t
s
Eapersistent store method to one of the following options:
Set
the
n
Joh memory: Disables persistent session storage
replicated: Enables replication of session data across the clustered servers, and the
session data is not persistent
replicated_if_clustered: Replicates the in-effect persistent-store-type if the Web
application is deployed on a clustered server; otherwise, the default is memory
async-replicated: Enables asynchronous session replication in an application or a
Web application
async-replicated-if-clustered: Enables asynchronous session replication in
an application or Web application when deployed to a cluster environment. If deployed to
a single server environment, the session persistence/replication defaults to in-memory.
This allows testing on a single server without deployment errors.
file: Uses file-based persistence
async-jdbc: Enables asynchronous JDBC persistence for HTTP sessions in an
application or a Web application
jdbc: Uses a database to store persistent sessions
cookie: Stores all session data in the users browser
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Domain
Cluster
Initial cookie
machine 1
server A
Primary: A
Secondary: B
Load
balancer
Client
After failover
cookie
servlet
primary
state
machine 2
server B
server C
servlet
primary
state
servlet
secondary
state
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Primary: B
Secondary: C
18 - 18
Firewall
e
s
n
e
Failover with
voLoad Balancer
t
s
Eathe client first makes a request, it is sent to server A. Because the application uses either
When
n
Johan HTTP session or a stateful session bean, the client becomes pinned to a server. A cookie is
written to the client machine stating that the primary state is stored on server A and the
secondary on server B. Where the secondary state is stored is chosen based on machines and
replication groups.
When server A fails, requests from the client go to any available server in the cluster. If it did
not host the secondary, it will sync the session from the old secondary and become the new
primary.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Replication Groups
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 19
to
o
Replication
vGroups
t
s
Ea Oracle WebLogic Server attempts to create replicas of certain services on a machine
By
default,
n
Johother than the one that hosts the primary service.
Oracle WebLogic Server enables you to further control where the secondary states are placed by
using replication groups. A replication group is a preferred list of clustered instances to use for
storing session state replicas in-memory. When you configure a server instance that participates
in a cluster, you can assign the server instance membership in a replication group. You can also
assign a preferred secondary replication group to be considered for replicas of the primary HTTP
session states that reside on the server.
When a client attaches to a cluster and creates an instance of a service, that service instance is
automatically replicated in Oracle WebLogic Server (such as an HttpSession or a stateful
session EJB). Oracle WebLogic Server instance that hosts the primary object honors the
preferred secondary replication group if it is configured. Otherwise, a secondary on a remote
machine is chosen for replication before trying to replicate to the local server.
An administrator can configure replication groups to operate such that secondary objects for
replicated services always reside on different hardware. In earlier versions of Oracle WebLogic
Server, the cluster would ensure that a replicated service exists on a different machine. However,
because one computer can host multiple IP addresses and thus multiple machines, a replicated
instance might not be protected from a general hardware failure. The creation of replication
groups solves this issue.
Oracle WebLogic Server 11g: Administration Essentials 18 - 19
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Replication Groups
Replication groups:
Represent a subset of servers within a cluster
Help to determine the placement of secondary sessions (for
example, avoid replicating within the same room)
Are not explicitly defined in the console-like machines and
clusters
e
s
n
e
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
18 - 20
o
Replication
(continued)
vGroups
t
s
a
E Oracle WebLogic Server attempts to create session state replicas on a machine other
By
default,
n
h
Jo than the one that hosts the primary session state. You can further control where secondary states
are placed using replication groups. A replication group is a preferred list of clustered servers to
be used for storing session state replicas.
Using the Oracle WebLogic Server Console, you can define unique names for machines that
host individual server instances. These machine names can be associated with the new Oracle
WebLogic Server instances to identify where the servers reside in your system.
Machine names are used to indicate servers that run on the same machine. For example, you
would assign the same machine name to all server instances that run on the same machine or the
same server hardware.
If you are not running multiple Oracle WebLogic Server instances on a single machine, you
need not specify the Oracle WebLogic Server machine names. Servers without a machine name
are treated as though they reside on separate machines.
When you configure a clustered server instance, you can assign the server to a replication group
and a preferred secondary replication group for hosting replicas of the primary HTTP session
states that are created on the server.
Oracle WebLogic Server 11g: Administration Essentials 18 - 20
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 21
Configuring
voReplication Groups
t
s
a
Ifna E
cluster hosts servlets or stateful session EJBs, you might want to create replication groups of
Johthe Oracle WebLogic Server instances to host the session state replicas. The server from the
preferred Secondary replication group will be chosen if configured. It is the Administrators
responsibility to specify the members of replication group correctly. It is advisable not to choose
a server which is co-located. If replication groups are not configured (or the preferred secondary
group is down), WebLogic Server chooses a secondary which is on any remote machine. If
WebLogic Server still does not have a secondary server, it will pick one from a local machine.
Replication Group: The name of the replication group to which the server belongs. It is
recommended that you group together all servers that have a relationship with one another
(for example, servers that run on the same machine). For greater flexibility, you can define
a different replication group for each server.
Preferred Secondary Group: The name of the replication group to use to host the
replicated HTTP session states for the server. You should select a secondary group in
which all servers run on a different machine than the replication groups servers. For
greater flexibility, you can select a secondary replication group that contains a single
server running on a different machine.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Order of
Preference to
Replicate
Session State
for A: 1, 2, 3
MngSvr
B
MachineX
MngSvr
C
ReplGroupRed
MachineY
MngSvr
E
MngSvr
F
MachineZ
MngSvr
G
Logical
Pyhsical
18 - 22
MngSvr
D
e
s
n
e
to
ic
el
l
b
1
a
fe
s
n
a
-tr MngSvr
n
o
n H
a
s ide
a
h
) t Gu
Cluster
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
2
o
Replication
for Different Geographic Locations
vGroups
t
s
a
Eshows an installation with eight managed servers spread out across four machines, but two
This
n
h
Jo machines, W and X, share one commonality, while Y and Z share another. For example:
machines W and X are on the same rack, whereas Y and Z are on a different rack (or, perhaps
they have different power supplies, or different locations). So, you place all servers from
machines W and X in one replication group (GroupBlue) and all others in the other (GroupRed).
All servers in GroupBlue choose the GroupRed as their secondary, and vice versa. (MngSvrA is
in the GroupBlue but prefers to replicate to any server in the GroupRed.)
When MngSvrA gets a session, it will avoid MngSvrC and MngSvrD even though those servers
are on a different machine. This is because they are on the same rack (or power supply), and if
MngSvrA goes down, MngSvrC may go down as well. Because you want to mitigate that risk,
servers on another rack (or power supply) from MngSvrA (for example, MngSvrE-MngSvrH)
are better choices than MngSvrC or MngSvrD. Thus, replication groups allow you to account for
risk factors beyond machine.
(Technically, the machines are a logical construct, but 99% of the time they align with a
physical boundary.)
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ic
Cluster
Server
fe
s
n
a
Database
el
l
b
a
-tr
n
o
a n e
s
a uid
h
Server
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Proxy
18 - 23
e
s
n
e
Server
HTTP Session
vo Persistence Using JDBC
t
s
a
Epersistent
With
JDBC replication, a database is configured for storing HttpSession objects.
n
h
Jo After the database is configured, each server instance in a cluster uses an identical connection
pool to share access to the database.
Whenever a Web application creates or uses a session object, the WebLogic Web container
stores the session data persistently in the database. When a subsequent client request enters the
cluster, any server in the cluster can handle the request. Each server in the cluster has identical
access to the persistent store where it can look up the information needed to satisfy the clients
request. This technique provides good failover capability because any server in the cluster can
resolve a clients request, but there is a significant performance reduction due to the many
database synchronizations required in a large Web-based system.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
18 - 24
Cluster
Server 1
Servlet1
Servlet2
Connection pools
Server 2
Servlet1
to
ic
Servlet2
Server 3
e
s
n
e
el
l
b
a
tr
Changing session
n
o
Servlet1 n
objects causes (slow)
a e
s
a
id
database
h
Servlet2
u
)
du ent G
synchronization.
e
er
HttpSession
f
s
an objects stored
in database
d
s
u
c
t
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s
jea use
d(
l
o
HTTP Session
stv Persistence Using JDBC (continued)
a
E a servlet creates or uses a session object, the servlet stores the session data
Whenever
n
h
Jo persistently in the database. When a subsequent client request enters the cluster, any server in
the cluster can handle the request. Each server in the cluster has identical access to the persistent
store where it can look up the information needed to satisfy the clients request. This technique
provides for good failover capability because any server in the cluster can resolve a clients
request, but there is significant performance reduction due to the many database
synchronizations required in a large Web-based system.
Session persistence is not used for storing long-term data between sessions. That is, you should
not rely on a session still being active when a client returns to a site at some later date. Instead,
your application should record long-term or important information in a database.
You should not attempt to store long-term or limited-term client data in a session. Instead, your
application should create and set its own cookies on the browser. Examples of this include an
auto-login feature where the cookie lives for a long period or an auto-logout feature where the
cookie expires after a short period of time. Here, you should not attempt to use HTTP sessions;
instead, you should write your own application-specific logic.
Note that even though it is legal (according to the HTTP Servlet specification) to place any Java
object in a session, only those objects that are serializable are stored persistently by Oracle
WebLogic Server.
Oracle WebLogic Server 11g: Administration Essentials 18 - 24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
...
<session-descriptor>
<persistent-store-type>jdbc</persistent-store-type>
<persistent-store-pool>MyDataSource</persistent-store-pool>
</session-descriptor>
...
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 25
Configuring
voJDBC Persistence
t
s
Eaa database table named wl_servlet_sessions for JDBC-based persistence. The
Set
up
n
Johconnection pool that connects to the database needs to have read/write access for this table.
Create indexes on wl_id and wl_context_path if the database does not create them
automatically. Some databases create indexes automatically for primary keys.
Set the persistent-store-type parameter in the session-descriptor element in
the weblogic.xml deployment descriptor file to jdbc.
Set a JDBC connection pool to be used for persistence storage with the persistentstore-pool parameter in the session-descriptor element in the weblogic.xml
deployment descriptor file. Use the name of a connection pool that is defined in the Oracle
WebLogic Server Administration Console.
You can use the jdbc-connection-timeout-secs parameter to configure the maximum
duration that the JDBC session persistence should wait for a JDBC connection from the
connection pool, before failing to load the session data.
To prevent multiple database queries, Oracle WebLogic Server caches recently used sessions.
Recently used sessions are not refreshed from the database for every request. The number of
sessions in cache is governed by the cache-size parameter in the session-descriptor
element of the Oracle WebLogic Serverspecific deployment descriptor, weblogic.xml.
Oracle WebLogic Server 11g: Administration Essentials 18 - 25
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
WL_ID
WL_CONTEXT_PATH
WL_CREATE_TIME
numeric, 20 digits
WL_IS_VALID
char, 1 character
WL_SESSION_VALUES
18 - 26
fe
s
n
a
numeric, 20 digits
vo
t
s
a
to
ic
el
l
b
a
-tr
n
o
WL_IS_NEW
numeric,
a n e20 digits
s
a uid
h
)
WL_MAX_INACTIVE_INTERVAL
G
u nt integer
d
e
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
WL_ACCESS_TIME
e
s
n
e
n
h
o
J
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Cluster
Server
e
s
n
e
File system
Proxy
ic
el
l
b
a
Server
Server
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 28
HTTP Session
vo Persistence Using Files
t
s
a state may also be stored in a file. For file-based persistence:
Esession
The
n
Joh You must create the directory in which to store the file
The file must have the appropriate access privileges
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
...
<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>/mnt/wls_share</persistent-store-dir>
</session-descriptor>
...
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 29
Configuring
voFile Persistence
t
s
Eaweblogic.xml deployment descriptor file, set the persistent-store-type
Innthe
Johparameter in the session-descriptor element to file.
Set the directory where Oracle WebLogic Server stores the sessions using the persistentstore-dir parameter. You must create this directory and make sure that appropriate access
privileges are assigned to the directory.
Ensure that you have enough disk space to store the number of valid sessions multiplied by the
size of each session. You can find the size of a session by looking at the files created in the
location indicated by the persistent-store-dir parameter. Note that the size of each
session can vary as the size of serialized session data changes.
Each server instance has a default persistent file store that requires no configuration. Therefore,
if no directory is specified, a default store is automatically created in the <servername>\data\store\default directory. However, the default store is not shareable
among clustered servers.
Other options for <persistent-store-type>:
memory: When you use memory-based storage, all session information is stored in memory
and is lost when you stop and restart Oracle WebLogic Server. To use memory-based, singleserver, nonreplicated persistent storage, set the PersistentStoreType attribute in the
<session-param> element of the weblogic.xml file to memory.
Oracle WebLogic Server 11g: Administration Essentials 18 - 29
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ce
li
e
l
b
ra
e
f
ns
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 31
o
HTTP State
Best Practices
vManagement
t
s
a
Eis a summary of the points from the previous section:
This
n
h
Jo Create WLS machines if you are replicating the state across servers on different physical
machines.
Use replication groups to define the failover strategy.
Choose the most appropriate replication strategy depending on the application needs and
architecture.
Use the ServerDebugConfig MBean to track session replication problems.
Ensure that objects placed in replicated sessions are serializable.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 32
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
R1
Replica-aware
Stub
Replica
handler
R1
ic
Server 1
el
l
b
a
fe
s
n
a
-tr
n
o
<< EJB >>
a n e R2
s
a uid
h
)
du ent G Server 2
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 33
R2
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
s
e
aunable
id to return a
executing, or finished but was
h
u
)
du ent G
response.
e
s
18 - 34
d
s
u
c
t
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s
jea use
d(
l
o
EJB: Server
stv Failure Situations
a
E a stub is Java code, it will be able to receive exceptions that are generated by the
Because
n
h
Jo skeleton, EJB, or the RMI handler (at the network level). Because system and application
exceptions are expected, they are not considered failure situations. Application and system
exceptions are notifications of abnormalities on the server, but the server is still in a state where
it can be used.
If a network or communication exception occurs, this means that the network TCP/IP socket
communication with the server has failed. Even though this exception can be the result of a
faulty network, it is unlikely. The stub assumes that the server, container, or skeleton has crashed
and is temporarily unavailable. Unfortunately, when this scenario occurs, the stub cannot
determine the status of the method invocation. The failure may have occurred before, during, or
after the method invocation.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Round-robin
Weight-based
Random
Parameter-based routing (programmatic)
e
Server affinity configuration enables calls to objects to
s
n
remain with the same server and minimizes client-side lice
le
b
load balancing.
a
er
to
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 35
Load-Balancing
vo Clustered EJB Objects
t
s
a
Efollowing
The
algorithms are supported for clustered EJB objects:
n
h
Jo Round-Robin (default): The round-robin algorithm is the default load-balancing strategy
for clustered object stubs when no algorithm is specified.
Weight-Based: The weight-based algorithm takes into account a preassigned weight for
each server. Each server in the cluster is assigned a weight in the range (1100). For
example, suppose that server A is 4, B is 2, and C is 1, the usage will be ABCABAA... .
Random: This algorithm chooses the next replica at random. This tends to distribute calls
evenly among the replicas. It is recommended only in a cluster where each server has the
same power and hosts the same services. The advantages are that it is simple and relatively
cheap. The primary disadvantage is that there is a small cost to generating a random
number on every request, and there is a slight probability that the load will not be evenly
balanced over a small number of runs.
Parameter-Based Routing: It is also possible to have a finer grain of control over loadbalancing and implemented in the application by the programmer.
Server affinity is accomplished by causing method calls on objects to stick to an existing
connection, instead of being load-balanced among the available server instances. With server
affinity algorithms, the load balancing is disabled only for external client connections.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
e
idempotent.
d
ss
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
18 - 36
Stateless Session
vo Bean Failover
t
s
a
Ealgorithm
The
employed in the slide is used by a replica-aware stub on a stateless session bean
n
h
Jo to choose a replica. Failover should occur when a method that is invoked fails while it is being
executed. Because a method can fail in various ways, the different failure situations that can
occur need to be analyzed. Depending on the type of exception or failure that is encountered, a
stub can react in different ways.
If no exception occurs, the stub will normally return. If a system or application exception is
propagated over the wire, the stub does not react to that exception and propagates the exception
back to the client. If a network or communication exception occurs, the stub will perform a high
availability switch over to another replica if the method is marked as being idempotent. If the
method is not marked as being idempotent, the stub just propagates the exception.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 37
e
s
n
e
Configuring
voEJB Clustering in Deployment Descriptors
t
s
Eausing applications based on EJB 2.x, the cluster parameters are configured in the
When
n
Johweblogic-ejb-jar.xml or weblogic-cmp-rdbms-jar.xml deployment descriptor
files. Therefore, WebLogic administrators should discuss with their EJB development team the
impact of the clustering features.
EJBs that are based on the 3.0 specification can be configured using annotations and can be
configured using deployment plans. However, EJB 3.0 also supports all 2.x WebLogicspecific
EJB features, but such features must continue to be configured as per the 2.x WebLogicspecific
EJB features in deployment descriptor files.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 38
Configuring
voEJB Clustering Using the Administration Console
t
s
Eaadministrator, you configure the default EJB cluster settings for your domain using the
As
an
n
Johfollowing steps:
1. Select Environment > Clusters within the Domain Structure panel of the console. Then
select a specific cluster.
2. On the General tab, update any of the fields described as follows:
Default Load Algorithm: The algorithm used for load balancing between replicated
services, such as EJBs, if none is specified for a particular service. The round-robin
algorithm cycles through a list of Oracle WebLogic Server instances in order.
Weight-based load balancing improves on the round-robin algorithm by taking into
account a preassigned weight for each server. In random load balancing, requests are
routed to servers at random.
Cluster Address: The address used by EJB clients to connect to this cluster. This
address may be either a DNS host name that maps to multiple IP addresses or a
comma-separated list of single address host names or IP addresses.
Number Of Servers In Cluster Address: The number of servers listed from this
cluster when generating a cluster address automatically
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
<stateless-session-descriptor>
<!- Other Tags As Appropriate Here -->
<stateless-clustering>
<stateless-bean-is-clusterable>True
</stateless-bean-is-clusterable>
<stateless-bean-load-algorithm>random
</stateless-bean-load-algorithm>
<!- Other Tags As Appropriate Here -->
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
</stateless-clustering>
h
)
du ent G
ss tud
c
ol@
is S
v
18 - 39
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
o
Clusterable
Session Beans
vStateless
t
s
a
E<stateless-clustering> tag specifies options that determine how WebLogic Server
The
n
h
Jo replicates stateless session EJB instances in a cluster. When <stateless-bean-isclusterable> is True, the EJB can be deployed from multiple WebLogic Servers in a
cluster. Calls to the home stub are load-balanced between the servers on which this bean is
deployed, and if a server hosting the bean is unreachable, the call fails over to another server
hosting the bean.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
ic
el
l
b
a
Stub
Server1
Server2
fe
s
n
a
-tr
n
o
n
Each stateful session
Optional
a
s
e
EJB is unique.
replica
a
d
i
h
u
u) nt G
d
e
ss tude
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 40
e
s
n
e
Stateful Session
vo Beans
t
s
a
Erelationship
The
between the client and a stateful session bean is as follows:
n
h
Jo Stateful session EJB maintains data unique to each instance.
To ensure correct data, the stateful session EJB client must use the very same stateful
session Bean instancehence the client is pinned to the exact stateful session EJB
instance it created.
Stateful session EJB is managed on a single WebLogic Server in a cluster with an optional
(if configured) replica on another server in the same cluster.
Remote stateful session EJB stub has information embedded about the primary instance of
the stateful session EJB location and (if configured) the location of the backup copy
replica.
Primary stateful session EJB Instance may migrate (if configured) to another server
(original replica owner) in the event of the primary owner WebLogic Server outage.
If stateful session EJB is not configured to be clusterable, replication would be disabled
and the Remote stub will only have a reference to the Primary owning WebLogic server. In
that case, stateful session EJB will not survive the Primary WebLogic server outage.
Replication behavior is turned on when the stateful session EJB replication is set to
InMemory, and turned off when set to None .
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
<stateful-session-descriptor>
<stateful-session-clustering>
<home-is-clusterable> true
</home-is-clusterable> se
n
e
<home-load-algorithm> random </home-load-algorithm>
c
i
el
l
:
b
ra
e
f
:
ns
a
r
t
<replication-type>
InMemory </replication-type>
n
o
</stateful-session-clustering> a n
s ide
a
h
</stateful-session-descriptor>
u
)
to
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
Configuring
voClusterable Stateful Session EJBs
t
s
Eatags in <stateful-session-clustering> are optional.
All
n the
JohBecause an instance of a stateful session EJB is connected to a single client, invocations can be
sent only to a single server, not a cluster. But the home stub invocations are stateless and thus
can be clustered.
<home-is-clusterable> indicates if the home stub is clustered.
<home-load-algorithm> declares what load balancing algorithm to use.
The <replication-type> tag is used to indicate whether or not your stateful session EJB
is replicated to a secondary server in the cluster. The value of the <replication-type> tag
can be InMemory or None.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
Load balances on every call
n
ice
l
Does not automatically fail over in the event of a recoverable
e
bl
a
call failure
r
e
f
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 42
o
Read/WritetvVersus
Read-Only
s
a
E are two types of entity beans to consider: read/write entities and read-only entities.
There
n
h
Jo Read/Write Entities: When a home finds or creates a read/write entity bean, it obtains an
instance on the local server and returns a stub pinned to that server. Load balancing and
failover occur only at the home level. Because it is possible for multiple instances of the
entity bean to exist in the cluster, each instance must read from the database before each
transaction and write on each commit.
Read-Only Entities: When a home finds or creates a read-only entity bean, it returns a
replica-aware stub. This stub load-balances on every call but does not automatically fail
over in the event of a recoverable call failure. Read-only beans are also cached on every
server to avoid database reads.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
bl
a
r
fe
<entity-clustering>
<home-is-clusterable>True</home-is-clusterable>
<home-load-algorithm>random</home-load-algorithm>
<home-call-router-class-name>beanRouter
</home-call-router-class-name>
</entity-clustering>
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 43
o
Entity Bean
Home Stubs
vCluster-Aware
t
s
a
InnanEOracle WebLogic Server cluster, the server-side representation of the Home object can be
h
Jo replaced by a cluster-aware stub. The cluster-aware home stub has knowledge of the EJB
Home objects on all the Oracle WebLogic Servers in the cluster. The clustered home stub
provides load balancing by distributing EJB lookup requests to available servers. It can also
provide failover support for lookup requests because it routes those requests to available servers
when other servers have failed.
All EJB typesstateless session, stateful session, and entity EJBscan have cluster-aware
home stubs. Whether or not a cluster-aware home stub is created is determined by the homeis-clusterable deployment element in weblogic-ejb-jar.xml.
When home-is-clusterable is True, the EJB can be deployed from multiple Oracle
WebLogic Servers in a cluster. Calls to the home stub are load-balanced between the servers on
which this bean is deployed. If a server that hosts the bean is unreachable, the call automatically
fails over to another server that hosts the bean.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 44
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Select all valid values for the persistent store type element in
weblogic.xml.
a. file
b. replicated
c. unicast
d. async-replicated-if-clustered
e
s
e. jdbc
n
ice
l
e
f. async-wan
bl
ra
e
f
ns
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
18 - 45
Answer: a,tv
b,od, e
a
nE
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which two Oracle WebLogic Server features can be used to
control the destination servers that are used for in-memory
replication?
a. Web service
b. Replication group
c. Data source
e
s
d. Node Manager
n
ice
l
e
e. Machine
bl
ra
e
f
ns
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
18 - 46
Answer: b,tveo
as that clustered servers use machine and replication group boundaries to select
E
Remember
n
h
o
destinations
for replicated sessions.
J
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which is NOT associated with in-memory replication?
a. Cookie
b. Secondary
c. Session
d. Schema
e. Primary
f. Synchronous
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 47
Answer: dtvo
as in-memory replication involves both the synchronous creation of secondary copies of
E
By
default,
n
h
o
primary
sessions and the tracking of these primary and secondary copies with cookies.
J
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
Which types of replication configuration are allowed for EJBs?
a. JDBC
b. File
c. InMemory
d. None
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 48
Answer: c,tv
do
s
a
Other
n Etypes of replication are available for the replication of only HTTP sessions.
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 49
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
18 - 50
o
Practice 18
Managing Clusters
vOverview:
t
s
a
See
Appendix A for the complete steps to do the practice.
nE
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
After completing this lesson, you should be able to:
Use the WebLogic Server (WLS) security architecture
Configure security realms
Configure users and groups
Configure roles
Configure policies
Configure protection for:
Web application resources
Enterprise JavaBeans (EJBs)
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Objectives tvo
as
E
Scenario
n
h
o
J The Medical Records department has decided to explore the use of the security features provided by
Oracle WebLogic Server to protect the application and other resources deployed in the Oracle
WebLogic Server domain. You create users, groups, simple authentication, and authorization policies
and describe the working of these policies in protecting a typical application.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Security overview
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Introduction
vtoo Oracle WebLogic Security Service
t
s
Ea managing, and maintaining security is a challenge for organizations that provide new and
Deploying,
n
Johexpanded services to customers using the Web. To serve a worldwide network of Web-based users,
an organization must address the fundamental issues of maintaining the confidentiality, integrity, and
availability of the system and its data. Challenges to security involve every component of the system.
Security across the infrastructure requires vigilance as well as established and well-communicated
security policies and procedures.
Oracle WebLogic Server includes a security architecture that provides a comprehensive, flexible
security infrastructure designed to address the security challenges of making applications available
on the Web. WebLogic security can be used stand-alone to secure WebLogic Server applications or
as part of an enterprisewide, security management system that represents a best-in-breed, security
management solution.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Java EE
application
Java SE
application
er
f
s
n
aUser/Role
-tr
n
o
a n e
s
a uid
h
)
LDAP/Database
u nt G
dservers
e
ss tude
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Authorization
Credential Store
to
ic
el
l
b
a
Authentication
e
s
n
e
Oracle Platform
vo Security Services
t
s
EaPlatform Security Services (OPSS) is a security framework that runs on Oracle WebLogic
Oracle
n
JohServer. It combines the security features of the WebLogic Server and the Oracle Application Server
to provide application developers, system integrators, security administrators, and independent
software vendors with a comprehensive security platform framework for Java SE and Java EE
applications. OPSS offers abstraction layer APIs that insulate developers from security and identity
management implementation details.
Developers can invoke the services provided by OPSS directly from the development
environment (Oracle JDeveloper) using wizards.
Administrators can configure the services of OPSS before and after the application is deployed
into the Oracle WebLogic Server using Enterprise Manager pages, the Oracle WebLogic
Administration Console, or command-line utilities.
OPSS provides security services to both the Oracle WebLogic Server and to the application deployed
on it. Out of the box, Oracle WebLogic Server comes with a part of OPSS referred to as Common
Security Services (CSS) that provides security services to the Oracle WLS components. This lesson
explains the use of the CSS part of OPSS.
The complete OPSS is available when you install and use other components of Fusion Middleware
such as Oracle SOA 11g Suite or Oracle WebCenter 11g Suite, or Oracle JDeveloper Suite. In such
installations, you can configure and use OPSS fully. For further information about OPSS, refer to the
Oracle Fusion Middleware Security Guide.
Oracle WebLogic Server 11g: Administration Essentials 19 - 5
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Client
EJBs
Web apps
Java 2 Security
Application developer
WebLogic Security Service Provider Interfaces (SSPIs)
Authentication
SSPI
Role Mapping
SSPI
Authorization
SSPI
CertPath
SSPI
Auditing
SSPI
Adjudication
SSPI
fe
s
n
a
-tr
n
o
a n e Adjudication
Authentication
Authorization
Auditing
s
a uid
h
)
Role Mapping
Certificate
Registry
u nt G Credential Mapper
d
e
de
ssAdministrator
u
c
t
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
(
d
l
o
Oracle WLStvSecurity
Architecture
s
a
E
The
WebLogic
Security Service consists of:
n
h
Jo 1. A set of Security Service Provider Interfaces (SSPIs) for developing new security services that
WebLogic Security Providers
to
ic
el
l
b
a
Credential Mapping
SSPI
e
s
n
e
can be plugged into the Oracle WebLogic Server environment. SSPIs are available for
Authentication, Authorization, Auditing, Role Mapping, Certificate Lookup and Validation,
and Credential Mapping
2. A set of WebLogic security providers. These security providers are the Oracle implementation
of the SSPIs and are available by default in the Oracle WebLogic Server product. The
WebLogic security providers include Authentication, Authorization, and Auditing.
3. A set of APIs that allow application developers to specify authorization information that is used
when Oracle WebLogic Server acts as a client and to obtain information about the Subject and
Principals used by Oracle WebLogic Server
4. J2SE 5.0 security packages, including Java Secure Socket Extensions (JSSE), Java
Authentication and Authorization Service (JAAS), Java Security Manager, Java Cryptography
Architecture and Java Cryptography Extensions (JCE), and Java Authorization Contract for
Containers (JACC)
For more information, refer to the Oracle Fusion Middleware Understanding Security for Oracle
WebLogic Server documentation.
Security Services
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Client
WLS
Access
login LoginModules
Authenticate
sign
validate
Subject
MyEJB.foo()
& Subject
Principal
validators
Role
mapper
get role
el
l
b
a
fe
s
n
a
-tr
n
o
n Adjudicator
a
s ide
a
foo()
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo e2010,thOracle
Copyright
t
s
ea us
j
(
d
adjudicate
to
ic
is accessed allowed?
Access
decision
e
s
n
e
Resource
Security Services
vo
t
s
Ea authentication, a user (or a client application), also referred to as the subject, attempts to
Inna simple
Johlog in to a system with a username/password combination. Oracle WebLogic Server establishes trust
by validating that users username and password. A principal represents the subject and the subjects
features or properties. A subject can contain multiple principals. When the user (subject) enters the
name and password, these properties and any other related information are encapsulated into the
principal.
The validation of a principal is performed by the principal validator. After successfully proving the
subjects identity, an authentication context is established, which allows an identified user or system
to be authenticated to other entities.
During the authorization process, Oracle WebLogic Server determines whether a given subject can
perform a given operation on a given resource, and returns the result of that decision to the client
application. This process requires the use of access decisions, an adjudication provider, and possibly
multiple role mapping providers.
Roles are obtained from the Role Mapping providers and input to the Access Decisions. The Access
Decisions are then consulted for an authorization result. If multiple Access Decisions are configured
and return conflicting authorization results (such as PERMIT and DENY), an Adjudication provider
is used to resolve the contradiction by returning a final decision.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
cs Stu
@
is and/or its affiliates. All rights reserved.
vol e2010,thOracle
Copyright
t
s
ea us
j
(
d
to
o
Overview of
Concepts
vSecurity
t
s
a
E
Authentication
is the mechanism to answer the question Who are you? using credentials such as
n
h
Jo username/password combinations to determine whether the caller is acting on behalf of specific users
or system processes. In WLS, authentication providers prove the identity of users or system processes
and transport and make identity information available to the components of a system (via subjects)
when needed.
A LoginModule authenticates the password and stores principals into the subject. There is a one- toone relationship between an authentication provider and a LoginModule. Each authentication
providers LoginModule store principals into the same subject.
Authorization answers the question What can you access? based on user identity or other
information. Oracle WebLogic Server provides an authorization provider to limit the interactions
between users and WebLogic resources to ensure integrity, confidentiality, and availability.
Authorization providers use access decision components to answer the question Is access allowed?
Can a subject perform an operation on a WebLogic resource with specific parameters in an
application? The result is PERMIT, DENY, or ABSTAIN.
Oracle WebLogic Server provides an auditing provider to collect, store, and distribute information
about requests and the outcome of those requests for nonrepudiation. You can configure multiple
auditing providers in a security realm, but none are required.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Confidentiality
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo e2010,thOracle
Copyright
t
s
ea us
j
(
d
to
Confidentiality
vo
t
s
EaWebLogic Server supports the SSL protocol to enable secure communication between the
Oracle
n
Johapplications that are connected through the Web. By default, WebLogic Server is configured for oneway SSL authentication where the managed server is enabled with a digital certificate. Using the
Administration Console, you can configure Oracle WebLogic Server for two-way SSL authentication
where the client and server are both enabled with digital certificates to securely establish their
identity.
To use SSL, you would require a private key, a digital certificate containing the matching public key,
and a certificate signed by at least one trusted CA to verify the data embedded in the digital
certificate. For intermediate authorities, you may need to install the root- trusted CAs certificate.
SSL server authentication allows a user to confirm a servers identity, through an SSL-enabled client
software using standard techniques of public key cryptography, to verify that a servers certificate
and public ID are valid and have been issued by a CA that is listed in the clients list of trusted CAs.
For example, when sending a credit card number, you may want to check the receiving servers
identity.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Confidentiality (continued)
SSL client authentication allows a server to confirm a users identity to verify that a clients
certificate and public ID are valid and have been issued by a CA that is listed in the servers list of
trusted CAs. For example, if a bank sends the account information to a customer, this check may be
essential.
The SSL protocol includes two subprotocols: the SSL record protocol, which defines the format that
is used to transmit data, and the SSL handshake protocol to exchange a series of messages between
an SSL-enabled server and an SSL-enabled client when the SSL connection is established.
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Credential Mapping
-t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
to
Credential tMapping
vo
s
Ea map is a mapping of credentials used by Oracle WebLogic Server to credentials that are
An
credential
Johused in a legacy (or a remote) system to connect to a given resource in that system. Credential maps
allow Oracle WebLogic Server to log in to a remote system on behalf of a subject that has already
been authenticated.
A credential mapping provider of WLS can handle several different types of credentials, such as
username/password, Kerberos tickets, and public key certificates. Credential mappings can be set in
deployment descriptors or through the Administration Console.
You can configure multiple credential mapping providers in a security realm. The security
framework makes a call to each credential mapping provider to determine whether it contains the
type of credentials requested by the container. The framework accumulates and returns all the
credentials as a list.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Security overview
Users and groups
Security realms
Configuring users, groups, and roles
Embedded LDAP
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Security Realms
fe
s
n
a
-tr
n
o
a n e
WLS
Defined users,
s
a
d
i
h
groups,
u
resource
u) nt G
security roles
d
e
ss tude
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
(
d
l
Security Realms
vo
t
s
Ea realm is a mechanism for protecting Oracle WebLogic Server resources, such as
An
security
Johauthenticators, adjudicators, authorizers, auditors, role mappers, and credential mappers. Oracle
Security
provider
data
Security
provider
to
ic
el
l
b
a
Scoped
roles,
policies
e
s
n
e
WebLogic Server resources in a domain are protected under only one security realm and by a single
security policy in that security realm. A user must be defined in a security realm in order to access
any resources belonging to that realm. When a user attempts to access a particular Oracle WebLogic
Server resource, Oracle WebLogic Server tries to authenticate the user and then authorize the user
action by checking the access privileges that are assigned to the user in the relevant realm.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Security Model
Security Checks
Performed
Deployment
Descriptor Only
(Java EE standard)
Deployment descriptors:
web.xml and weblogic.xml
ejb-jar.xml and weblogicejb-jar.xml
Custom Roles
e
s
n
e
to
lic
e
l
b in
Custom Roles and
Role mappings and authorization
For all URLs and EJB
methods
a
r
e
Policies
from providers that you configure for the applicationsf
an
the security realm
r
t
on
n
Advanced
This model is fully flexible. You cana Configurable
s ide
a
import security data from deployment
h
u
) provider
descriptors into the security
G
u
t
d
n
databases to provide
e a baseline.
e
s
d
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo e2010,thOracle
Copyright
t
s
ea us
j
(
d
olOptions
Security Model
for Applications
v
t
s
a
E
You
choose a security model when you deploy each Web application or EJB, and your choice is
n
h
Jo immutable for the lifetime of the deployment. If you want to use a different model, you must delete
and redeploy the Web application or EJB.
The Java EE platform already provides a standard model for securing Web applications and EJBs. In
this standard model, you define role mappings and policies in the deployment descriptors of Web
application or EJB.
Because this Java EE standard can be too inflexible for some environments, WebLogic Server offers
a choice of other, more flexible models in addition to supporting the Java EE standard.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
s
e
change as soon as you redeploy the Web application
a oruEJB.
id If an administrator changes role
h
)
mappings, the changes take effect immediately
without
requiring
a redeployment.
u nt G
d
e
Custom Roles and Policies model ss
de
u
c
t
S
This security model offers lunified
dynamic security management. Instead of requiring
@ and
s
o
i
v
h
t
t
developers to modify
descriptors when organizational security
s multiple
edeployment
a
s
e
j
u
requirements change,
administrators
can
modify
all security configurations from a centralized
(
d
l
graphical
vouser interface.
t
s
Users,
a groups, security roles, and security policies can all be defined using the Administration
EConsole.
n
As a result, the process of making changes based on updated security requirements
Joh becomes more efficient.
This model is appropriate if you require only that entire Web applications or EJBs be secured,
but is less appropriate if you require fine-grained control of a large number of specific URL
patterns or EJB methods.
Advanced model
WebLogic Server provides this model primarily for backwards compatibility with releases prior
to 9.0.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Employees
Partners
Vendors
Groups
Attempt
Policy
Condition 1
Met ?
Yes
Policy
Condition 2
Met ?
Yes
Protected
WebLogic
resource
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
n
aAccess
s
eto /benefits
Employees can
a
d
i
h
u
Gallowed 08:0018:00
Role mapping access /benefits du)
t
n
e
ss tude
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
(
d
l
How WLS Resources
Are Protected
vo
t
s
a
E
The
following
steps provide an overview of the process of granting access to a WLS resource:
n
h
Jo As an administrator, before creating security policies and roles, you can create users and groups
Security
role
Employees
Policy
Statement1:
Policy
Statement2:
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Groups are:
Logical sets of users
More efficient for managing a large
number of users
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
o Users
Configuring
vNew
t
s
Ea a new user, perform the following steps:
Tonconfigure
Joh1. Access Security Realms and select your security realm in the Realms Table on the Summary of
Security Realms page.
2. Click the Users and Groups > Users tab for your realm. Click New in the Users table.
3. Enter the necessary details in the Create a New User dialog box and click OK. The name may
contain spaces, but other systems may not allow spaces. Best practice is to reserve the use of
spaces for the description and use underscores if needed for the name.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Groups
WLS provides the flexibility to organize groups in various ways:
Groups can contain users.
Groups can contain other groups.
Sarah
Tim
Colleen
Joe
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
Employees
du ent GManagers
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Groups
vo
t
s
Eacan be organized in arbitrary ways, thereby providing greater flexibility. In this example, all
Groups
n
Johthe users (Sarah, Tim, Colleen, and Joe) are members of the Employees group. Joe is also a member
of the Managers group. All Managers are also Employees.
Managing groups is more efficient than managing large numbers of users individually. For example,
an administrator can specify permissions for 50 users at one time if those 50 users belong to the same
group. Usually, group members have something in common. For example, a company may separate
its sales staff into two groups: Sales Representatives and Sales Managers. This is because staff
members have different levels of access to the Oracle WebLogic Server resources depending on their
job descriptions.
Oracle WebLogic Server can be configured to assign users to groups. Each group shares a common
set of permissions that govern its member users access to resources. You can mix group names and
usernames whenever a list of users is permitted.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
o Groups
Configuring
vNew
t
s
Ea a new group, perform the following steps:
Tonconfigure
Joh1. Access Security Realms and select your security realm in the Realms Table on the Summary of
Security Realms page.
2. Click the Users and Groups > Groups tab for your realm. Click New in the Groups table.
3. Enter the necessary details in the Create a New Group dialog box and click OK.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
o Memberships
Configuring
vGroup
t
s
a has two types of membership.
Egroup
Each
n
JohA. You can configure a user to be a member of a group as follows:
1. Navigate to the Users subtab under the Users and Groups tab of the security realm.
2. Select the user for whom you want to configure the group membership.
3. Click the Groups tab on the Settings for the <user> page.
4. Select the group from the Available list and click > to move it to the Chosen list. Then
click Save.
B. You can configure a group to be a member of another group as follows:
1. Navigate to the Groups subtab under the Users and Groups tab of the security realm.
2. Select the Group you want to configure as a child of another group.
3. Click the Membership tab on the Settings for the <group> page.
4. Select the parent group from the Available list and click > to move it to the Chosen list.
Then click Save.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Credentials
Backup settings
Cache settings
Replication settings
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Embedded tLDAP
vo Server
s
Ea
The
embedded
LDAP server is used as a storage mechanism with the Oracle WebLogic Server
n
h
Jo authentication, authorization, role mapping, and credential mapping providers.
Information from these providers is stored and updated in the administration server and replicated to
all the managed servers in the domain. The read operations performed by the Oracle WebLogic
Server security providers (when running on a managed server) access the local replicated embedded
LDAP server. The write operations access the master embedded LDAP server on the administration
server and any updates are replicated to all the managed servers in the domain. If the administration
server is not running, operations by the Oracle WebLogic Server security providers that write to the
embedded LDAP server (for example, adding new users, groups, or roles, or adding resources) are
not possible.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
o Embedded LDAP
Configuring
van
t
s
a
E
Credential: The credential (usually password) that is used to connect to the embedded LDAP
n
Joh server. This password is encrypted. The default is null.
Backup Hour: The hour at which to back up the embedded LDAP server. Minimum is 0,
Maximum is 23, and Default is 23.
Backup Minute: The minute at which to back up the embedded LDAP server. This attribute is
used with the BackupHour attribute to determine the time at which the embedded LDAP
server is backed up. Minimum is 0, Maximum is 59, and Default is 05.
Backup Copies: The number of backup copies of the embedded LDAP server. Minimum is 0,
Maximum is 65534, and Default is 7.
Cache Enabled: Whether or not a cache is used for the embedded LDAP server. The default is
True.
Cache Size: The size of the cache (in KB) that is used with the embedded LDAP server.
Minimum is 0 and Default is 32.
Cache TTL: The time-to-live (TTL) of the cache in seconds. Minimum is 0 and Maximum is
60.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Security overview
Users and groups
Roles and policies
Security roles
Security policies
Defining policies and roles
Protecting Web resources
Protecting other resources
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Security Roles
e
s
n
e
to
lic
le
Global roles include Admin, Operator, Deployer, Monitor,
b
a
er
AppTester, Anonymous, and others.
f
s
an be inherited.
r
t
Roles defined in deployment descriptors
can
n
o
n
You can manage role definitions and
without
a assignments
s
e
a
d
editing deployment descriptors
the
h orGredeploying
ui
)
u
application.
nt
ed
ss tude
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s
jea use
(
d
l
o
Security Roles
tv
s
a
A security
E role is a privilege granted to users or groups based on specific conditions. Similar to
n
security roles allow you to restrict access to WebLogic resources for several users
Johgroups,
simultaneously. However, unlike groups, security roles:
Are evaluated and granted to users or groups dynamically, based on conditions such as
username, group membership, or the time of day
Can be scoped to specific WebLogic resources within an application in a WebLogic Server
domain (unlike groups, which are always scoped to an entire WebLogic Server domain)
Granting a security role to a user or a group confers the defined access privileges to that user or
group as long as the user or group is in the security role. Multiple users or groups can be granted a
single security role. A role definition is specific to a security realm.
A role can be defined as global or scoped.
WLS defines a set of default global roles for protecting all the WebLogic resources in a domain. A
scoped role protects a specific resource, such as a method of an EJB or a branch of the JNDI tree.
Most roles are scoped. The default global roles are: Admin, AdminChannelUser, Anonymous,
AppTester, CrossDomainConnector, Deployer, Monitor, Operator, and OracleSystemRole.
Note that by default no security role is enforced and therefore all the resources can be accessed by
any user.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ra
e
f
s
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
vo e thi
t
s
ea us
j
(
d
vo
t
s
a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Security Policies
to
ra
e
f
s
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Security Policies
vo
t
s
EaWebLogic Server provides security policies and roles as two mechanisms that are used
Oracle
n
Johtogether to control access to or protect resources. The security realm that Oracle WebLogic Server
provides stores policies in the embedded LDAP server.
You can create a root-level policy that applies to all instances of a specific resource type. For
example, you can define a root-level policy that applies to all JMS resources in your domain.
You can also create a policy that applies to a specific resource instance. If the instance contains other
resources, the policy will apply to the included resource as well. For example, you can create a policy
for an entire Enterprise Archive (EAR), an EJB JAR containing multiple EJBs, a particular EJB
within that JAR, or a single method within that EJB.
The policy of a narrower scope overrides the policy of a broader scope. For example, if you create a
security policy for an EAR and a policy for an EJB that is in the EAR, the EJB will be protected by
its own policy and will ignore the policy for the EAR.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Policy Conditions
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Policy Conditions
vo
t
s
Ea who can access a resource, a policy contains one or more conditions. The most basic
To determine
n
simply contains the name of a security role or a principal. For example, a basic policy might
Johpolicy
simply name the global role Admin. At run time, the WebLogic Service interprets this policy as
allow access if the user is in the Admin role.
You can create more complex conditions and combine them using the logical operators AND and OR
(which is an inclusive OR). You can also negate any condition, which would prohibit access under
the specified condition.
WebLogic Server by default provides three kinds of conditions:
Basic: This can be used to allow or deny access to everyone or specific users, groups or roles.
Date and Time: When you use any of the date and time conditions, the security policy grants
access to all users for the date or time you specify, unless you further restrict the users by
adding one of the other conditions.
Context Element: You can use the context element conditions to create security policies based
on the value of HTTP Servlet Request attributes, HTTP Session attributes, and EJB method
parameters. WebLogic Server retrieves this information from the ContextHandler object and
allows you to define policy conditions based on the values. When using any of these conditions,
it is your responsibility to ensure that the attribute or parameter/value pairs apply to the context
in which you are using them.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Protecting tWeb
vo Applications
s
a
If n
youEare using the DD Only or Custom Roles security model for the deployment of a Web
Johapplication, you cannot use the Administration Console to modify its security policies. You have to
define your security details using the deployment descriptors.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
1
2
e
s
n
e
ic
el
l
b
a
er
f
s
URL Pattern
RolerName
an
t
on (for example, director)
/*
Some rolen
name
a e
s
a
/*.jsp
employee id
h
u
)
G
u
t
d
n
/EastCoast/*
e deast-coaster
e
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo e2010,thOracle
Copyright
t
s
ea us
j
(
old Web Resources
Specifying tProtected
v
as provide a flexible way to define security for a single resource or a group of resources.
E
URL
patterns
n In the Administration Console, navigate to your domain > Deployments and click the Web
h
o
J
Example URL patterns:
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
1
4u) h
d ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Defining Policies
vo and Roles for Other Resources
t
s
Ea roles and policies for other resources is similar to defining roles and policies for the Web
Defining
n
Johresources. For all of them, you need to define policy conditions and policy statements. For some
resources, you can also define methods or actions that are allowed for that resource. For instance, for
servers, you may define restrictions on actions such as boot, shutdown, lock, and unlock.
The following steps illustrate how you can define a policy for the myDataSource JDBC data source:
1. In the Administration Console, navigate to Services > JDBC > Data Sources. In the Data
Sources table, click the data source for which you want to define policy.
2. On the Settings for <resource> (myDataSource) page, select Security > Policies.
3. Click Add Conditions in the Policy Conditions section.
4. Select the appropriate choice from the Predicate List and click Next.
5. Specify the appropriate conditions and click Finish.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Configuring Authentication
Configure how a Web application determines the security
credentials of users:
BASIC: The Web browser displays a dialog box.
FORM: Use a custom HTML form.
CLIENT-CERT: Request a client certificate.
Configure the authentication using the <login-config>
element:
: <login-config>
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
o
Configuring
vAuthentication
t
s
Ea how users will be authenticated in your Web application using the <login-config>
Configure
n
J2EE provides three types of authentication:
Johelement.
BASIC: A Web browser is used to display a dialog box with fields for a username and
password.
FORM: A specified HTML page, JSP, or servlet is used to display an HTML form with the
username and password text fields. The generated form must conform to a set of specifications.
Use the <form-login-config> element to specify the resource that contains the form.
The <form-error-page> element defines the JSP, servlet, or HTML file to display if the
users credentials are invalid.
CLIENT-CERT: WebLogic Server may receive digital certificates as part of Web Services
requests, two-way SSL, or other secure interactions. To validate these certificates, WebLogic
Server includes a Certificate Lookup and Validation (CLV) framework, whose function is to
look up and validate X.509 certificate chains. The key elements of the CLV framework are
CertPathBuilder and CertPathValidators. The CLV framework requires one and only one active
CertPathBuilder which, given a reference to a certificate chain, finds the chain and validates it,
and zero or more CertPathValidators which, given a certificate chain, validates it.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Authentication Examples
BASIC
authentication
e
s
n
e
ic
FORM-based
authentication
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Authentication
vo Examples
t
s
EaWebLogic Server supports three types of authentication for Web browsers:
Oracle
n
Joh BASIC
FORM
CLIENT-CERT
With BASIC authentication, the Web browser displays a dialog box in response to a WebLogic
resource request. The login screen prompts the user for a username and password. The slide shows a
typical login screen.
When using FORM authentication with Web applications, you provide a custom login screen that the
Web browser displays in response to a Web application resource request and an error screen that
displays if the login fails. The login screen can be generated using an HTML page, JSP, or servlet.
The benefit of FORM-based login is that you have complete control over these screens. You can
design them to meet the requirements of your application or enterprise policy or guideline.
The login screen prompts the user for a username and password.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Migrating Security
vo Data
t
s
EaWebLogic Server security realms persist different kinds of security datafor example, users
Oracle
n
Johand groups (for the WebLogic authentication provider), security policies (for the XACML
authorization provider), security roles (for the XACML role mapping provider), and credential maps
(for the WebLogic credential mapping provider).
When you configure a new security realm or a new security provider, you may prefer to use the
security data from your existing realm or provider, rather than re-create all the users, groups, policies,
roles, and credential maps. Several WebLogic security providers support security data migration.
This means that you can export security data from one security realm and import it into a new
security realm. You can migrate security data for each security provider individually or migrate
security data for all the WebLogic security providers simultaneously (that is, security data for an
entire security realm).
Note that you can migrate security data from one provider to another only if the providers use the
same data format. You migrate security data through the WebLogic Administration Console or by
using the WebLogic Scripting Tool (WLST).
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Exporting the
voWLS Default Authenticator Provider
t
s
Ea security data from a security provider to a file, perform the following steps:
Tonexport
the left pane, select Security Realms and then select the name of the realm that you are
Joh1. In
configuring (for example, myrealm).
2. Select the type of provider from which you want to export the security data (for example,
authentication).
3. Select the security provider from which you want to export the security data.
4. Select Migration > Export.
5. Specify the directory and file name in which to export the security data in the Export File on
Server field. The directory must exist.
Note: The directory and file into which you export the security data should be carefully
protected with operating system security because they contain secure information about your
deployment.
6. Optionally, define a specific set of security data to be exported in the Export Constraints
(key=value) box.
7. Click Save.
Note: After the data is exported from the security provider, it can be imported at any time.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
Importing into
voa Different Domain
t
s
a
E
You
can export the security data from a security provider into a file and then import the data into a
n
Johdifferent security provider. As an alternative, you can export the security data from all the security
providers in a realm and then import that data into another security realm. To import security data
into a security provider, perform the following steps:
1. In the left pane of the Administration Console, select Security Realms.
2. Select the name of the security realm into which the security data is to be imported (for
example, myrealm).
3. Select Providers and then the type of provider into which the security data is to be imported (for
example, Providers > Authentication).
4. Select the security provider into which the security data is to be imported and select Migration
> Import.
5. Specify the directory and file name of the file that contains the exported security data in the
Import File on Server field.
6. You can restrict the imported security parameters by specifying the Import Constraints.
7. Click Save.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
h
Copyright
2010,
Oracle and/or its affiliates. All rights reserved.
t
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo e2010,thOracle
Copyright
t
s
ea us
j
(
d
Practice 19tOverview:
Configuring Security for WLS Resources
vo
s
a
E
See
A for the complete steps to do the practice.
n Appendix
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
n
h
o
J
ra
e
f
s
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
What Is SSL?
SSL is a protocol that enables:
Connection security through encryption
A server to authenticate to a client
A client to authenticate to a server (optional)
Data integrity such that the data that flows between a client
and server is protected from tampering by a third party
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
What Is SSL?
vo
t
s
Ea protocol offers security to applications that are connected through a network. Specifically,
The
SSL
n
Johthe SSL protocol provides the following:
A mechanism that the applications can use to authenticate each others identity
Encryption of the data that is exchanged by the applications
Data integrity, whereby the data that flows between a client and a server is protected from
tampering by a third party
When the SSL protocol is used, the target always authenticates itself to the initiator. Optionally, if
the target requests it, the initiator can authenticate itself to the target. Encryption makes the data that
is transmitted over the network intelligible only to the intended recipient. An SSL connection begins
with a handshake during which time the applications exchange digital certificates, agree on the
encryption algorithms to be used, and generate the encryption keys to be used for the remainder of
the session.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Trust:
to
bl
a
r
fe
s
Certificates of trusted certificate authorities
ran
-t
n
o
n CA
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
HTTPS or t3s
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Using an SSL
voConnection
t
s
Eaof SSL is signified in the protocol scheme of the URL to specify the location of Oracle
The
use
n
JohWebLogic Server. SSL communications between Web browsers and Oracle WebLogic Server are
encapsulated in HTTPS packets for transport. For example:
https://myserver.com:7002/mypage.html
Oracle WebLogic Server supports HTTPS with Web browsers that support SSL version 3. Java
clients connect to Oracle WebLogic Server with the SSL protocol tunnel over Oracles multiplexed
t3 protocol. For example:
t3s://myserver.com:7002
Java clients running in Oracle WebLogic Server can also establish either t3s connections to other
Oracle WebLogic Servers, or HTTPS connections to other servers that support the SSL protocol,
such as Web servers or secure proxy servers. Browsers connect securely to Oracle WebLogic Server
by specifying the appropriate protocol (that is, HTTPS) in the requested URL, whereas Java clients
have a variety of options available to them when setting up secure connections. Java clients can use
the SSL libraries in Oracle WebLogic Server to provide the SSL socket or, alternatively, they can use
an SSL provider such as Sun Microsystems Java Secure Socket Extension (JSSE) as the SSL socket.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ra
e
f
ns
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Enabling Secure
vo Communication
t
s
a
Enormal,
Under
non-Internet circumstances, data is sent between two parties. Each party has the same
n
h
Jo key and can decipher the data. Such situations in which both parties use the same key to encrypt and
decrypt the data are termed symmetric key encryption. The problem with symmetric key encryption is
that anyone can potentially see anything that is transmitted over the Internet by intercepting its key as
it is being transferred.
When you use public key/private key encryption, the public key is freely available and can be
transferred across the Internet. Anyone can use the public key. Data is encrypted with the public key,
but can be decrypted only with the private key, which is held privately in secure storage. Though the
two keys are mathematically linked, it is statistically impossible to generate the private key
programmatically, thus ensuring data security.
Typically, anyone who wants to send an encrypted message obtains a digital certificate from a trusted
source known as a Certificate Authority or CA. The CA issues a digital certificate containing the
applicants public key and identification information. The digital certificate is then encrypted by the
CA whose own public key is publicly available. The receiver of the message uses the CAs public
key to decode the digital certificate attached to the message, verifies it, and then obtains the senders
public key and identification information that is held within the certificate. With this information, the
recipient can send an encrypted reply, which only the originator can decrypt.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Oracle WebLogic
vo Server SSL Requirements
t
s
a a number of steps to configure Oracle WebLogic Server to use SSL. You must first obtain
Eare
There
n
Joha valid certificate from a CA such as VeriSign, Inc. You must then install the certificate as well as
the certificates of one or more certificate authorities that you trust. In addition, you can configure
Oracle WebLogic Server to support mutual authentication by adding several additional property
entries. These steps are covered in detail in the following slides. It is important, however, to
remember that enabling security has a performance penalty. Packets need to be encrypted and
tunneled out over the network. Also CPU cycles are expended for encryption and decryption.
However, when security is required, the performance penalty is usually worth it.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
keytool Utility
to
sf
n
a
tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
keytool Utility
vo
t
s
EaMicrosystems keytool utility can also be used to generate a private key, a self-signed
The Sun
n
Johdigital certificate for Oracle WebLogic Server, and a Certificate Signing Request (CSR). Submit the
CSR to a certificate authority to obtain a digital certificate for Oracle WebLogic Server.
You can use the keytool utility to:
Update the self-signed digital certificate with a new digital certificate
Obtain trust and identity when using Oracle WebLogic Server in a production environment
For more information about Suns keytool utility, see the keytool Key and Certificate
Management Tool description at http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html.
Note: When you use the keytool utility, specify an algorithm different from the default Digital
Signature Algorithm (DSA) such as RSA because Oracle WebLogic Server does not support DSA.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
Inspect the contents of a store:
a uid
h
)
t G mypass
du estorepass
keytool list v -keystore mykeys.jks
n
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
o Certificate: keytool Examples
Obtaining atvDigital
s
Ea is a key and certificate management utility. It allows users to administer their own
keytool
n
Johpublic/private key pairs and associated certificates for use in self-authentication (where the user
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Configuring Keystores
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Configuring
vKeystores
t
s
Ea ensure the secure storage and management of private keys and trusted CAs. WebLogic
Keystores
n
Server is configured with a default identity keystore (DemoIdentity.jks) and a default trust
Johkeystore
(DemoTrust.jks). In addition, WebLogic Server trusts the CA certificates in the JDK
cacerts file. This default keystore configuration is appropriate for testing and development
purposes. However, these keystores should not be used in a production environment.
After you configure identity and trust keystores for a WebLogic Server instance, you can configure
its SSL attributes. These attributes include information about the identity and trust location for
particular server instances.
For purposes of backward compatibility, with WebLogic Server, you can store private keys and
trusted certificates authorities in files or in the WebLogic Keystore provider. If you use either of
these mechanisms for identity and trust, select the Files or Keystore Providers (Deprecated) option on
the Configuration: SSL page.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Identity and Trust Locations: Indicates where SSL should find the servers identity (certificate and
private key) as well as the servers trust (trusted CAs). If set to Keystores, SSL retrieves the
identity and trust from the servers key store (that is configured on the server). The Files or keystore
providers option is meant for use with older versions of WLS and is deprecated.
For a more secure deployment, Oracle recommends saving private keys in a keystore.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Types of attacks
Protecting against man-in-the-middle attacks
Protecting against denial of service (DoS) attacks ble
ra
e
f
Protecting against large buffer attacks
ns
a
r
t
Protecting against connection starvation
n-
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
vo
t
s
a
lic
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Protecting tAgainst
vo Attacks
s
a
InntheEfollowing pages, attacks and countermeasures are described in detail.
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Man-in-the-Middle Attacks
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
Host
a n e server
Client
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Man-in-the-Middle
vo Attacks
t
s
a use SSL, servers that do not use a certificate signed by a trusted CA are vulnerable to the
Eyou
When
n
Johman-in-the-middle attacks.
If a client accepts the attackers certificate, the man-in-the-middle can decrypt and forward the
traffic to and from the real destination host and monitor it.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Man-in-the-Middle: Countermeasures
-t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
Man-in-the-Middle:
vo Countermeasures
t
s
Ea Verifier is useful when an Oracle WebLogic Server or a WebLogic client acts as an SSL
An
Hostname
Johclient to another application server. It prevents the man-in-the-middle attacks.
By default, Oracle WebLogic Server, as a function of SSL handshake, compares the common name
in SubjectDN of the SSL servers digital certificate with the host name of the SSL server that is
used to initiate the SSL connection. If these names do not match, the SSL connection is dropped. The
dropping of the SSL connection is caused by the SSL client, which validates the host name of the
server against the digital certificate of the server.
If anything but the default behavior is desired, you can either turn off host name verification or
register a custom Hostname Verifier. Turning off host name verification leaves Oracle WebLogic
Server vulnerable to the man-in-the-middle attacks.
Note: Turn off host name verification when you use the demo digital certificates that are shipped
with Oracle WebLogic Server. You can turn off host name verification in the following ways:
In the Administration Console, select the Hostname Verification Ignored attribute under the
SSL tab on the Server node.
On the command line of the SSL client, enter the following argument:
-Dweblogic.security.SSL.ignoreHostnameVerification=true
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
-Dweblogic.security.SSL.HostnameVerifier=hostnameverifier
where hostnameverifier is the name of the class that implements the custom
Hostname Verifier.
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Configuring
vaoHostname Verifier
t
s
Ea a custom Hostname Verifier, perform the following steps:
Tonconfigure
Joh1. If you have not already done so, in the Change Center of the Administration Console, click
Lock & Edit.
2. In the left pane of the Console, expand Environment and select Servers.
3. Click the name of the server for which you want to configure a Hostname Verifier.
4. Select Configuration > SSL and click Advanced at the bottom of the page.
5. Select the appropriate Hostname Verifier in Hostname Verification.
6. Enter the name of the implementation of the
weblogic.security.SSL.HostnameVerifier interface in the Custom Hostname
Verifier field.
7. Click Save.
8. To activate these changes, in Change Center of the Administration Console, click Activate
Changes.
Note: Not all changes take effect immediately; those marked with a triangle exclamation require a
restart of the server.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Denial of Service
vo Attacks
t
s
a
E
DoS
attacks can disable your computer or your network. Depending on the nature of your enterprise,
n
Johthis can effectively disable your organization.
Some DoS attacks can be executed with limited resources against a large, sophisticated site. This
type of attack is sometimes called an asymmetric attack. For example, an attacker with an old PC
and a slow modem may be able to disable much faster and more sophisticated machines or networks.
Examples include attempts to:
Flood a network, thereby preventing legitimate network traffic
Disrupt connections between two machines, thereby preventing access to a service
Prevent a particular individual from accessing a service
Disrupt service to a specific system or person
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
e
s
n
e
lic
Denial of Service
vo Attacks: Countermeasures
t
s
a
E
You
can also use tools such as Oracle Adaptive Access Manager (OAAM) that can effectively
n
Johprevent unauthorized accesses.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Filtering Network
vo Connections
t
s
Ea connection filtering in the server, create a ConnectionFilterImpl class that
To configure
n
the weblogic.security.net.ConnectionFilter interface (minimum
Johimplements
requirement) and the ConnectionFilterRulesListener interface (optional). Use the
Administration Console to install the class in Oracle WebLogic Server so that the server examines
requests as they occur, and then accepts or denies them.
When a Java client or a Web browser client tries to connect to Oracle WebLogic Server, Oracle
WebLogic Server constructs a ConnectionEvent object and passes it to the accept() method
of your connection filter class. The ConnectionEvent object includes the remote IP address (in
the form of java.net.InetAddress), the remote port number, the port number of the local
Oracle WebLogic Server, and a string specifying the protocol (http, https, t3, t3s, or IIOP).
To filter network connections, either create a class that implements the ConnectionFilter
interface and install it using the Administration Console, or use the default filter. The default network
filter is always on. You just have to configure the rules. There is no need to implement a class for the
default filter.
The connection filter class (ConnectionFilterImpl) examines the ConnectionEvent
object and either accepts the connection by returning or denies the connection by throwing a
FilterException.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Connection Filter
targetAddr
action
protocols
localPort
localAddr
ic
allow
deny
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
http, https
t3, t3s
ldap, ldaps
iiop, iiops
com
e
s
n
e
o
ConnectiontvFilter
s
a Administration Console, access the domain (top) node in the navigation panel.
Ethe
Using
n
Joh1. Click the Security > Filter tab.
2. In the Connection Filter field, specify the connection filter class to be used in the domain.
To configure the default connection filter, specify
weblogic.security.net.ConnectionFilterImpl
(only part of the name is showing on the screen).
To configure a custom connection filter, specify the class that implements the network
connection filter. This class must also be present in CLASSPATH for Oracle WebLogic
Server.
3. Connection Filter Rules are written on single lines, white space is ignored. The rules are
evaluated in order. When the first rule matches, evaluation stops (so order is important). You
can put a catch-all rule at the bottom that says:
0.0.0.0/0 * * deny
in case any other rule is not satisfied.
4. After adding Filter Rules, click Save.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ra
e
f
The effect of these attacks can be reduced by
ns setting the
a
r
t
appropriate quotas and threshold values.
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Excessive Resource
Consumption
vo
t
s
a
E WebLogic Server resources can be vulnerable to abuse. A malicious piece of code can
The
Oracle
n
h
Jo consume all the available database connections or cripple a service such as JMS by sending many
large messages or delaying the delivery of messages.
You can reduce the effect of these attacks by using the Administration Console to set reasonable
quotas and threshold values for each resource. You can also set the size of the log files and their
rotation values to limit the amount of disk space that is consumed.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Large Buffer
vAttacks
t
s
Eatry to bring down a Web site in a variety of ways. One particular way is referred to as large
Hackers
n
Johbuffer attacks because hackers send large buffers of data to the server that starves the server of
memory. Oracle WebLogic Server allows administrators to set a limit to the amount of HTTP data
that can be posted to their servers. Administrators can use the Administration Console to manage this
threshold. Any requests that exceed this threshold are denied access to the server.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
-1 (default)
means unlimited
size.
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Setting thetPost
vo Size
s
Ea Post Size parameter determines the size of a data buffer that a server allows for reading
The
Max
n
JohHTTP POST data in a servlet request. A value less than 0 (such as 1) indicates an unlimited size.
To set the threshold of the request sizes that can be posted to the server, perform the following steps:
1. In the left pane, select the server that you want to set the limit on.
2. Click the Protocols > HTTP tab in the right pane.
3. Set Max Post Size. This is the threshold amount for the incoming requests. In this example, the
maximum amount of data sent is 512 KB.
4. After you have finished entering your information, click Save to save your changes.
Similarly, HTTP Max Message Size limits the number of bytes allowed in messages that are received
over the HTTP protocol. If you configure custom network channels for this server, each channel can
override this maximum message size. This maximum message size helps guard against a DoS attack
in which a caller attempts to force the server to allocate more memory than is available, thereby
keeping the server from responding quickly to other requests.
Note: You need to restart the server after making these modifications.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Connection Starvation
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Connectiontv
Starvation
s
Eaway that individuals can try and harm a Web site is by sending small, incomplete messages
Another
n
Johto the server. The server then waits for the completion of the message, in effect unduly burdening the
server. Oracle WebLogic Server enables administrators to set a threshold for the time Oracle
WebLogic Server will wait for the completion of the message. The administrator sets the time-out
feature in the Administration Console and any connections that are still waiting for the completion of
the message longer than this limit are canceled.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Connection Starvation
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
ConnectiontvStarvation
(continued)
s
a
Ethe threshold of Post Timeout and Max Post Time, perform the following steps:
Tonset
h
Jo 1. In the left pane, select the server that you want to set the limit on.
2. In the right pane, click the Protocols tab.
3. Click the HTTP tab.
4. Set Post Timeout, which is the maximum amount of time that Oracle WebLogic Server waits
for the next packet.
5. After you have finished entering your information, click Apply to save your changes.
Note: You need to restart the server after making these modifications.
Similarly, you can also set the amount of time this server waits before closing an inactive HTTPS
connection by using the HTTPS Duration parameter. The value you specify is in seconds. The default
of 60 seconds may be very large for some applications.
You specify the number of seconds during which to keep the HTTPS active before timing out the
request.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
User Lockout
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
User Lockout
vo
t
s
Ea guessing is a common type of security attack. In this type of attack, a hacker attempts to
Password
n
Johlog in to a computer by using various combinations of usernames and passwords. Oracle WebLogic
Server provides a set of attributes to protect passwords and user accounts in a security realm.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Lockout
Configuring
vUser
t
s
Ea Lockout feature enables you to prevent attack from hackers using a compromised user
The
User
n
Johaccount. The User Lockout attributes apply to the security realm and all its security providers. If you
are using an authentication provider that has its own mechanism for protecting user accounts, disable
the Lockout Enabled attribute.
Lockout Threshold: The maximum number of consecutive invalid login attempts before the
account is locked out. For example, with the setting of 1, the user is locked out on the second
consecutive invalid login. Minimum is 1 and the default is 5.
Lockout Duration: The number of minutes that a user account is locked out. Minimum is 0
and the default is 30.
Lockout Reset Duration: The number of minutes within which consecutive invalid login
attempts cause the user account to be locked out. Minimum is 1 and the default is 5.
Lockout Cache Size: The number of invalid login records that the server places in a cache.
The server creates one record for each invalid login. Minimum is 0 and the default is 5.
Lockout GC Threshold: The maximum number of invalid login records that the server keeps
in memory. If the number of invalid login records is equal to or greater than this value, the
servers garbage collection purges the records that have expired.
If a user lockout security event occurs on one node of a cluster, the other nodes in the cluster are
notified of the event and the user account is locked on all the nodes in the cluster. This prevents a
hacker from systematically breaking into all the nodes in a cluster.
Oracle WebLogic Server 11g: Administration Essentials 20 - 32
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Unlocking Users
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unlocking Users
vo
t
s
Eaunsuccessfully attempts to log in to a WebLogic Server more than the configured number of
If n
a user
Johretry attempts, they are locked out of further access. The Unlock User page allows you to unlock a
locked user so that they can log in again.
Note: If a user account becomes locked and you delete the user account and add another user account
with the same name and password, the User Lockout attribute will not be resetthat is, the added
user may remain in the lockout status.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Protecting tthe
voAdministration Console
s
Ea
Bynconfiguring
a separate administration port for administration tasks, you do not expose the
h
Jo administration ports to other application ports. Before you enable an administration port, you ensure
that all the servers in the domain are configured with SSL.
Similarly, you can reconfigure the context path of the console so that it does not remain the generally
known /console.
Finally, in a production environments where you are less likely to make configuration changes
regularly, you can disable the console application.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
The Hostname Verifier is one measure for combating this type
of attack:
a. Large buffer
b. Connection starvation
c. Man in the middle
d. User lockout
ic
e
s
n
e
el
l
b
a
fe
s
n
a
n
h
o
J
vo
t
s
a
Answer: c
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
To counter connection starvation attacks, you can set:
a. Max Post Size
b. Post Timeout
c. Hostname Verifier
d. User lockout
ic
e
s
n
e
el
l
b
a
fe
s
n
a
n
h
o
J
vo
t
s
a
Answer: b
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Practice 20tOverview:
Configuring Keystores
vo
s
a
E
See
A for the complete steps to do the practice.
n Appendix
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Objectives
After completing this lesson, you should be able to:
Recommend a backup and recovery strategy
Perform a full offline backup and recovery
Perform an online and offline domain backup
Perform an offline domain recovery
Perform an Instance Home backup and recovery
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Objectivestvo
as
E
Scenario
n
h
o
J As the middleware administrator, you need to plan a reasonable backup strategy that balances
risk against inconvenience. Backing up once a month is too infrequent, whereas once an hour is
too frequent, so what is the right balance? Given that you will do far more backups than
recoveries, a plan that favors backup by shortening the time to create the backups at the expense
of lengthening and complicating the recovery might be worth trying. Given that different backup
strategies cause different kinds of recoveries, you plan to time how long it takes to do a recovery
to help create service-level agreements (SLA).
Note the distinction between restore and recover: restore is a pure file system copy operation,
whereas recovery is restore plus some extra operations to get to a specific point-in-timerecovery.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Backup
Full
Incremental
Online
Offline
Recovery
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Host A
Domain B
Instance I
Admin server C
Administration
Console
Managed
server D
Application
F
HTTP
server J
Web Cache
K
config.xml
Managed
server E
Node
Manager N
Application
F
Database L
e
s
n
e
ic
el
l
b
a
Metadata
M
er
f
s
n
a
-tr
n
o
JMS appl
SOA appl
a n e
Persistent
Persistent
s
G
H
a
d
i
store
O
h
store P
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
old and Components
Review of tTerms
v
as The computer may have redundant CPUs, RAID disks, and/or other hardware
A.EHost:
n failover features.
h
o
J
OS
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
JohRun-time artifacts: These objects change frequently, even multiple times per second in the case
of logs. Configuration objects may change several times per day, though typically they remain
unchanged for long periods of time.
Persistent stores: These objects may change very frequently, even hundreds of times per
second, depending on the volume of data traffic. A high-performance solution may be required
so as to not lose data.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
to
Homes: Oracle,
vo Middleware, WebLogic
t
s
Eisathe layout of the disks in the lab. Each of the homes can be a point for starting an
This
n
Johincremental backup. Starting from <ORACLE_BASE> would be a full offline backup.
Oracle home: There can be several simultaneous <ORACLE_HOME>s. An Oracle home
contains installed files necessary to host a specific product. Shown is the home for the database.
Not shown might be a <SOA_ORACLE_HOME> and a <WC_ORACLE_HOME> (Web Cache).
For example, the SOA Oracle home contains a directory that contains binary and library files for
Oracle SOA Suite. The WebLogic Server home also consists of its installed files.
An Oracle home resides within the directory structure of the Middleware home. Each Oracle
home can be associated with multiple system component domains or Oracle WebLogic Server
domains. The WebLogic Server Home directory is a peer of Oracle Home directories. In order to
keep all the multiple Oracle homes from conflicting with each other, they should be defined only
in the scripts that start a particular process, not globally defined in a .profile nor using the
source command.
Middleware home: The Middleware home consists of the Oracle WebLogic Server home and
one or more Oracle homes, such as SOA home and Web Cache home.
Instance home: The Instance would contain the Oracle HTTP Server and Web Cache
configuration files.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Recovery
Unscheduled (usually)
At least annually (if
only to test procedures)
Not necessarily the reverse of
backup, may be new tools
e
Protects against failures of hardware, software, power,
s
n
environmental disasters, accidental and malicious changes, and
ice
l
e
bl
more
a
r
fe
s
Guarantees a point of recovery, minimizes loss of
business
n
a
trrequirements
availability, insures an SLA, may satisfy legal
n
o
n
a
May impact business
s ide
a
h
May be hardware and software
Gu
u)
ed dent
s
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
d
to
Understanding
vo Backup and Recovery
t
s
Ea the terms backup and recovery imply the use of secondary media to copy some
Commonly,
n
Johdata for later use. That kind of backup and recovery involves an offline or cold storage of the
data such that if an outage occurs, then some process (human or automated) requires some time
to get the system back up and running. Alternatively, redundancy and failover are additional
means by which to back up and recover the data in more of an online or warm or hot storage
mode, thus reducing, or even eliminating the switchover time. If an outage occurs with
redundancy and failover implemented, it is often undetectable by the user. The following are
different forms of backup and recovery:
Redundant disks in a SCSI array
Multiple servers configured on multiple machines in a cluster with an application deployed
on the cluster
The ability to cancel all pending changes to a configuration
The architecture of the Oracle 11g Database with inherent transaction logging
In addition to those very significant features, a media backup plan is essential. The most
common problem that requires a backup and recovery is when a person who is authorized to
make changes accidentally commits a wrong change. Usually, the mistake is realized within
seconds and all that is needed is a mechanism that will enable the user to go back to a very
recent version of the configuration. A more serious problem is when there is a complete loss of
Oracle WebLogic Server 11g: Administration Essentials 21 - 7
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Types of Backups
Online
Nondisruptive
Possibly inconsistent
Can be tricky, especially for database
Offline
Requires all processes to be stopped
Very easy
ic
Full
Easier to recover
Slower to create
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
Incremental
a n e
s
a uid
h
Harder to recover
)
du ent G
Faster to create sse
d
u
c
t
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
Types of Backups
vo
t
s
Ea
Online
n
JohIf your environment requires 247 availability, you have no choice but to perform an online
backup. Different components require different tools to perform online (also known as hot or
inconsistent) backups. Inconsistent is not bad in itself; it just means that if the backup takes an
hour to complete and you start at 1:00 AM, the files at 1:02 AM will be in a different state than
those backed up at 1:59 AM. To accommodate this, there needs to be some kind of online
transaction log recording the changes occurring from 1:00 AM until 2:00 AM. This log needs to
be incorporated into the recovery, and the logs themselves get backed up at a different time
(usually, after they rotate).
Offline
If you can afford to shut down the entire middleware tier (application servers, database, Web
servers, and so on) for maintenance during some regularly scheduled time, an offline (also
known as cold or consistent) backup is very simple. Using OS tools such as TAR or ZIP, the
backup is guaranteed to be consistent. Make sure you preserve file permissions on UNIX
systems.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
s
s It istua delicate tradeoff balancing storage space versus
lengthened your potential recoveryctime.
@
time versus complexity. vol
is S
n
h
o
J
t
t
s
e
a
s
e
u
d (j
vo
t
s
a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Backup Recommendations
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Backup Recommendations
vo
t
s
a software installation and most patches and upgrades require the servers to be offline
Einitial
The
n
Johanyway, so before and after the patches and upgrades is a good time to perform backups.
Many of the online configuration backups can be automatic by enabling configuration archive
(discussed in the following slides).
The database should be in archivelog mode and then backed up with RMAN. In addition, the
database should be configured with redundant critical files (for example, control files) and
multiplexed critical logs (for example, redo logs). As an added high availability measure, the
database can be made completely redundant by using RAC.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
lic
e
l
bbe lost.
HTTP session states and cookies information may
a
r
e
f
In-memory replication may lose the state. rans
-t solves this
n
JDBC replication of the HTTP session
state
o
a n e
problem.
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
o Restrictions for Backing Up Data
Limitations
vand
t
s
Eofa these restrictions apply to offline backups; they apply only to online backups. In many
None
n
Johcases, the WebLogic Server has the option to be configured to use either database or file storage
for information. Choosing database is always a safer option, but you pay for it with complexity
and perhaps a speed penalty. If you have a database anyway, and the DBA is backing up the
database anyway, some additional WebLogic Server files should not be any additional effort, so
it is worth the security to specify database storage when possible over OS file storage. For files
such as configuration XML; application JARs, WARs, or EARs; and properties files; database
storage is not an option.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
If using TAR, make sure that you keep permissions.
s
n
ce
If using ZIP, make sure that you include empty directories.
e li
l
b
a
3. Test the backup by performing recovery on another
r
e
f
computer:
ans
r
-talternate data
Ideally, use an alternate computer inoan
n
center.
a n e
s
a uid
Time the recovery for SLA
) hinput.
u nt G
de
u
t
S
d
4. Store the backup offsite.
se
cs
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
d
Performing
vaoFull Offline Backup
t
s
Ea Down
Shutting
n
JohStop all deployed applications so that you can shut down all servers. Verify the Node Managers
and emAgent PIDs. Stop the Node Managers and emAgents. In SQL*Plus (sqlplus / as
sysdba), issue shutdown immediate. This may take a while (despite the name, it is not
immediate). Stop the database listeners and the Enterprise Manager console. Stop all OPMNmanaged utilities (for example, OHS and Web Cache) using opmnctl stopall.
Performing Backup
In the lab, all the product and configuration information is stored in /u01/app/work. Signed
on as root, from the root directory, use the appropriate operating system backup utilities (for
example, tar or winzip):
tar -zcvpf mybackup1.tar /u01/app/work /etc/ora* etc/hosts
There may be more sophisticated options to exclude /tmp/ files and to include parts of other
applications, but this will do as a start. The sequence number 1, 2, 3, might be replaced with the
date_time in the name of the TAR file. If the directories are backed up from the root, you do not
need to worry about where to recover them to; that information will be part of the backup.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Because you have signed on as root, it is vital to make sure that the p switch is used in the
tar command to preserve the original owners and group permissions (for example, oracle
and oinstall versus root). Restart all processes to test the recovery and make sure that it is
complete.
e to
n
h
o
J
s
n
e
c
e li
b
a
r
e
f
an
r
t
on
n
a e
s
a
id
h
u
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
e
s
n
e
to
ic
el
l
b
a
Disabled
by default
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vaoDomain Configuration
Backing s
Up
t
Ea > Configuration > General > Advanced, you can enable autobackup at the domain
InnDomain
Johlevel. Each startup of the administration server creates two files: config-booted.jar and
config-original.jar in the domain directory. In addition, each saved change of the
configuration file makes a backup named configArchive/config-n.jar, where n is a
sequential number. Archive Configuration Count limits the number of retained configuration
JARs, so that in the example shown, there are never more than two kept: the most recent backup
and the one immediately before that. Older backups are automatically deleted. If you made a
series of mistakes, this provides a very easy way to return to a previous recent configuration.
However, be aware that a typical configuration change requires clicking Activate Changes a few
times, and each one then cycles the stored JARs. You may want a higher number such as 10 or
20 for the count. An example from the MedRecDomain directory:
[oracle@edvmr1]# cd /u01/app/work/domains/MedRecDomain
[oracle@edvmr1]# ll conf*
drwxr-x--- 11 oracle oinstall 4096 Mar 23 16:51 config
drwxr----- 2 oracle oinstall 4096 Mar 25 08:58 configArchive
-rw-r----- 1 oracle oinstall 12328 Mar 25 08:54 config-booted.jar
-rw-r----- 1 oracle oinstall 12328 Mar 25 08:54 config-original.jar
[oracle@edvmr1]# ll configArchive/
-rw-r----- 1 oracle oinstall 12339 Mar 25 08:59 config-2.jar
-rw-r----- 1 oracle oinstall 12328 Mar 25 09:03 config-3.jar
Oracle WebLogic Server 11g: Administration Essentials 21 - 15
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Stop the Web tier (Oracle HTTP Server and Oracle Web
Cache):
opmnctl stopall
opmnctl status
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o Instance Home
Backing Up
van
t
s
Eamay be more sophisticated ways of not backing up the /tmp/ files, but this is a good
There
n
Johstart. There is no facility for performing an online backup of the Instance home. After creating
the backup, store a copy offsite. A sample Instance home might contain the following directories
and files:
[oracle@edvmr1]$ ll instances
total 32
drwx------ 4 oracle oinstall 4096 Mar 26 1:38 auditlogs
drwx------ 2 oracle oinstall 4096 Mar 26 1:37 bin
drwx------ 5 oracle oinstall 4096 Mar 26 1:38 config
drwx------ 3 oracle oinstall 4096 Mar 26 1:37 diagnostics
drwx------ 3 oracle oinstall 4096 Mar 26 1:37 OHS
drwx------ 2 oracle oinstall 4096 Mar 26 1:37 tmp
drwx------ 3 oracle oinstall 4096 Mar 26 1:38 WebCache
-rw------- 1 oracle oinstall
9 Mar 26 1:38
webcacheAdmin1621.txt
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
ra
t
n
Store it offsite.
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
old of Installations
Creating atv
Record
as maintain an up-to-date record of your Oracle Fusion Middleware installations in
E
You
should
n
h
o
hard
copy and in electronic form. You need this information in the event that you must restore
J
to
and recover your installations to a new disk or host. The electronic form should be stored on a
system that is completely separate from your Oracle Fusion Middleware that is being backed up.
Your hardware and software configuration record should include:
The following information for each host in your environment:
- Host name, virtual host name (if any), domain name, IP address, hardware platform,
and operating system release level and patch information
The following information for each Oracle Application Server installation in your
environment:
- Installation type (for example, Infrastructure, or Java EE and Web Cache), host on
which the installation resides, username, user ID number, group name, group ID
number, environment profile, and type of shell for the operating system user that
owns the Oracle home (/etc/passwd and /etc/group entries), directory structure,
mount points, and full path for Oracle home, and port numbers used by the
installation
- For Oracle Database, the database version, patch level, base language, character set,
global database name, and SID
Oracle WebLogic Server 11g: Administration Essentials 21 - 17
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Road Map
n
h
o
J
Backup
Recovery
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Directories to Restore
Binaries
Be mindful of preserving group ownership and permissions.
This should be read-only for most users.
Configurations
If the last configuration caused the problem, recover to a
point in time prior to that.
Logs are:
Not required for recovery
Created if they do not exist
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
Database restores data within tablespaces,
a n e not directories.
s
ato theuilast
d backup,
RMAN restore brings data) up
h
duupetonat G
then recover brings data
later point in time.
e
s
d
cs Stu
@
is
vol 2010,
h
Copyright
Oracle and/or its affiliates. All rights reserved.
t
t
s
ea use
j
(
d
Data
e
s
n
e
o Restore
Directoriestvto
s
Eacases, recovery is performed offline. If you think that only one or two files are missing,
Innmost
Johyou may be tempted to recover only those individual files from the system. But, instead, you
should always recover whole directories because there may be other files that are related to these
files.
If the directories were backed up from the root, you do not need to worry about where to recover
them to. The full path information will be provided to the operating system because it is
contained in the backup. Restore them as the root user, from the root directory, and they will
go back to their correct hierarchies. Do not forget the p switch in the tar or jar command to
get the original owner and group information correct.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Data loss
User error
Malicious attack
Corruption of data
Media failure
Application failure
to
ic
el
l
b
a
e
s
n
e
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Recovery tAfter
vo Disaster
s
a
Eproblem
Ifnthe
was caused by a minor configuration error, the administrator may be able to
h
Jo reverse the steps and remove the problem without a formal recovery. If the problem requires
replacing hardware, restoring full backups is a simple procedure. Recovery is complicated when
you need to relocate some functions to an existing machine. According to the old configuration
(and backups), the functions must be routed to the old name and address of A, but now according
to the new configuration, the functions need to be routed to the new name and address of B.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Recovery of Homes
This applies to recovering a Middleware home, Oracle home, or
Instance home after data loss or corruption:
1. Stop all processes.
2. Make a new full offline backup as a checkpoint
(zip or tar -c).
3. Change directory to the affected home.
4. Use OS copy, tar -x, or unzip commands to restore nse
ice
l
the directories affected.
e
bl
a
r
5. Make a new full offline backup (especially if you
fehave been
s
n
ra point).
performing incremental backups up until-tthis
n
o
6. Restart all processes.
an
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
to
Recovery tof
voHomes
s
Easure that all Fusion Middleware software is stopped so that this is an offline recovery. The
Make
n
Johmost important rule in problem resolution is: Do not make the problem worse. By performing
the two extra backups, you guarantee that you can at least put everything back to the way it was
before you tried to help.
Assume that the last known good backup was sequence number 9. As an example, here is how to
recover a damaged Instance home:
In the Administration Console, shut down all servers including the administration
server:
opmnctl stopall
In SQL*Plus, shut down the database cleanly, that is, using immediate.
lsnrctl stop
tar zcvpf mycheckpoint.tar /u01/app/work
tar zxvpf myinstance09.tar
tar zcvpf myfullbackup10.tar /u01/app/work
lsnrctl start
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
to
l
bname
Restore the files on another host with a different host
a
r
by using templates to extend the domain. nsfe
tra
n
no
a
s ide
a
h
) t Gu
u
d
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
Recovery tof
voa Managed Server
s
a pack command that created the remote managed server can be used to re-create it in
Eoriginal
The
n
Joha recovery. The significant configuration and application files are stored at the administration
server, so when the managed server comes back, it will first refresh all its configuration
information and redeploy all its applications from the administration server.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Enabled
by default
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Recovery tof
vothe Administration Server Configuration
s
a
Eadministration
The
server is required only for making changes to the active configuration; it is
n
h
Jo not required for the normal operation of the managed servers as long as the managed servers are
in Managed Server Independence Enabled mode, which is the default. This allows you time to
recover the administration server without any service outages. As shown in the screenshot, the
heartbeat detected between the administration server and the managed servers is, by default, a
one-minute period. After four minutes of not hearing from the administration server, the
managed servers become independent. After the administration server is fixed, the heartbeats
start up again and the managed servers deactivate their independence, but MSI is still enabled
for a future event. These times can all be changed to suit your particular environment.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
NEW
AdminServer1
192.168.0.2
e
s
n
e
to
ic
el
l
b
a
fe
s
n
a
-tr
n
o
n Managed
Managed
Manageds a
e
a
d
i
h
u
ServerA
ServerB
ServerC
u) nt G
d
e
192.168.0.11
192.168.0.13
de
ss192.168.0.12
u
c
t
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Recovery of a Cluster
If you accidentally lost a member of a cluster or a whole cluster,
you can use several ways to recover it.
+ Most preferable way to recover
Undo the changes in the Change Center.
Reenter the configuration changes that you made.
Use the configuration archive to go back one or two
e
s
versions.
n
ice
l
e
Recover the configuration.
bl
a
r
fe
Recover the domain.
s
n
tra
Recover WebLogic.
n
no
a
Perform a full recovery.
s ide
a
h
u
Least preferable way to recover du)
tG
e den
s
s
c
tu
S
@
l
s
i and/or its affiliates. All rights reserved.
vo 2010,
hOracle
Copyright
t
t
s
e
ea us
j
(
d
to
Recovery tof
voa Cluster
s
Eamethods require stopping the cluster itself using WebLogic Scripting Tool (WLST) or the
All
the
n
JohAdministration Console. The first two methods do not require stopping any other processes,
which means that it can be an online recovery. The remaining methods require stopping all
processes and performing an offline recovery.
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
o
6. Restart the EM Agent.
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
(
d
l
vo
Restoring
OPMN-Managed
Components to a New Computer
t
s
a
Esyntax for the command to update the instance registration is:
The
n
h
opmnctl updateinstanceregistration -adminHost
Jo
to
new_host
This command updates OPMNs instance.properties file with the new host name.
The syntax for the command to update component registration on the new host depends on the
components that you are updating. For example, to update the registration for Oracle Virtual
Directory, use the following command:
opmnctl updatecomponentregistration -Host new_host
-Port nonSSLPort
-componentName ovd1
-componentType OVD
For the targets.xml file located in
<MW_HOME>/user_projects/domains/domain_name/servers/AdminServer/
sysman/state, change the host name to the new host name.
To recover the EM Agent, edit the following files to change the host name:
<ORACLE_INSTANCE>/EMAGENT/emAgnt_instname/sysman/emd/targets.xml
<ORACLE_INSTANCE>/EMAGENT/emAgnt_instname/sysman/config/emd.prop
erties
If the component is Web Cache, you also need to edit the host name in:
<ORACLE_INSTANCE>/config/WebCache/webcache_name/webcache.xml
Oracle WebLogic Server 11g: Administration Essentials 21 - 26
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
What mode must the Middleware software be in to perform a
full backup?
a. Online
b. Offline
c. Either online or offline
d. Neither. A full backup is technically impossible.
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: btvo
s
aconsistent,
E
To
be
the Middleware software must be completely stopped.
n
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
What is another name for an inconsistent backup?
a. Hot
b. Cold
c. Either online or offline
d. Broken. If it is inconsistent, there is something wrong with
it.
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: atvo
as
Inna E
hot backup, the files are inconsistentthat is, some files may have different time stamps
Johand need to be reconciled via a transaction log.
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
When making a TAR backup in UNIX, what is a key point to
remember?
a. Make it from the lowest directory possible, as far from
root as practical.
b. Make sure that you perform the backup signed on as the
owner of the Middleware Home directory.
e
c. Make sure that you preserve the original owner, group,
s
n
ice
and permissions.
l
e
bl
a
r
d. Make sure that all Middleware processes are stopped.
fe
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: ctvo
s
Ea use the p option to preserve the permissions.
InnTAR,
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
The configuration archive is enabled by default.
a. True
b. False
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
Answer: btvo
as to enable the configuration archive by selecting Domain > Configuration > General >
E
You
need
n
h
o
Advanced.
J
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Quiz
What happens if you have a backup administration server?
a. You are allowed to have only one administration server. If
it fails, the managed servers run in MSI mode until your
one administration server comes back.
b. It runs simultaneously with the primary administration
server in a load-sharing mode.
c. It can run in a warm standby keeping itself in sync with the nse
ice
main administration server.
l
e
bl the
a
r
d. It must be in cold standby and you have to sync
it
with
fe
s
n
main administration server manually.
tra
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
to
Answer: dtvo
ashave only one administration server at a time; the backup administration server must be
E
You
can
n
h
o
cold.
J
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Summary
n
h
o
J
ns
a
r
t
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Practice 21 Overview:
Backing Up and Restoring Configuration and Data
This practice covers the following topics:
Backing up an Oracle WebLogic domain
Backing up an Oracle HTTP Server installation
Restoring an Oracle WebLogic domain
Restoring an Oracle HTTP Server installation
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@
is S
v
Copyright
2010,th
Oracle and/or its affiliates. All rights reserved.
t
s se
a
e
j
u
d(
o
Practice 21
Backing Up and Restoring Configuration and Data
vOverview:
t
s
a
See
Appendix A for the complete steps to do the practice.
nE
Joh
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Index
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
A
Apache 2-9, 4-16, 4-26, 6-5, 6-20, 10-2, 10-10, 10-11, 16-11, 16-17,
16-21, 18-15, 21-5
API 3-6, 3-8, 3-14, 3-15, 3-18, 3-19, 3-22, 7-14, 10-8, 10-11,
12-18, 13-30, 14-4, 14-7, 14-8, 15-11, 16-5, 17-9, 19-6
autodeploy 5-35, 11-2, 11-11, 11-18, 11-30, 11-31, 11-48
B
backup 1-2, 1-7, 2-4, 7-16, 18-10, 18-13, 18-19, 18-40, 19-22, 19-23, 21-1 -- 21-3,
21-5 -- 21-16, 21-18, 21-19, 21-21, 21-24, 21-27 -- 21-29, 21-31, 21-32
BEA 4-16, 4-21, 4-23, 6-9, 6-19, 10-16
e
s
n
e
C
CA 19-9, 19-10, 20-5, 20-8, 20-10, 20-12, 20-13, 20-14, 20-18
lic
e
l
cache 2-4, 3-25, 5-28, 5-47, 9-16, 9-18, 12-21, 12-22, 12-23, 12-31, rab
fe
s
12-32, 18-25, 18-44, 19-23, 20-12, 20-32, 21-5
n
tra
CCI 3-22
n
o
n
a
CLI 5-46
s ide
a
h
u
cluster 1-4, 3-26, 5-6, 5-8, 5-9, 5-17, 5-18,
)5-19, 5-20,
G
u
t
d
n 9-7, 9-8, 9-41,
e8-18,d8-32,
7-11, 7-16, 7-35, 8-8, 8-14, 8-15,
e
s
s
c14-22,S15-13,
tu 15-17, 15-19, 15-20, 15-21, 15-23,
10-17, 10-25, 11-43, 13-4,
@
l
s
vo15-38,
hi 16-3, 16-4, 16-5, 16-6, 16-7, 16-9,
t
t
s
15-24, 15-29, 15-30,
16-2,
e
a us
e16-13,
j
(
16-10, 16-12,
16-15 -- 16-20, 16-22 -- 16-35, 17-2 -- 17-23,
ld
o
v
st 17-27, 18-2 -- 18-7, 18-9 -- 18-16, 18-18 -- 18-21, 18-23, 18-24,
a17-26,
n
h
o
J
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
C
Cluster 1-4, 1-5, 5-5 -- 5-8, 5-11, 5-15, 5-17 -- 5-19, 5-32, 6-15, 7-33, 8-8, 8-14, 8-18,
10-17, 10-23, 10-24, 11-4, 11-10, 11-13, 13-15, 14-12, 16-3, 16-4, 16-7 -- 16-11,
16-12, 16-13, 16-14 -- 16-18, 16-20, 16-24, 16-25, 16-26, 16-27, 17-1, 17-3, 17-7,
17-9 -- 17-17, 17-19, 17-20, 17-25, 18-4 -- 18-8, 18-10, 18-11, 18-13, 18-18, 18-20,
18-22 -- 18-24, 18-32, 18-38, 18-40, 21-25, 7-5, 9-5, 9-7, 9-8, 16-28, 16-29, 16-34,
17-5
Coherence 2-11, 4-5, 4-9, 4-15, 4-25, 15-36
Commons 10-5, 10-8, 10-11
CORBA 3-8, 3-18
D
deploy 1-2, 2-8, 4-27, 5-8, 5-35, 7-5, 11-2, 11-4, 11-6, 11-7,
11-9, 11-10, 11-13, 11-15, 11-16, 11-22 -- 11-27,
le
b
11-31, 11-33, 11-46 -- 11-48, 12-2, 12-3, 12-5, 12-7, 12-28, 12-29,
a
r
e
s
n
e
lic
sf13-28,
12-34 -- 12-36, 12-40, 13-4, 13-5, 13-15, 13-16, 13-18, 13-20,
n
a
-tr 15-38, 16-12,
13-31, 13-39, 14-5, 14-6, 14-12, 14-19, 14-22, 15-18,
15-21,
n
o
n
16-32, 17-2, 18-2, 18-4, 18-5, 18-6, 19-14, 19-27
sa
a
de
ui
Derby 4-9, 4-16, 4-25, 4-26, 5-40, 5-51 u) h
G
d ent
DMZ 11-35, 16-12, 16-16, 16-18 se
d
s
u
c
t
S 9-13, 12-13, 14-18,
DNS 3-15, 5-9, 5-18, 8-4, 8-10,
l@ 8-19,s 9-10,
vo
t17-7, 17-12,
th 18-38
s
16-16, 17-4, 17-6,
e
a
s
je
u
DTDs 12-32 ld (
E
v
ast
E
n
EAR
5-35, 12-7, 12-27, 12-30, 12-32 -- 12-35, 13-26, 13-27, 13-36, 15-18, 15-19, 15-21,
h
Jo
19-29
Eclipse 3-10, 11-5, 13-8, 13-22
EIS 3-22
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
E
EJB 1-3, 3-8, 3-13, 3-15, 3-23, 3-30, 4-5, 5-18, 5-35, 12-3,
12-5, 12-10, 12-17 -- 12-31, 12-33, 12-34, 12-35, 12-38, 13-4,
13-27, 13-30, 16-3, 16-4, 16-6, 16-8, 16-12 -- 16-18, 16-30, 16-34,
17-7, 18-2, 18-3, 18-8, 18-19, 18-32 -- 18-35, 18-37 -- 18-41, 18-43,
18-44, 19-14, 19-15, 19-26, 19-29, 19-30, 20-7
Extend 2-8, 2-10, 5-10, 5-12, 5-22, 6-4, 6-5, 6-7 , 6-11 -- 6-13, 6-22, 6-17, 7-23, 7-26,
21-22
F
FMW 2-9, 2-13, 4-7, 5-11, 8-24
G
GUI 1-5, 3-6, 4-2, 4-3, 4-4, 4-6, 4-13, 4-14, 4-24, 5-5,
5-46, 6-6, 8-7, 14-37
H
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
to
I
Install 1-4, 2-12, 4-2, 4-4, 4-31, 6-20, 6-22, 8-24, 11-7,
11-9, 11-12, 11-13, 13-12, 13-15, 20-10, 21-24
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
J
JAAS 3-8, 3-20, 19-6
Jakarta 10-11
JAR 1-2, 3-12, 4-15, 4-16, 4-17, 4-22, 4-26, 4-29, 5-34, 5-35,
5-39, 5-40, 6-4, 6-8, 6-17, 7-16, 7-26, 7-32, 8-26, 11-6, 11-32,
11-47, 12-6, 12-8, 12-27, 12-33, 12-34, 19-29, 21-15
JCA 3-22, 5-39, 13-26, 13-30
JCP 3-6, 3-8
JDBC 1-7, 2-8, 3-8, 3-14, 3-15, 3-17, 3-21, 3-22, 4-16, 4-17,
e
s
n
e
ic
el
l
b
a
5-11, 5-12, 5-15, 5-21, 5-22, 5-23, 5-24, 5-25, 5-26, 6-5, 6-13, r
e
f12-32,
s
6-15, 6-18, 8-21, 10-4, 10-6, 11-5, 11-22, 12-26, 12-28, 12-29,
n
ra
13-5, 13-26, 13-30, 14-1 -- 14-14, 14-16 -- 14-20, on-t
a n14-36,
14-22, 14-24, 14-26, 14-27, 14-29, 14-30, 14-33,
s
e 14-37, 15-7, 15-9,
a
d
i
h
u 18-2, 18-9, 18-16,
15-15, 15-36, 15-39, 15-40, 16-4, 16-6,
16-12,
) 16-11,
G
u
t
d
n
e 21-12
18-23 -- 18-28, 18-48, 18-49, s
19-33,
e
d
s
c
tu
S
JDeveloper 3-10, 6-2, 6-16,l@
6-17, 6-26,
11-5, 13-8, 13-22, 19-5
s
o thi
v3-19,
t
s
JMS 1-3, 1-7, 3-8, 3-15,
e4-5, 5-11, 5-12, 5-15, 5-22,
a
s
e
j
u
5-27, 5-28,
d (5-32, 6-5, 6-13, 6-18, 10-4, 10-6, 10-19, 11-5, 11-22,
l
o
stv 12-28, 12-29, 12-32, 13-26, 13-30, 13-39, 15-1 -- 15-4,
a12-26,
n
h
o
J
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
J
JRMP 3-23
jsf 11-24
JSTL 3-11, 11-24
JTA 3-8, 3-18, 8-21, 15-11, 15-23, 16-5
JTS 3-18, 10-4, 13-30
JWS 12-14
Jython 2-10, 6-18, 7-22 -- 7-25, 7-30, 11-26
L
LDAP 3-15, 5-13, 5-30, 5-51, 7-16, 12-15, 14-35, 19-12, 19-22, 19-23,
19-24, 19-29, 21-11, 21-12
log4j 10-2, 10-8, 10-11
ic
el
l
b
a
M
er
f
s
MBean 2-10, 3-21, 7-27, 7-35, 7-36, 7-39, 8-5, 8-6, 8-14, 9-9, an
-tr
n
10-7, 11-33, 14-24, 17-17, 18-31
o
a n e
MIME 3-9, 11-36, 11-38, 12-10, 12-11
s
a uid
h
)
mod_wl_ohs 2-9, 11-42, 11-43, 16-20, 16-21,
16-22,
u nt G17-21, 18-15
d
e
MSI 8-2, 8-3, 8-23, 8-27, 8-28, 8-29,
de 8-38, 9-5,
ss8-30,tu8-37,
c
9-18, 21-23, 21-31 ol@
is S
v
h
t
t
s s16-25
e -- 16-29, 16-32,
multicast 5-17, 5-18,
10-25,
a
e
j
u
(
17-4, o
17-6,
ld 17-10, 17-11, 17-13, 17-19, 17-25
N
e
s
n
e
st
a
E
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
P
plug-in 3-26, 11-43, 16-3, 16-4, 16-7, 16-17, 16-19, 16-20, 16-21,
16-22, 18-9, 18-10, 18-12, 18-14, 18-15
PointBase 4-9, 4-11, 4-16, 4-18, 4-22, 4-26, 5-30, 13-5, 14-9,
14-26, 14-28
proxies 3-25, 5-19, 16-23
proxy 2-9, 3-25 -- 3-27, 4-16, 4-17, 5-11, 5-19, 5-20, 7-6,
11-43, 16-3, 16-4, 16-7, 16-12, 16-17, 16-18, 16-19, 16-20, 16-23, 17-4,
17-5, 17-16, 17-21, 18-9, 18-10, 18-12, 18-14 -- 18-16, 18-23, 18-28, 20-6
16-7, 16-9, 16-17 -- 16-21, 16-23, 17-21, 18-12,
e
s
n
e
R
RAC 14-9, 14-18, 21-11
ic
el
l
b
a
h
Sn
o
J
SAML 5-31
SCSI 21-7
setDomainEnv 4-20, 4-21, 5-44, 6-10, 7-29
SOA 2-3, 2-4, 2-5, 2-7, 2-12, 2-13, 6-2, 6-11, 6-16, 6-17,
6-20, 6-21, 6-22, 6-26, 19-5, 21-4, 21-5, 21-6, 21-11
SOAP 2-3, 3-23, 3-24, 12-14
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
S
SQL 2-8, 5-12, 5-25, 5-26, 5-30, 5-31, 6-6, 14-2, 14-4, 14-5,
14-9, 14-16, 15-39, 18-27
sqlplus 5-25, 21-13
SSL 5-9, 5-11, 5-16, 7-6, 7-27, 7-29, 7-34, 7-36, 8-4, 8-7,
8-15, 9-13, 9-21, 9-23, 9-34, 10-26, 11-23, 11-40, 18-15, 19-9, 19-10,
19-34, 20-2 -- 20-8, 20-10, 20-14, 20-15, 20-18 -- 20-21, 20-24, 20-34, 20-37,
20-38
T
tar 21-13, 21-14, 21-16, 21-19, 21-21, 21-22
template 2-13, 4-2, 4-16, 5-10, 5-11, 5-12, 5-21, 5-22, 5-25, 5-26,
5-33, 5-43, 5-45, 5-53, 6-2 -- 6-8, 6-13 -- 6-17, 6-24 -- 6-27, 7-26, 7-28,
7-32, 7-33, 8-24 -- 8-26, 12-6, 13-6, 13-8, 13-11, 15-26, 15-29, 21-22ble
TopLink 4-25
ra
e
f
ns
lic
e
s
n
e
tra
n
o
n
a
undeploy 11-7, 11-15, 11-21 -- 11-24, 13-2, 15-18,
s 16-12
e
a
d
i
h
u 17-25, 18-45
unicast 5-17, 16-25, 16-26, 16-29, 16-32,u17-10,
) 17-19,
G
t
d
n 7-39, 11-5,
e7-26,d7-36,
update 5-7, 6-2, 6-5, 7-12, 7-17, 7-18,
e
s
s
c 11-22,S12-26,
tu 15-6, 15-38, 16-27, 17-18,
11-6, 11-14 -- 11-16, 11-21,
@
l
s
o thi
v21-26
t
s
18-7, 18-11, 18-38,
a use
e
j
(
URL 5-16, 5-23,
ld 5-25, 6-13, 8-4, 8-11, 11-2, 11-41, 12-11, 12-12,
o
v
12-13,
st 12-16, 13-34, 14-5, 14-13, 14-20, 14-25, 14-26, 16-20, 17-7, 18-12,
a
E 19-15, 19-32, 20-6
n
h
Jo
U
W
WAR 3-12, 5-35, 12-4, 12-5, 12-7, 12-8, 12-27, 12-34, 12-35, 13-27,
13-30
WLDF 7-8, 8-20, 8-21, 10-25, 11-22
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
W
WLS 1-7, 2-5, 2-11, 3-7, 3-15, 3-18, 3-23, 3-29, 4-7, 4-9,
4-10, 4-23, 4-29, 5-2, 5-45, 5-52, 6-20, 7-12, 7-14, 7-23, 7-26,
7-31, 7-33, 8-21, 8-24, 8-25, 8-32, 8-33, 9-4, 9-10, 9-13, 9-21,
10-1, 10-2, 10-11, 10-14, 10-16, 10-26, 10-29, 10-30, 11-4, 11-8, 11-31,
11-33, 11-36, 11-43, 12-6, 12-18, 12-20, 12-28, 13-19, 13-27, 13-33, 13-36,
14-9, 14-32, 15-9, 15-10, 15-13, 15-15, 15-22, 16-20, 16-22, 16-23, 16-31,
18-13, 18-15, 18-20, 18-31, 18-43, 19-2, 19-3, 19-5, 19-6, 19-7, 19-8,
19-11, 19-13, 19-16, 19-17, 19-19, 19-22, 19-26, 19-31, 19-36, 19-38, 19-40,
19-41, 20-2, 20-6, 20-7, 20-15, 20-16, 20-17, 20-19, 20-23, 20-24, 20-37
WLST 1-6, 2-10, 4-16, 5-2, 5-10, 5-39, 5-41, 5-42, 5-52, 6-4,
e
s
n
6-5, 6-6, 6-7, 6-18, 6-25, 7-1, 7-3, 7-14, 7-18, 7-22, 7-23,
ice
l
e
7-25 -- 7-32, 7-34, 7-36, 7-37, 7-39, 7-43 -- 7-45, 8-2, 8-4 -- 8-7, 8-14,
bl8-15,
ra
8-35, 9-2, 9-5, 9-9, 9-14, 9-15, 9-39, 9-40, 9-44, 10-5, 10-13,sfe
n
tra13-39,
11-2, 11-8, 11-9, 11-25, 11-26, 11-27, 11-33, 11-48, n
13-6,
14-6,
o
n 21-25
14-16, 14-24, 14-37, 15-18, 17-8, 17-9, 17-18,a19-36,
s ide
a
h
) t Gu
u
d
n
e d15-40
XA 5-24, 14-9, 14-16, 14-17, 15-22,s15-23,
e
s
c
tu
S
XML 1-3, 2-3, 2-8, 3-6, 3-24,
4-4, 4-15
-- 4-17, 5-8, 6-9, 6-10, 6-19,
@
l
s
o thi
v7-21,
t
s
7-16 -- 7-18, 7-20,
e7-32, 7-35, 10-5, 10-11, 10-13, 11-5, 12-2, 12-4, 12-6,
a
s
e
j
u
12-7, 12-10,
d ( 12-12, 12-18, 12-21, 12-27, 12-29, 12-32, 13-4, 13-14, 13-37, 14-6,
l
o
14-14,s15-9,
tv 15-19, 15-21, 21-12
a
E
Zn
h
Jo zip 11-5, 21-21
X
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Glossary
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
ic
fe
s
n
a
r
E
vo
t
s
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
el
l
b
a
e
s
n
e
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
Glossary/Acronyms
n
h
o
J
ACID
ACK
AsyncRep
API
BPEL
CA
CGI
CLI
CLV
CSR
CSS
CMO
COM
CORBA
DBA
DCOM
DD
DDL
DMZ
DNS
DoS
DSA
DTD
EAR
EE
EJB
FIFO
FMW
GMD
GUI
HTML
HTTP
IIOP
IIS
fe
s
n
a
Glossary - 3
e
s
n
e
ic
el
l
b
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
J2SDK
JAAS
JACC
JAR
Java EE
Java SE 6
JAX-WS
JAZN
JCA
JCE
jCOM
JDBC
JDK
JKS
JMS
JMX
JNDI
JPA
JPS
JSR
JSSE
JSTL
JTA
JVM
JWS
LDAP
LDIF
LVC
MIME
MSI
NES
NIC
ic
e
s
n
e
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
Glossary - 4
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
n
h
o
J
O/R
OAAM
OASIS
OBE
ODBC
OEPE
OHS
OID
OOTB
OPMN
OPSS
ORB
OS
OTN
PAM
PKI
PTP
QoS
RAC
RAR
RBAC
RCU
RMAN
RMI
RSH
SAF
SAML
SDK
SHA
SLA
SNMP
SOA
SOAP
SQL
SSH
SSL
SSPI
e
s
n
e
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
object-relational
Oracle Adaptive Access Manager
Organization for the Advancement of Structured Information Standards
Oracle By Example. Self-paced Web-based training on OTN.
Open Database Connectivity
Oracle Enterprise Pack for Eclipse
Oracle HTTP Server
Oracle Internet Directory
Out Of The Box (by default; without modification)
Oracle Process Manager and Notification Server
Oracle Platform Security Services
Object Request Broker
Operating system (examples: Windows, Linux)
Oracle Technology Network. http://otn.oracle.com
Pluggable Authentication Module
Public Key Infrastructure
Point To Point
Quality of Service
Real Application Clusters (for multihost databases)
Resource Adapter Archive
Role-Based Access Control (part of JPS)
Repository Creation Utility
Recovery Manager (for the database)
Remote Method Invocation
Remote Shell (as opposed to SSH)
store-and-forward
Security Assertion Markup Language
Software development kit (programming tools)
Secure Hash Algorithm
service-level agreements
Simple Network Management Protocol
Service-Oriented Architecture
Simple Object Access Protocol
Structured Query Language
Secure Shell (as opposed to RSH)
Secure Sockets Layer
Security Services Provider Interface
Glossary - 5
to
Unauthorized reproduction or distribution prohibited Copyright 2011, Oracle and/or its affiliates
T3
n
h
o
J
T3S
TAR
TCP
TLS
TTL
URL
VM
WAN
WAR
WLDF
WLS
WLST
WSIT
XA
XACML
XML
ic
el
l
b
a
fe
s
n
a
-tr
n
o
a n e
s
a uid
h
)
du ent G
e
ss tud
c
ol@ this S
v
t
s se
a
e
j
u
d(
vo
t
s
a
e
s
n
e
Glossary - 6
to