OracleWebLogicServer 12c Admin 1 StudentGuide Vol 2
OracleWebLogicServer 12c Admin 1 StudentGuide Vol 2
OracleWebLogicServer 12c Admin 1 StudentGuide Vol 2
nse
li c e
ble
fe r a
ns
tra Server 12c:
Oracle WebLogic
o n -
an
Administration I
) has ideฺ
c G uGuide – Volume 2
om Student
ฺ t
@ ge uden
n d hi is St
i ฺ gra se th
shm to u
( lak
i G
m
La ksh
D80149GC10
Edition 1.0
July 2013
D82758
Authors Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Elio Bonazzi This document contains proprietary information and is protected by copyright and
TJ Palazzolo other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
Steve Friedberg in any way. Except where your use constitutes "fair use" under copyright law, you
may not use, share, download, upload, copy, print, display, perform, reproduce,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
publish, license, post, transmit, or distribute this document in whole or in part without
Technical Contributors the express authorization of Oracle.
and Reviewers
The information contained in this document is subject to change without notice. If you
Mark Lindros find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
Will Lyons warranted to be error-free.
Serge Moiseev
Restricted Rights Notice
Matthew Slingsby
Angelika Krupp If this documentation is delivered to the United States Government or anyone using
the documentation on behalf of the United States Government, the following notice is nse
Kevin Tate applicable:
li c e
Takyiu Liu
bl e
Jenny Wongtangswad
U.S. GOVERNMENT RIGHTS
fe r a
The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or
Juan Quezada an s
disclose these training materials are restricted by the terms of the applicable Oracle
Radek Felcman n - t r
license agreement and/or the applicable U.S. Government contract.
Matt Heimer
Trademark Notice
a no
Saskia Nehls s of Oracle
haowners.
Oracle and Java are registered trademarks
e ฺ and/or its affiliates. Other names
Juan Adauco Quezada m Gui)
may be trademarks of their respective d
c o
g eฺ dent
Editors
d h i@ Stu
Aju Kumar
r a n this
Malavika Jinka
m iฺg use
a k sh to
Graphic( l
i G
s hmSeema Bopaiah
L a k
Publishers
Giri Venugopal
Jayanthy Keshavamurthy
Contents
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
1 Course Overview
Objectives 1-2
Target Audience 1-3
Introductions 1-4
Course Schedule 1-5
Course Practices 1-7
nse
Classroom Guidelines 1-8
li c e
For More Information 1-9 ble
Related Training 1-10 fe r a
ans
n - t r
2 WebLogic Server: Overview
Objectives 2-2 a no
Distributed Systems 2-3 ) has ideฺ
ฺ c om t Gu
Java Platform Enterprise Edition 2-4
Oracle WebLogic Server 2-5
@ ge uden
JVM 2-7
n d hi is St
i ฺ gra se th
(Possible) System Architecture 2-8
s h m to u
WebLogic Server Domain 2-9
( lak
Administration Server 2-10
iii
3 Installing and Patching WebLogic Server
Objectives 3-2
Determining Supported System Configurations 3-3
Ensuring Your System Meets Requirements 3-4
When Not All FMW Is the Same Version 3-5
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
@ ge uden
4 Creating Domains
n d hi is St
Objectives 4-2 ra th
Domain Planningi ฺ gQuestions
s e 4-3
hm to uVirtual Host Name 4-6
VirtualkIPsAddress and
G (la Mode: Development 4-7
Domain
mi Domain Mode: Production 4-8
a k sh Domain Creation Tools 4-9
L Domains Are Created from Templates 4-10
Creating Domains 4-11
Where to Place the Domain 4-12
Creating a Domain with the Configuration Wizard 4-13
Admin Server Listen Address 4-20
Creating a Domain with the Configuration Wizard 4-21
Domain File Structure 4-29
Creating a Domain to Support FMW Components 4-30
The Domain on Other Hardware 4-32
Creating the Domain Archive: Pack 4-33
Using the Domain Archive: Unpack 4-34
iv
Quiz 4-35
Summary 4-37
Practice 4-1 Overview: Creating a New Domain 4-38
Practice 4-2 Overview: Copying a Domain to a New Machine 4-39
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
5 Starting Servers
Objectives 5-2
WebLogic Server Life Cycle 5-3
Starting WebLogic Server with a Script 5-5
Creating a Boot Identity File 5-6
Stopping WebLogic Server 5-7
nse
Suspend and Resume 5-8 e
li c
Customizing Standard Scripts 5-9
ble
WebLogic Server Options 5-10
fe r a
Changing the JVM 5-12
ans
JVM Options 5-13 n - t r
Modifying the CLASSPATH 5-14 a no
WebLogic Server Startup Issues 5-17
) has ideฺ
Failed Admin Server 5-18
ฺ c om t Gu
ge uden
Restarting a Failed Admin Server: Same Machine 5-19
@
n d hi is St
Restarting a Failed Admin Server: Different Machine 5-20
i ฺ gra se th
Restarting a Failed Managed Server: Same Machine 5-21
Restarting a Failed Managed Server: Different Machine 5-22
s h m to u
( lak
Quiz 5-23
Summary 5-25
miG Practice 5-1 Overview: Starting and Stopping Servers 5-26
a k sh
L 6 Using the Administration Console
Objectives 6-2
Accessing the Administration Console 6-3
Administration Console Login 6-4
Basic Navigation 6-5
Tabular Data 6-6
Customizing a Table 6-7
Admin Console Preferences 6-8
Advanced Console Options 6-10
Administration Console Change Center 6-12
Admin Console: Creating Domain Resources 6-13
Creating a Resource Example: New Server 6-14
Modifying a Resource Example: Server 6-17
Admin Console: Monitoring Domain Resources 6-19
v
Admin Console: Controlling Domain Resources 6-20
Enterprise Manager Cloud Control 6-21
Quiz 6-23
Summary 6-25
Practice 6-1 Overview: Using the Administration Console for Configuration 6-26
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
7 Configuring JDBC
Objectives 7-2
JDBC: Overview 7-3
WebLogic JDBC Drivers 7-4
Global Transactions: Overview 7-5
nse
Two-Phase Commit 7-6 e
li c
JDBC Data Source 7-7
ble
Java Naming and Directory Interface (JNDI) 7-9
fe r a
JNDI Duties of an Administrator 7-10
ans
Deployment of a Data Source 7-11 n - t r
Targeting of a Data Source 7-12 a no
Types of Data Sources 7-13
) has ideฺ
ฺ c om t Gu
Creating a Generic Data Source 7-14
ge uden
Non-XA Driver Transaction Options 7-17
@
n d hi is St
Creating a Generic Data Source 7-18
i ฺ gra se th
Connection Pool Configuration 7-21
Connection Properties 7-23
s h m to u
( la k
Testing a Generic Data Source 7-24
Oracle Real Application Clusters: Overview 7-25
miG GridLink Data Source for RAC 7-26
a k sh GridLink , FCF, and ONS 7-27
L GridLink and Services 7-28
GridLink and Single Client Access Name (SCAN) 7-29
Creating a GridLink Data Source 7-30
Common Data Source Problems 7-36
Basic Connection Pool Tuning 7-40
Quiz 7-43
Summary 7-45
Practice 7-1 Overview: Configuring a JDBC Data Source 7-46
8 Monitoring a Domain
Objectives 8-2
WebLogic Server Logs 8-3
WebLogic Server Log Locations 8-5
Log Message Severity Levels 8-6
vi
Understanding Log File Entries 8-8
Accessing the Logs from the Admin Console 8-9
Configuring Server Logging 8-11
Error Messages Reference 8-14
Log Filters 8-15
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
9 Node Manager
Objectives 9-2
Node Manager 9-3
Two Types of Node Manager 9-5
Node Manager Architecture: Per Machine 9-6
Node Manager Architecture: Per Domain 9-7
How Node Manager Starts a Managed Server 9-8
How Node Manager Can Help Shut Down a Managed Server 9-9
Configuration Wizard and Node Manager 9-10
Configuring the Java-Based Node Manager 9-12
Configuring Server Start and Health Monitoring Parameters 9-13
vii
Configuring the Java-Based Node Manager 9-15
Other Node Manager Properties 9-17
Node Manager Files 9-18
Enrolling Node Manager with a Domain 9-21
When Not to Use nmEnroll() 9-22
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
viii
The Grinder Proxy 10-40
Agent Properties 10-41
The Grinder Console 10-42
Finding Bottlenecks 10-43
Correcting Bottlenecks 10-44
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Quiz 10-46
Summary 10-48
Practice 10-1 Overview: Deploying an Application 10-49
Practice 10-2 Overview: Load Testing an Application 10-50
ix
12 Clusters
Objectives 12-2
Cluster: Review 12-3
Benefits of Clustering 12-5
Basic (Single-Tier) Cluster Architecture 12-6
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
iG
m13 Clusters
a k sh Objectives 13-2
L A Cluster Proxy for a Web Application Cluster 13-3
Proxy Plug-Ins 13-4
Oracle HTTP Server (OHS) 13-5
Installing and Configuring OHS (Part of Oracle Web Tier): Overview 13-7
Configuring OHS as the Cluster Proxy 13-8
httpd.conf and mod_wl_ohs.conf 13-9
mod_wl_ohs.conf 13-10
Some Plug-in Parameters 13-11
Starting and Stopping OHS 13-13
Verifying that OHS Is Running 13-15
Successful Access of OHS Splash Page 13-16
Failover: Detecting Failures and the Dynamic Server List 13-17
HTTP Session Failover 13-19
Configuring Web Application Session Failover: weblogic.xml 13-20
x
In-Memory Session Replication 13-23
In-Memory Replication: Example 13-24
Configuring In-Memory Replication 13-27
Machines 13-28
Secondary Server and Replication Groups 13-29
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
14 Clusters miฺ
gra se th
s h t o u
( lak Cluster Communication 14-3
Objectives
Review:
14-2
xi
Cluster Member Uniformity 14-28
Session Failover Issues 14-29
Quiz 14-30
Summary 14-31
Practice 14-1 Overview: Configuring a Replication Channel 14-32
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
15 Transactions
Objectives 15-2
Transactions and ACID 15-3
Global Transactions, 2PC, and XA 15-5
WebLogic Server as a Transaction Manager 15-6
nse
Transaction States when Committing 15-7 e
li c
Transaction States when Rolling Back 15-8
ble
Java Transaction API (JTA) 15-9
fe r a
Configuring Transactions 15-10
ans
JTA Configuration Options 15-11 n - t r
WebLogic Extension of JTA 15-14 a no
JDBC Reminder 15-15
) has ideฺ
ฺ c om t Gu
Logging Last Resource and Performance 15-16
LLR: Example 15-17
@ ge uden
n d hi is St
Transaction Log (TLog) 15-18
i ฺ gra se th
Configuring the Default Store 15-19
Configuring a JDBC Transaction Log 15-20
s h m to u
( la k
Comparing File Store to JDBC Store 15-21
Monitoring Transactions 15-22
miG Viewing Transaction Statistics for a Resource 15-24
a k sh Forcing a Commit or Rollback 15-26
L Troubleshooting Transactions 15-29
Quiz 15-31
Summary 15-33
Practice 15-1 Overview: Configuring Transaction Persistence 15-34
xii
Security Customization Approaches 16-12
Authentication Providers 16-13
Available Authentication Providers 16-14
Lightweight Directory Access Protocol (LDAP) 16-16
LDAP Structure 16-17
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
i ฺ gra se th
Auditing Provider 16-36
Security Audit Events 16-37
s h m to u
( lak
Configuring the Auditing Provider 16-38
Security Realm Debug Flags 16-39
miG Common LDAP Issues 16-40
a k sh Quiz 16-41
L Summary 16-44
Practice 16-1 Overview: Configuring an Authentication Provider 16-45
xiii
Recovery Operations 17-16
Directories to Restore 17-19
Recovery After Disaster 17-20
Recovery of Homes 17-21
Recovery of a Managed Server 17-22
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
xiv
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Objectives
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
nse
host1:8001 ServerA li c e
ble
fe r a
ans
host2:8001
n - t r
no
ServerB
a
host3:8001
h ideฺ
a s
)
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
A typical production machine hosts multiple WebLogic Server instances and also is installed
m iG
with multiple network interface cards (NICs). In this scenario, it may be desirable to explicitly
a k sh associate each server with its own dedicated interface or interfaces. For example, each NIC
L could then be tuned to support different levels of performance to match the expected load on
the assigned server instance. This approach also gives administrators the flexibility to bind
multiple servers on the same machine to the same port number.
nse
li c e
HTTP ble
host1:8001 fe r a
ServerA ans
n - t r
EJB/JMS
host1:9001
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
WebLogic Server allows a single server instance to bind to multiple ports and allows
m iG
administrators to define different network settings for each port. By using this approach, you
a k sh can dedicate each port to a different protocol, such as HTTP(S) or T3(S). Also, because each
L port can be brought up and down independently, administrators gain additional flexibility in
how they can perform server maintenance.
traffic.
– You can disable client access while retaining administrative
access for server maintenance or troubleshooting.
Admin SSL e
console Admin
c e ns
host1:9001
Server e li
r a bl
SSL
s fe
- t r an
host2:9001 n o n
a
Managed
)has Server
deฺ
c o
host2:8001
m G ui
g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
While maintaining or troubleshooting a production server, it is often desirable to disable all
m iG
incoming application requests. However, a server’s default network configuration implies that
a k sh all traffic run on the same port. Therefore, if the port were closed, all remote administration
L tools such as the admin console or WLST would also not be able to connect to the server.
WebLogic Server supports a domain in which all servers use a separate SSL port that
accepts only administration requests. The use of dedicated administration ports enables you
to:
• Start a server in standby state: This allows you to administer a server, whereas its
other network connections are unavailable to accept client connections.
• Separate administration traffic from application traffic in your domain: In
production environments, separating the two forms of traffic ensures that critical
administration operations (starting and stopping servers, changing a server’s
configuration, and deploying applications) do not compete with high-volume application
traffic on the same network connection.
• Administer a deadlocked server instance: If you do not configure an administration
port, administrative commands such as THREAD_DUMP and SHUTDOWN will not
work on deadlocked server instances.
ServerB
Cluster e
host2:8111
c e ns
e li
host1:8111 r a bl
s fe
ServerA
host3:8111
- t r an
n no ServerC
a
host1:8001
) h as deฺ
c o m host3:8001 G ui
g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
Similar to administration ports, the servers within a cluster can also use separate ports
m iG
dedicated to internal cluster communication. Administrators have the option to configure these
a k sh clusters or “replication” ports to use either a standard or a secure (SSL) protocol.
L In general, ports on a server that can be used to send internal messages to other servers in
the same domain are called “outgoing” ports. Ports that are not enabled for “outgoing” are
used solely to process incoming client requests.
nse
1 li c e
bl e
2 fe r a
ans
3 n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To configure a network channel for an existing server, perform the following steps:
m iG
a k sh 1. After locking the configuration, select the server, and then click its Protocols tab.
L 2. Click the Channels subtab.
3. Click New.
4. Enter a name for the channel, select the protocol it will accept or use, and click Next.
For administrative channels, select the admin protocol. For cluster channels, select the
“cluster-broadcast” or “cluster-broadcast-secure” protocol.
6
nse
li c e
bl e
fe r a
an s
n - t r
7
a no
) hasCanidthis eฺchannel be used for
c om t Ginternal u communication with
ฺ
ge uden other servers in this domain?
@
hi is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
5. Enter a listen address and listen port that this channel binds to, and click Next. If an
m iG
address is not supplied, the address of the default channel is used.
a k sh 6. Select the check boxes you want and click Next. By default, the new channel will be
L enabled and automatically bind to its address and port. If instead you want to enable it
manually at a later time, deselect the Enabled check box. Other options include:
- Tunneling Enabled: Select this to enable HTTP tunneling. It is disabled by
default. Under the HTTP protocol, a client may only make a request, and then
accept a reply from a server. The server may not voluntarily communicate with the
client, and the protocol is stateless, meaning that a continuous two-way connection
is not possible. WebLogic HTTP tunneling simulates a T3 connection via the HTTP
protocol, overcoming these limitations. Note that the server must also support both
the HTTP and T3 protocols to use HTTP tunneling.
- HTTP Enabled for This Protocol: Specifies whether HTTP traffic should be
allowed over this network channel. HTTP is generally required with other binary
protocols for downloading stubs and other resources. Note that this is only
applicable if the selected protocol is not HTTP or HTTPS.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Both the default and custom network channels support various general and protocol-specific
m iG
network settings. If not configured, custom channels inherit their network settings from the
a k sh default channel. These settings include:
L • Cluster Address: The address this network channel uses to generate cluster-aware
EJB stubs for load balancing and failover in a cluster
• Accept Backlog: The number of backlogged, new TCP connection requests that this
network channel allows
• Maximum Backoff Between Failures: The maximum wait time (in seconds) between
failures while accepting client connections
• Idle Connection Timeout: The maximum amount of time (in seconds) that a connection
is allowed to be idle before it is closed by this network channel. This timeout helps guard
against server deadlock through too many open connections.
• Maximum Message Size: This maximum attempts to prevent a denial of service attack
whereby a caller sends very large messages, thereby keeping the server from
responding quickly to other requests
• Channel Weight: A weight to give this channel when multiple channels are available for
internal server-to-server connections
2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
1 4
nse
Overall Statistics for each li c e
statistics active connection bl e
fe r a
Runtime statistics are available for each channel:-tra
ns
• Number of active connections n on
s a
• Messages sent/received ) h ideฺ
a
c o m Gu
• Bytes sent/received ge ฺ ent
@ Stud
h i
r a nd this
m ฺg u© s2013,
iCopyright e Oracle and/or its affiliates. All rights reserved.
h to
1. ( l aks
Select a server.
m iG
a k sh 2. Select Protocols > Channels.
L 3. Select a channel.
4. Click the Monitoring tab.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To use a domain-wide administration port, perform the following steps:
m iG
a k sh 1. Select the domain name in the left panel.
L 2. On the default Configuration > General tab, select the Enable Administration Port
check box.
3. Enter a value for the Administration Port field and click Save.
After enabling the administration port, all administration console and WLST traffic must
connect via the administration port.
If you boot managed servers either at the command line or by using a start script, specify the
administration port in the administration server’s URL. The URL must also specify the HTTPS
protocol rather than HTTP. If you use Node Manager for starting managed servers, it is not
necessary to modify startup settings or arguments for the managed servers. Node Manager
obtains and uses the correct URL to start a managed server.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Override the domain-wide port on all but one of the server instances running on the same
m iG
machine. Override the port by using the Local Administration Port Override option on the
a k sh Advanced portion of the server’s Configuration > General tab in the administration console.
L
supplies
<application>
Virtual Host:
supplies.com supplies.com nse
server1:7011 li c e
ble
User 1 supplies fe r a
<application>
ans
n - t r
a no
benefits.com s eฺ
habenefits Virtual Host:
)
m Gui <application> d benefits.com
c o
User 2 g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
A virtual
l
( allows you to use DNS to map a host name to an IP address of an instance of
i Ghost
m
shWebLogic Server or a cluster and specify which servers running on that IP address are part of
Lak the virtual host. This allows you to target an application to a virtual host during deployment,
which in turn determines which servers ultimately host the application. Update DNS to map
the host name to the correct IP address. (You can also use the hosts file to do this.) When
WebLogic receives requests for that host name, it matches it with the appropriate virtual host
and sends the request to the correct instance of WebLogic Server.
WebLogic also allows you to configure separate HTTP parameters, access logs, and default
web applications for each virtual host. Defining a default web application for a virtual host
allows you to configure multiple applications on the same domain or servers that are each
accessible without specifying a web application's context path. Instead, the host name of the
URL determines which application gets called.
nse
li c e
bl e
fe r a
ans
2
n - t r
a no
) has ideฺ 4
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
You perform the following steps to create a virtual host using the administration console:
m iG
a k sh 1. Within the Domain Structure, you expand the Environment node and select Virtual
Hosts.
L
2. Click New.
3. Enter a unique name for your virtual host. Note that this does not have to match the host
name you configure. Click OK.
4. Verify that your virtual host is created.
3
1
nse
li c e
bl e
fe r a
ans
n - t r
a no
has ideฺ
4
)
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
You perform the following steps to configure your virtual host using the WebLogic
iG
k s hm administration console:
La 1. Select your newly created virtual host in the virtual host list.
2. Enter the host names that correspond to this virtual host. In this case, a virtual host
called benefits.com is added. You can potentially configure a separate network
channel and specify the name of that channel in the Network Access Point Name field.
In this example, this field is left blank so the virtual host is associated with the default
channel. Click Save when finished.
3. Select the Targets tab to specify which servers in the domain are associated with your
virtual host.
4. In this case, server1 is selected. Click Save and activate your changes.
DNS Server
Update
the DNS
benefits.com = 192.0.2.11 Server.
nse
li c e
ble
# Do not remove the following line, or various programs
fe r a
# that require network functionality will fail. Or update
ans
127.0.0.1 localhost.localdomain localhost the hosts
n - t r
a no file.
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
To map
l
( host name to the IP address on which the server is listening either modify your
your
i G
m server or modify the machine's /etc/hosts file.
DNS
La ksh
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Now that DNS is mapped to the server's IP address and your virtual host is configured, you
m iG
deploy the application to your virtual host. You deploy the application as usual but when you
a k sh arrive at the targeting page there is a new category called Virtual Hosts. You select your
L virtual host and continue as usual with the rest of the deployment process.
http://benefits.com:7011
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
ble
fe r a
ans
n - t r
a no
The benefits application was set as s
a thesodefault
hhost, noe
d ฺ
)
web application for the virtual
m in G
application context isoneeded theu
i
URL.
e ฺ c n t
@ g ude
d i
h is St
n
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
After everything is configured and deployed, you test your virtual host connection by
m iG
accessing your application using the virtual host name rather than the server’s IP address. In
a k sh this example, instead of the IP address, the URL contains benefits.com, followed by the
L server's port number.
channel?
a. ADMIN
b. T3
c. HTTPS
d. ORCL
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
l ak
Gd(
Answer:
i
m
La ksh
the domain:
a. Use the same port number for it
b. Have SSL configured
c. Be changed to start in STANDBY or ADMIN mode
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
l ak
Gb(
Answer:
i
m
La ksh
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Clusters
nse
li c e
ble
fe r a
Overview, Creation, and Configurationans
o n -tr
a n
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
i G
m
La ksh
Objectives
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
A cluster:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Domain
• Is a logical group of managed servers
Cluster
from the same domain that run Clients
cooperatively Server
• Supports features that provide high Machine
availability for web applications, web e
services, EJBs, and JMS c e ns
Cluster
Server
le li
• Is transparent to its clients Proxy
a b
• Can have servers added to it statically or f er
Machine
s
- t r an
dynamically
n on
• Requires a cluster proxy to provide a
load
s Server
a
h ide ฺ
m)
balancing, if it hosts web applications u
co nt G
Machine
e
g udeฺ
i @
h is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
A WebLogic Server cluster consists of one or more managed servers from the same domain
i G
m
running simultaneously and working together to provide increased reliability and scalability. A
La ksh
cluster appears to clients as one WebLogic Server instance. The server instances that
constitute a cluster can run on one machine or on multiple machines.
A cluster achieves high availability through the replication of services. Because of this
replication, failover is possible. When one server fails, a second server automatically can
resume operation where the first server left off.
Load balancing, the distribution of work across the cluster, ensures that each server in the
cluster helps carry the load.
Scalability is achieved because you can increase a cluster’s capacity by adding server
instances to the cluster, without making any architectural changes.
A cluster also assists in migration. After a system failure on one server, work can be
continued by moving the services that server provided to another server in the cluster (service
level migration), or by moving the entire server to a new hardware (whole server migration).
After a cluster is created, configured servers can be added to it. A dynamic cluster is based
on a server template. A server template sets server attributes. After a server template is
assigned to a cluster, servers based on the template are generated and added to the cluster.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
Concept Description
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Cluster
Server 1
Web App EJB
Code Code
Server 2
Web App EJB
Code Code
nse
Cluster
Proxy li c e
Server 3 ble
Clients Web App EJB fe r a
Code Code
ans Back-end
n - t r Systems
Server 4
a no and
Web App
h a sEJB eฺ Databases
Firewall
Code
m ) Code
u id
o
g eฺc dMachine e nt G
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
G (single-tier cluster architecture has all WebLogic Server application code in a single
The basic,
i
mThat single tier includes both web applications and Enterprise JavaBeans.
shtier.
Lak Remove the “EJB Code” box for systems that do not use EJBs.
Machine
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Cluster A
Server 1
Web App Machine
Code
Cluster B
Server 2 Server 5
Web App EJB
Code Code
nse
Cluster
li c e
Proxy e
Server 3 Server 6
r a bl
Clients Web App EJB fe
s Back-end
Code Code
- t r an Systems
Server 4
n no and
a
Machine
Web App
) h as deฺ Databases
m Gui
Code
Firewall
c o
g eฺ dent
Machine
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
G ( cluster architecture, two separate WebLogic Server clusters are configured:
In the multi-tier
i
sh•m Cluster A for the web application tier
Lak • Cluster B to serve clustered EJBs
If your system does not use EJBs, you would not use the multi-tier cluster architecture in this
way. You could have a second tier for JMS and use it to load balance JMS calls, however.
Cluster
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
servers are not. Server 1 will be exceptionally busy, while servers 2, 3, and 4 will not. If the
EJB calls were load balanced to an EJB tier, however, then the “EJB load” would be
spread across all of the servers in the EJB tier cluster.
Multi-tier advantages:
• EJB calls are load balanced: Each call to an EJB can be load balanced across all the
servers in the EJB cluster. The “unbalanced” situation described above is no longer
possible.
ns e
• More scaling options: Separating the web application and EJB tiers onto separate clusters li c e
bl
provides you with more options for scaling the system and distributing the load. Fore
fe r
example, if users spend most of their time using the web applications, and those
a
ans
n - t r
applications make few EJB calls, you can use a larger number of WebLogic Server
instances in the web application cluster. If things change, and your applications become
a no
more EJB-intensive, you can shift or add servers to the EJB cluster.
has ideฺ
• More security options: With another layer there is an opportunity to add more security. For
)
ฺ c om t Gu
example, you could place a firewall in between the web application and EJB clusters.
Multi-tier disadvantages:
@ ge uden
• More difficult administration: d i isSmore
hThere t than one cluster to create, configure, and
r
maintain. Also, because
n s
hi hosts web applications and the other EJBs,
a oneecluster
t
ฺ g
i more s complicated.
deploymenth
s m
becomes
t o u
• Perhaps
( lakhigher costs: With two clusters you may have more instances of WebLogic
G and more hardware.
i Server
m
La ksh• Slower EJB performance: Because the calls from the web applications to the EJBs are
always remote, you must pay the price of remote calls. The applications must be
developed with this in mind so that calls to EJBs are infrequent and “course grained.”
• More network traffic: Because all EJB calls are remote, network traffic increases.
ways:
– One-to-many messages:
— For periodic “heartbeats” to indicate continued availability
— To announce the availability of clustered services
— Note: This communication can use either:
— IP unicast (recommended): No additional configuration is required. nse
IP multicast: A multicast host and port must be configured. li c e
—
ble
– Peer-to-peer messages:
fe r a
For replicating HTTP session and stateful session a s state
nEJB
—
- t r
To access clustered objects that reside onoanremote server
—
(multi-tier architecture) a n
a s ฺ
Note: This communication uses ide
) hsockets.
om t Gu
—
ฺ c
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
An instance of WebLogic Server uses one-to-many communication to send regular
m iG
“heartbeat” messages that advertise its continued availability to other server instances in the
a k sh cluster. The servers in a cluster listen for heartbeat messages to determine when a server has
L failed.
All servers use one-to-many messages to announce the availability of clustered objects that
are deployed or removed locally. Servers monitor these announcements so that they can
update their local JNDI tree to indicate the current deployment of clustered objects. This is the
maintenance of the so-called “cluster-wide” JNDI tree.
IP multicast 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.0-
239.255.255.255. IP multicast does not guarantee that messages are received, so
WebLogic Server allows for the possibility that some messages may be missed. If you use
multicast, you must ensure your network propagates multicast messages to all clustered
servers. The multicast time-to-live value can be increased if you find that messages are being
missed. With multicast, you must ensure that no other applications share the multicast
address and port, or servers will have to process extra messages, which introduces extra
overhead.
separate channel is defined, each server’s default channel is used (the default channel is the
server’s configured host and port).
IP sockets provide a simple, high-performance mechanism for transferring messages and data
between two applications. Clustered WebLogic Server instances use IP sockets for:
• Replicating HTTP session state and stateful session EJB state
• Accessing clustered objects that reside on a remote server instance (as in the multi-tier
cluster architecture) nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( lak
m iG
a k sh
L
1. Add clusters.
2. Assign managed servers to them.
nse
1 li c e
ble
fe r a
ans
n - t r
a no 2
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
This is covered in the lesson titled “Creating Domains.”
m that there is not a way to create dynamic clusters, server templates, or dynamic servers iG
k s hNote
La at the time of domain creation by using the Configuration Wizard. You can create a regular cluster by using the Configuration Wizard, and later create a server template and assign it to
the cluster, which makes the cluster dynamic.
4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
bl e
fe r a
2 ans
n - t r
3 a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To create a new cluster, perform the following steps:
m iG
a k sh 1. In the Change Center, click Lock & Edit.
L 2. Select Clusters under Environment in the Domain Structure.
3. Click the New button and select Cluster.
4. Give the cluster a unique name and select Unicast as the messaging mode. Click OK.
If you have created a network channel for one-to-many cluster communication, enter it in
the Unicast Broadcast Channel field. This field is optional. If left blank, each server’s
default network channel is used for this communication.
Note: The other messaging mode option is Multicast. If that is selected, you must also enter
the Multicast Address and the Multicast Port.
2 3
nse
li c e
ble
fe r a
ans4
n - t r
a no
) has ideฺ
ฺ c o5m t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To add servers to the new cluster, perform the following steps (this assumes the configuration
m iG
is still locked):
a k sh 1. In the Clusters table, select the new cluster’s name.
L
2. Select the Configuration tab and the Servers subtab.
3. Scroll down to the Servers table. Click the Add button.
4. To add an existing server to the cluster, choose Select an existing server, and add it
as a member of this cluster. Then use the drop-down list to select a particular server.
(The other option is to select Create a new server and add it to this cluster. You then
click Next and are led through creating a new server.)
5. Click Next or Finish.
6. Repeat the process to add more servers to the cluster. (Not shown)
7. Finally, in the Change Center, click Activate Changes. (Not shown)
Note: You can also add a server to the cluster from the server’s configuration. Lock the
configuration. Select Servers under Environment in the Domain Structure. Click the name
of a server in the Servers table. Select Configuration > General. Use the Cluster drop-
down list to select a cluster. Click Save. Activate the changes. (The server cannot be
running.)
Server Template A
Defines common
server attributes
Assigned to nse
li c e
Dynamic Cluster Number of ble
fe r
Dynamic Servers = 3
a
Servers
t r a ns
based on
the
ServerA-1 ServerA-2
non-ServerA-3
a
has ideฺ
template
are
generated. m Gu)
c oMachine2
Machine1
g e dent
ฺ Machine3
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
miG
a k sh
L
4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
bl e
fe r a
ans
2
n - t r
3 a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To create a new dynamic cluster, perform the following steps:
m iG
a k sh 1. In the Change Center, click Lock & Edit.
L 2. Select Clusters under Environment in the Domain Structure.
3. Click the New button and select Dynamic Cluster.
4. Give the cluster a unique name and select Unicast as the messaging mode. Click
Next. If you have created a network channel for one-to-many cluster communication,
enter it in the Unicast Broadcast Channel field. This field is optional. If left blank, each
server’s default network channel is used for this communication.
Note: The other messaging mode option is Multicast. If that is selected, you must also
enter the Multicast Address and the Multicast Port.
5 6
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
bl e
fe r a
ans
n - t r
a no
) h as deฺ
c o m Use G ui that have a name that
machines
eฺ denstarts t with the string “machine.”
g
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
5. Enter the Number of Dynamic Servers. This is how many dynamic servers are created
m iG
and placed in the cluster. This number should be the number of server instances you
a k sh anticipate needing at peak load. Enter the Server Name Prefix. This is used to help
L generate the server names. Select Create a new server template using domain
defaults. Click Next.
Note: The other option for the server template is to select Clone an existing server
template for this cluster and use the drop-down list to select an existing server
template to copy.
- Use a subset of machines in this domain: The dynamic servers generated are
assigned in a round-robin fashion to all machines defined in the domain that match
the Machine Name Match Expression entered. An asterisk can be used as a wild
card.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( lak
m iG
a k sh
L
7 8
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
ble
fe r a
10 ans
n - t r
a no
) has ideฺ
c om G u
ฺ t
ge uden
New generated servers
@
hi is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
7. Select how to assign listen ports to the dynamic servers and then click Next. The two
m iGchoices for how to do the port assignments are:
a k sh - Assign each dynamic server unique listen ports: The dynamic servers
L generated are assigned unique listen ports by using the numbers entered in the
Listen Port for First Server and SSL Listen Port for First Server fields. The first
server port numbers are the values entered plus 1. Each subsequent server will
have 1 added to the port numbers of the server generated before it.
- Assign each dynamic server fixed listen ports: The dynamic servers generated
are assigned the same listen ports entered in the Listen Port and SSL Listen Port
fields. Note that this only works if the servers have different listen addresses. (No
two servers can share the same listen address and listen port.)
8. Review the dynamic cluster and click Finish. The new server template and dynamic
cluster are created.
9. In the Change Center, click Activate Changes.
10. After the changes are activated, new servers are generated, as shown in the Servers
table.
nse
li c e
ble
fe r a
ans
2 n - t r
a no
) has ideฺ
3 ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To edit the new dynamic cluster, perform the following steps:
m iG
a k sh 1. In the Change Center, click Lock & Edit.
L 2. Select Clusters under Environment in the Domain Structure.
3. Select the name of the new cluster in the Clusters table.
4. Select whichever tabs you want. Make changes to the cluster attributes. Click Save.
5. In the Change Center, click Activate Changes.
4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
ble
fe r a
2 s
- t r an
no n
s a
)3 ha ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To edit the new server template, perform the following steps:
m iG
a k sh 1. In the Change Center, click Lock & Edit.
L 2. In the Domain Structure, expand Environment, expand Clusters, and select Server
Templates.
3. Select the name of the new server template in the Server Templates table.
4. Select whichever tabs you want. Make changes to the server template attributes. Click
Save.
5. In the Change Center, click Activate Changes.
asterisks for wildcards, and can list multiple expressions separated by commas.
For example, say the domain has these machines defined: mach1, mach2, mach3,
fastmach1, fastmach2, fastmach3, and fastmach4. And the Machine Name
Match Expression is set to: mach1,fast*. The machines would be assigned in
this order: mach1, fastmach1, fastmach2, fastmach3, fastmach4, mach1,
fastmach1, and so on.
• Network Channel (Access Point) listen ports (optional—if the server template has
nse
a Network Channel defined within it): The first server is the network channel port + 1,
li c e
the second server is the network channel port + 2, and so on.
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
Assigned to machine2
Dynamic Cluster
Maximum Number of Servers: 3
Server Name Prefix: serv-
nse
Enable Calculated Listen Ports:
li c e
Enable Calculated Machine Associations:
bl e
Machine Name Match Expression: fast*
fe r a
ans
n - t r
serv-1 serv-2
a no serv-3
Listen Port: 9000 Listen Port: 9001 as
) h idListen eฺ Port: 9002
ฺ c om t Gu
fastmachineA
@ ge uden
fastmachineB fastmachineC
d i
h is S t
n
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
The three ( lak generated for the dynamic cluster have a name that starts with serv- and
servers
m
endsiinGan index, starting with 1. The listen ports for the servers start with the template listen
sh
Lak port +1. The servers are assigned to machines already defined, but only those machines with
names that start with “fast.”
Cluster Cluster
Create with the Admin Console / WLST Yes Yes
nse
Servers generated automatically No Yes
li c e
ble
Can contain configured servers Yes Yes
fe r a
Can contain dynamic servers No t r a nYess
n- no
Supports service-level migration Yes s a No
a ฺ
Supports whole-server migration m ) h Yesuide No
ฺ c o t G
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( k
lacluster
A configured
G that is assigned a server template and has dynamic servers generated
form
i
it becomes a dynamic cluster. A dynamic cluster can contain both configured and dynamic
La kshservers.
1
nse
4 li c e
ble
This template
fe r a
can be cloned
ans
when creating
n - t r
a dynamic
cluster, or a no
2
assigned to a
) has ideฺ
om t Gu
cluster to
make it ฺ c
dynamic.
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To create a new server template, perform the following steps:
m iG
a k sh 1. In the Change Center, click Lock & Edit.
L 2. In the Domain Structure, expand Environment, expand Clusters, and select Server
Templates.
3. Click the New button.
4. Give the server template a unique name and click OK.
7
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
6
5
Choose
other tabs
8 nse
and edit
li c e
server
ble
attributes
fe r a
ans
n - t r
9
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
5. In the Server Templates table, select the name of the new template.
m iG
a k sh 6. Select Configuration > General.
L 7. Enter any values for attributes that you want shared among servers created from this
template. Some attribute values can be overridden when the template is assigned to a
cluster. Other attribute values are used in calculations. For example, when a value for
Listen Port is entered, it is used as the starting point for listen ports for the servers
generated from the template. After entering the values, click Save.
8. Select any other tabs and enter whatever attribute values you want shared among these
servers. Remember to click Save after entering values on a page.
9. In the Change Center, click Activate Changes.
nse
li c e
ble
fe r a
ans 2
n - t r
a no
1 ) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
1. After creating the server template and locking the configuration, in the Servers table,
m iG
select the server. Ensure that Configuration > General is selected. Click the Change
a k sh button for the Template field.
L 2. Select the server template from the drop-down list and click Yes. Then activate the
changes.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
administration console.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
administration console.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Clusters
nse
li c e
ble
fe r a
Proxies and Sessions ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Objectives
• A proxy plug-in:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
The web server with the proxy plug-in may do more than just load balance requests to
m iG
WebLogic Server instances in a cluster. In some architectures, the web server serves up
a k sh static files (HTML files and images, for example) and only passes through requests to
L WebLogic Server for “dynamic” pages (JSPs or calls to Servlets). To the web browser, the
HTTP responses appear to come from one source—the web server. A variation of that
architecture is to use a hardware load balancer in front of a bank of web servers (serving up
static content), which are in front of a cluster of WebLogic Server instances (returning
“dynamic” content).
Oracle WebLogic Server plug-ins can provide efficient performance by reusing connections
from the plug-in to WebLogic Server (“keep-alive” connections).
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( lak
m iG
a k sh
L
one line):
include "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/
${COMPONENT_NAME}/mod_wl_ohs.conf"
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To proxy requests to a single server, use the WebLogicHost and WebLogicPort
m iG
parameters. To proxy requests to a cluster of WebLogic Servers, use the WebLogicCluster
a k sh parameter instead.
L To proxy requests by path, use the Location block and the SetHandler statement.
SetHandler specifies the handler for the plug-in module, and should be set to weblogic-
handler. To proxy requests by MIME type, add a MatchExpression line to the IfModule
block. Note that if both MIME type and proxying by path are enabled, proxying by path takes
precedence over proxying by MIME type. You can also use multiple MatchExpressions
lines.
Parameter Description
Proxy to a single server with this host and port
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
WebLogicHost,
WebLogicPort
WebLogicCluster Proxy to this initial list of clustered servers
MatchExpression Proxy requests for files of this MIME type
PathTrim Remove this text from the incoming URL path before
forwarding a request.
PathPrepend Add this text to the incoming URL path before forwarding
nse
a request.
li c e
ErrorPage URL to direct users to if all servers are unavailable ble
fe r a
WLExcludePathOrMime Do not proxy for this specific URL path or MIME type.
an s
Type
n - t r
WLProxySSL
a no
Set to ON to establish an SSL connection to WebLogic if
) h as deฺ
the incoming request also uses HTTPS.
MaxPostSize Maximum allowable m size G of u i data, in bytes
POST
c o
Debug eฺ of logging
Sets thegtype
d e nt performed
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
G(
• WebLogicHost,WebLogicPort:
i WebLogic Server host (or virtual host name as
m defined in WebLogic Server) to which HTTP requests should be forwarded. Port at
La ksh which the WebLogic Server host is listening for connection requests from the plug-in.
• WebLogicCluster: Comma-separated list of host:port for each of the initial
WebLogic Server instances in the cluster. The server list specified in this property is a
starting point for the dynamic server list that the servers and plug-in maintain. WebLogic
Server and the plug-in work together to update the server list automatically with new,
failed, and recovered cluster members.
• MatchExpression: When proxying by MIME type, set the filename pattern inside of an
IfModule block using the MatchExpression parameter.
• PathTrim: Specifies the string trimmed by the plug-in in
the {PATH}/{FILENAME} portion of the original URL, before the request is forwarded
to WebLogic Server.
• ErrorPage: You can create your own local error page that is displayed when your web
server is unable to forward requests to WebLogic Server.
• WLExcluedPathOrMimeType: This parameter allows you to exclude certain requests
from proxying.
• Debug: Sets the type of logging performed for debugging operations. The debugging
information is written to the /tmp/wlproxy.log file. Some of the possible values for this
parameter are:
- ON: The plug-in logs informational and error messages.
- OFF: No debugging information is logged.
- ERR: Only error messages are logged.
- ALL: The plug-in logs headers sent to and from the client, headers sent to and from
nse
WebLogic Server, information messages, and error messages. li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
• opmnctl examples:
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( lak
m iG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Server1
Missed too
many
heartbeats
Web Server
Server2
nse
Plug-in
li c e
Server1
ble
Server2 Server1
fe
Server3r a
Clients Server3 Server3
n s
Server4 Server4
n- tra
Dynamic n o
Dynamic
Server Lists a
Server List
(old) h ideฺ
a
(updated)
) Server4
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
The cluster and the proxy maintain a dynamic server list that has within it all viable servers in
i G
m
the cluster. When a server in the cluster fails it is detected and the list is updated. If a server
La ksh
misses too many heartbeats, it is marked as failed. Also, if a socket to a server in the cluster
(from another cluster server) closes unexpectedly, the server is marked as failed.
The dynamic server list is also updated when new servers in the cluster are started.
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
When you specify the list of WebLogic Server instances for a cluster proxy, the plug-in uses
i G
m
that list as a starting point for load balancing among the members of the cluster. After the first
La ksh
request is routed to one of these servers, a dynamic server list is returned in the response that
contains an updated list of servers in the cluster. The updated list adds any new servers in the
cluster and deletes any that are no longer part of the cluster or that have failed. The dynamic
server list is returned with each clustered server response so that the proxy always has an up-
to-date list of viable servers.
To configure how many heartbeats can be missed: In the admin console, select the cluster,
then select Configuration > Messaging. Under Advanced, change Idle Periods Until
Timeout. The default is 3.
) ha ideฺ
– JDBC (database) session persistence
c o m Gu
– File session persistence
ge ฺ
@ Stud ent
h i
r a nd this
m ฺg u© s2013,
iCopyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
Java web application components, such as Servlets and JavaServer Pages (JSPs), can
m iG
maintain data on behalf of clients by storing objects in the HttpSession. An HttpSession
a k sh is available on a per-client basis. Once an instance of WebLogic Server creates a session for
L a client, it also writes a cookie to the client’s web browser. This cookie indicates which server
has this client’s session. The cluster proxy checks this cookie on subsequent client requests,
and routes the client to the instance of WebLogic Server that has the client’s session.
If the server that has the client’s session fails, when the client makes their next request, they
cannot be routed to that server. The proxy chooses another server. That server does not have
the client’s session, so information about the client is lost.
To provide transparent failover for web applications, replication or shared access to the
information in each HttpSession object must be provided. This is accomplished within
WebLogic Server by using in-memory replication, file system persistence, or database
persistence. A web application chooses which session failover option to use in the WebLogic
Server deployment descriptor, weblogic.xml. Each option has its own configurable
parameters that are also entered in weblogic.xml.
Note that in-memory replication has two options, synchronous and asynchronous. The
asynchronous option replicates data in batches to improve cluster performance.
<persistent-store-type> Description
nse
memory No session replication or persistence
li c e
ble
replicated In-memory session replication
fe r a
ans
replicated_if_clustered - t r
The same as memory if deployed to
n
no
stand-alone servers, the same as
a
has ideฺ
replicated if deployed to a cluster
)
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The value of the <persistent-store-type> tag determines session failover:
m iG
a k sh • memory: No session replication or persistence
L • replicated: In-memory session replication. The syncing of sessions between the
primary and secondary servers occurs synchronously. Note that it is an error to deploy a
web application with this option to stand-alone servers.
• replicated_if_clustered: If the web application is deployed to stand-alone
servers, this option is the same as memory. If the web application is deployed to a
cluster, this is the same as replicated.
<persistent-store-type> Description
• async_jdbc: The same as the jdbc option, except the syncing of sessions to the
database is done in batches, rather than synchronously.
• cookie: All session data is stored in cookies in the client’s web browser. If this option is
chosen, only string data can be stored in the session.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
– Primary
– Secondary
• The WebLogic Server session cookie stores both the
client’s primary and secondary servers.
• Each update to the primary session object is automatically e
replicated to the secondary server, either synchronously c e ns
e li
(the default) or asynchronously (batch). abl fe r
Cluster
a n s
n r
-tServer
Server 1 Server 2 Server 3 n o 4
a
) has ideฺ
Secondary ฺco
m Gu
Primary
g e dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
i G(
Using in-memory replication, WebLogic Server copies session state from one server instance
tom
another. The primary server stores the primary session state (the primary server is the
La kshserver to which the client is connected when a session is first created). A replica of the
session state is stored on another instance of WebLogic Server in the cluster (the secondary
server). The replica is kept up-to-date so that the data can be used if the primary server fails.
The default session replication is synchronous. The asynchronous option replicates data in
batches to improve cluster performance.
1 fe r a
an s
Cluster
n - t r
Server 1 2 Server 2 a
Server 3 no Server 4
) has ideฺ
Primary Secondary ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
1. When a client first accesses the web application through the proxy plug-in, the plug-in
m iG
load balances the request to one of the servers in the cluster (in the example, Server 1).
a k sh The web application running on Server 1, because the application wishes to remember
L something about the client, creates a session for the client and stores something in it.
2. Server 1 is this client’s primary server. To provide failover services for the web
application, the primary server replicates the client’s 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, Server 2 is the
secondary server for Server 1, and gets a replica of the client’s session object.
3. When WebLogic Server responds to the client, it writes a cookie to the client’s browser.
This cookie contains which server is the primary (Server 1, in the example) and which is
the secondary (Server 2, in the example). The cookie also contains the client’s session
ID. Subsequent requests from this client are routed (if possible) to the primary server,
Server 1, which has the client’s session information.
information. fe r a
an s
Cluster
n - t r
Server 1 Server 2 a
Server 3 no Server 4
) as
9h uide
ฺ 7
c om Secondary G
g e dent
ฺ Primary
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
7. Server 4 responds to the request. The session information for the client is available to
m iG
Server 4, so the client does not realize that a different server is responding. Server 4 is
a k sh the new primary server for this client.
L 8. Server 4 has a secondary server, in this example, Server 3. Part of Server 4’s response
is to update the client’s cookie information. Server 4 is now the primary, with Server 3 as
the secondary.
9. Server 3, as the secondary server, stores a replica of this client’s session object for the
new primary server, Server 4.
deployment descriptor.
...
<session-descriptor>
<persistent-store-type>replicated_if_clustered
</persistent-store-type>
nse
</session-descriptor>
li c e
...
ble
fe r a
weblogic.xml
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( l ak
In the weblogic.xml deployment descriptor file, set the persistent-store-type
m iG
parameter in the session-descriptor element to replicated,
a k sh replicated_if_clustered, async_replicated, or
L async_replicated_if_clustered.
has ideฺ
Server1 Server2 on that hardware
) are assigned to
ฺ c om t Gu the machine.
g uden
host01.example.com e host02.example.com
@
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
cluster.
• WebLogic Server allows you to influence how secondary
servers are chosen by configuring replication groups and
configuring a server’s “preferred secondary group.”
• When choosing a secondary server, WebLogic Server e
attempts to: c e ns
li
– Choose one in the primary server’s preferred secondary ble
group, if it is configured f e ra
t r a ns
– Choose a server on a different machine n-
– Avoid choosing a server in the same a no
replication group
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
In addition to taking into account machine definitions, WebLogic Server allows you to further
i G
m
control how secondary servers are chosen by using replication groups. A replication group is
La ksh
a preferred list of clustered instances to use for storing session replicas. 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 session states that reside on the server.
When a web client attaches to a cluster and a session is created, the WebLogic Server
instance that is now the primary server ranks other servers in the cluster to determine which
server should be the secondary. Server ranks are assigned using the server’s machine and
participation in a replication group.
Cluster
Machine1
Machine4
Machine7
Server1 Server4 Server7
nse
Machine2
Machine5
Machine8
Server2 Server5 Server8 li c e
bl e
fe r a
ns
Machine3
a
Machine6
Machine9
t r
Server3 Server6
n on-
Server9
s a
) h ideฺ
a
Rack1 Rack2
ฺ c om t Gu Rack3
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
This slide shows an example of using replication groups to persuade WebLogic Server into
i G
m
placing the primary sessions on servers running on a group of machines that run on the same
La ksh
physical rack. The cluster spans multiple machines that run on three different physical racks.
In this example, all servers are configured with a replication group name that matches the
rack name where they are running. So servers running on Rack1 have a replication group
setting of Rack1. All servers are configured with a secondary replication group name that
matches a rack name that is on a different rack. The configured secondary group for servers
running on Rack1 is Rack2. This means that primary sessions in-memory on servers running
on Rack1 have their secondary sessions replicated to one of the servers running on Rack2.
Each server in this cluster is configured in this way to ensure that the primary session is
always on a server within one rack while the secondary is located on a server in another rack.
If somehow Rack1 becomes totally unavailable, client requests will fail over to other servers
in the cluster and are guaranteed to recover their session state because the replication group
configuration ensured that secondary sessions were located on another rack.
1 2 3
nse
li c e
ble
fe r a
ans
4
n - t r
a no
) h as deฺ
c
5m
o G ui
g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
1. ( l aks
In the Domain Structure, expand Environment and select Servers.
m iG
a k sh 2. Select the server for which you want to configure a replication group.
L 3. Select the Configuration > Cluster tabs.
4. Enter the name of the replication group that this server belongs to and the preferred
secondary group name. Click Save.
nse
... li c e
<session-descriptor> ble
<persistent-store-type>file</persistent-store-type> fe r a
ans
<persistent-store-dir>/mnt/wls_share</persistent-store-dir>
n - t r
no
</session-descriptor>
... a
has ideฺ
weblogic.xml
)
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
In the weblogic.xml deployment descriptor file, set the persistent-store-type
iG
k s hm parameter in the session-descriptor element to file.
La Set the directory where WebLogic stores the sessions using the persistent-store-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.
sessions. Servlet 1
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
sh to
( lak
Whenever a servlet creates or uses a session object, the servlet stores the session data
i G
m
persistently in the database. When a subsequent client request enters the cluster, any server
La ksh
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 client’s request.
This technique provides for good failover capability because any server in the cluster can
resolve a client’s request, but there is a 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
WebLogic.
nse
... li c e
<session-descriptor> ble
<persistent-store-type>jdbc</persistent-store-type> fe r a
ans
<persistent-store-pool>mysessionds</persistent-store-pool>
n - t r
no
</session-descriptor>
... a
) has ideฺ weblogic.xml
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Set up a database table named wl_servlet_sessions for JDBC-based persistence. The
m iG
connection pool that connects to the database needs to have read/write access for this table.
a k sh Create indexes on wl_id and wl_context_path if the database does not create them
L 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 persistent-
store-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 WebLogic
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, WebLogic 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 WebLogic-specific deployment descriptor, weblogic.xml.
access:
Column Name Column Data Type
WL_ID
Prim. VARCHAR(100)
Key
WL_CONTEXT_PATH VARCHAR(100)
nse
WL_CREATE_TIME NUMBER(20)
li c e
ble
WL_IS_VALID CHAR(1)
fe r a
ans
WL_SESSION_VALUES BLOB
n - t r
WL_ACCESS_TIME NUMBER(20)
a no
) as deฺ
hCHAR(1)
m Gui
WL_IS_NEW
c o t
g
WL_MAX_INACTIVE_INTERVAL eฺ denINTEGER
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
In the database that is referenced by the session persistence data source, you must configure
m iG
a table, WL_SERVLET_SESSIONS, which will hold the session objects. The user specified with
a k sh access to this table needs read/write/insert/delete access. The table columns are:
L • WL_ID: The session ID
• WL_CONTEXT_PATH: This is the context. This column is used with WL_ID as the primary
key. This is a variable-width alphanumeric data type of up to 100 characters.
• WL_IS_NEW: This value is true as long as the session is classified in the “new” state by
the Servlet engine. This is a single char column.
• WL_CREATE_TIME: This is the time when the session was originally created. This is a
numeric column, 20 digits.
• WL_IS_VALID: This parameter is true when the session is available to be accessed by
a Servlet. It is used for concurrency purposes. This is a single char column.
• WL_SESSION_VALUES: This is the actual session data. It is a BLOB column.
• WL_ACCESS_TIME: This is the last time this session was accessed. This is a numeric
column, 20 digits.
• WL_MAX_INACTIVE_INTERVAL: This is the number of seconds between client
requests before the session is invalidated. It is an Integer. A negative value means the
session should never time out.
WL_IS_VALID INTEGER,
WL_SESSION_VALUES BLOB,
WL_ACCESS_TIME DECIMAL (20) NOT NULL,
WL_MAX_INACTIVE_INTERVAL INTEGER,
PRIMARY KEY (WL_ID, WL_CONTEXT_PATH)
);
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
load balancing
algorithm choices Cluster
• SSL Persistence
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
ns e
sessionid!primary_server_id!secondary_server_id li c e
bl e
fe r a
t r a ns
A randomly generated ID. The primary server ID is
o -
nsecondary
The server ID is
Default length is 52 bytes. present in in-memory a n present only in in-memory
session replication and file
h a s eฺ session persistence. If
)
session persistence.
m It is
u i d set to NONE. If present, it isis
there is no secondary, it
e ฺ colong.nt G
10 bytes
10 bytes long.
g d e
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
G ( load balancer works with all session persistence types because the behavior is
The hardware
i
shthemsame in each case. When the primary is not available, the load balancer uses its
Lak configured algorithm to select another server in the cluster. The secondary ID is not really
used by the load balancer, but when in-memory persistence is configured the server that
receives the request uses the cookie to fetch the session from the secondary session. In the
other session failover types, the secondary is not used at all.
To configure a load balancer to work with your cluster, configure the load balancer to define
the offset and length of the string constant. The default length of the WebLogic Session ID
portion of the session cookie is 52 bytes. Configure the load balancer to set the following:
• String offset to 53 bytes: This is the default random session ID length plus one byte for
the delimiter character.
• String length to 10 bytes: This is the length of the identifier for the primary server.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Clusters
nse
li c e
ble
fe r a
ans
Communication, Planning, and Troubleshooting
-tr
n o n
a
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
i G
m
La ksh
Objectives
ways:
– One-to-many messages
— For periodic “heartbeats” to indicate continued availability
— To announce the availability of clustered services
— Note: This communication can use either:
— IP unicast (recommended): No additional configuration is required. nse
IP multicast: A multicast host and port must be configured. li c e
—
ble
– Peer-to-peer messages
fe r a
For replicating HTTP session and stateful session a s state
nEJB
—
- t r
To access clustered objects that reside onoanremote server
—
(multi-tier architecture) a n
a s ฺ
Note: This communication uses ide
) hsockets.
om t Gu
—
ฺ c
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
An instance of WebLogic Server uses one-to-many communication to send regular
m iG
“heartbeat” messages that advertise its continued availability to other server instances in the
a k sh cluster. The servers in a cluster listen for heartbeat messages to determine when a server has
L failed.
All servers use one-to-many messages to announce the availability of clustered objects that
are deployed or removed locally. Servers monitor these announcements so that they can
update their local JNDI tree to indicate the current deployment of clustered objects. This is the
maintenance of the so-called “cluster-wide” JNDI tree.
La ksh
239.255.255.255. IP multicast does not guarantee that messages are received, so
WebLogic Server allows for the possibility that some messages may be missed. If you use
multicast, you must ensure your network propagates multicast messages to all clustered
servers. The multicast time-to-live value can be increased if you find that messages are being
missed. With multicast, you must ensure that no other applications share the multicast
address and port, or servers will have to process extra messages, which introduces extra
overhead.
Firewalls can break multicast transmissions. Although it might be possible to tunnel multicast
transmissions through a firewall, this practice is not recommended. A final worry with
multicast messaging is the possibility of a multicast “storm,” in which server instances do not
process incoming messages in a timely fashion, which leads to retransmissions and
increased network traffic.
Member
Member
Member
Member
Member
Member
Member
Member
Member
• Uses TCP-IP networking
• Creates a connection for each
server
Cluster
• Uses a hub-and-spoke design so Leader
that it scales e
Unicast
c e ns
• Divides a cluster into groups and Cluster li
assigns a group leader to each
Cluster
bl e
Leaderfe r a
• Enables group leaders to manage an s
n - t r
communication between groups no
a
) has ideฺCluster
ฺ c om t Gu Member Cluster
Cluster
Cluster
Cluster
Cluster
Cluster
Cluster
Cluster
@ ge uden Member
Member
Member
Member
Member
Member
Member
Member
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The TCP protocol requires a point-to-point connection. Unlike multicast, which broadcasts to
m iG
many servers simultaneously, unicast needs to create a connection for each server in the
a k sh cluster. WLS would not scale well if every server in a cluster had to connect to every other
L server in the cluster. WebLogic implements unicast to scale well. When a cluster starts, the
servers divide the cluster into groups of ten cluster members. One member in each group
becomes the group leader. This creates a network topology that reduces the number of
connections an individual member makes with other members in the cluster.
The picture in this slide shows a twenty-member unicast cluster. WebLogic Server divides the
cluster into two groups of ten servers, and each group elects a leader. Group members send
and receive cluster messages through their group leader, and group leaders communicate
with each other to make cluster traffic scalable. Group leaders act as simple network relays to
their group members, and to other group leaders. Group leaders and members can receive
multiple messages because they do not store any state data, so there is no risk of data
corruption.
If a group leader is not available, another group member becomes the new group leader. If
the original group leader becomes available again, the old group leader becomes the group
leader again, and the cluster demotes the acting group leader back to a regular group
member.
First, you should test if the multicast address you want to use is
working using the MulticastTest tool.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
. ./setDomainEnv.sh
java utils.MulticastTest -n world -a 237.0.0.1 -p 30000
. . .
nse
Using multicast address 237.0.0.1:30000
li c e
Will send messages under the name server1 every 2 seconds
ble
Will print warning every 600 seconds if no messages are received
fe r a
New Neighbor hello found on message number 2
ans
I (world) sent message num 1
n - t r
Received message 3 from hello
a no
I (world) sent message num 2
) has ideฺ
om t Gu
Received message 2 from world
ฺ c
ge uden
Received message 4 from hello
Command Line Host 2
@
I (world) sent message num 3
hi is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
You can verify that multicast is working by running utils.MulticastTest from one of the
m iG
Managed Servers.
a k sh The MulticastTest utility helps you to debug multicast problems when configuring an
L Oracle WebLogic Server cluster. The utility sends out multicast packets and returns
information about how effectively the multicast is working on your network. Specifically,
MulticastTest displays the following types of information via standard output:
1. A confirmation and sequence ID for each message sent out by the current server
2. The sequence and sender ID of each message received from any clustered server,
including the current server
3. A missed-sequenced warning when a message is received out of sequence
4. A missed-message warning when an expected message is not received
To use MulticastTest, start one copy of the utility on each node on which you want to test
the multicast traffic.
Warning: Do not run the MulticastTest utility by specifying the same multicast address
(the -a parameter) as that of a currently running Oracle WebLogic Server cluster. The utility is
intended to verify that the multicast is functioning properly before your clustered Oracle
WebLogic Servers are started.
broadcast; and (b) the servers in the clusters are communicating with each other. (The
default is 237.0.0.1.)
• -p portnumber (optional): The multicast port on which all the servers in the cluster are
communicating. (The multicast port is the same as the listen port that is set for Oracle
WebLogic Server, which defaults to 7001 if unset.)
• -t timeout (optional): Idle timeout, in seconds, if no multicast messages are received. If
unset, the default is 600 seconds (10 minutes). If a timeout is exceeded, a positive
confirmation of the timeout is sent to stdout. nse
li c e
e
• -s send (optional): Interval, in seconds, between sends. If unset, the default is 2
bl
r a
seconds. A positive confirmation of each message that is sent out is sent to stdout.
fe
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
2
1
4
3
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu 5
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
You configure clustering using the following steps:
m iG
a k sh 1. In the administration console, expand Environment and select Clusters.
L 2. Select the cluster you want to configure to use multicast communication.
3. Select the Configuration > Messaging tabs to display the cluster's broadcast
communication settings page.
4. Set the Messaging Mode to Multicast, set the Multicast IP address, and Multicast
Port. In this case, 237.0.0.1 is configured as the IP address and 7001 as the port.
Save your changes.
5. Review your cluster and see that its Cluster Messaging Mode is now Multicast.
Note: This change requires restarting the affected servers of the cluster. Note that when you
select the multicast messaging mode, the unicast settings are unavailable.
3
nse
li c e
bl e
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu 5
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
You configure clustering using the following steps:
m iG
a k sh 1. In the administration console, expand Environment and select Clusters.
L 2. Select the cluster you want to configure to use unicast communication.
3. Select the Configuration > Messaging tabs to display the cluster's broadcast
communication settings page.
4. Set the Messaging Mode to Unicast. There is also a field for entering the name of a
network channel if you want to have unicast traffic on its own channel. In this case, we
are just allowing traffic to use the default channel. Save your changes.
5. Review your cluster and see that its Cluster Messaging Mode is now Unicast.
Note: This change requires restarting the affected servers of the cluster. Note that when you
select the unicast messaging mode, the multicast settings are unavailable.
Cluster
Regular requests use
the default channel:
host01:7011 Server
The cluster uses the
nse
replication channel for peer-
to-peer communication: li c e
Cluster
bl e
Proxy host01:5000
fe r a
Clients ans
n - t r
Server
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
In a corporate enterprise environment, network volumes can reach tremendous levels that
m iG
may saturate a network. If this network is the same one that the WebLogic default channel
a k sh uses for its servers, this can hinder high-priority or internal traffic. One example of this is
L session replication. Some applications may be more replication-intensive than others and can
benefit from separating replication traffic from other traffic in the server. In other scenarios,
such as when using Exalogic InfiniBand, some network stacks offer much higher performance
than standard TCP-IP networks. WebLogic applications can benefit from using a faster
network for replication if there is a lot of replication traffic. This allows client traffic and
replication traffic to operate on different networks to avoid saturating the network.
nse
li c e
ble
fe r a
3
t r a ns
no n- 4
a
) has ideฺ
ฺ c om t Gu 5
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
1. ( l ak
Within the administration console, expand Environment and select Servers.
m iG
a k sh 2. Select the server for which you want to create a channel.
L 3. Select the Protocols tab.
4. Select the Channels subtab to display the list of configured channels for this server.
5. Click New to create a new channel.
nse
li c e
bl e
fe r a
ans
n - t r
a no 8
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
6. Enter a name and select a protocol for your channel. In this case, the name is
iG
k s hm ReplicationChannel and the protocol is t3. Click Next.
La 7. Configure the network addressing for your channel. In this case, the listen address is host01 and the listen port is 5000. Click Next.
8. This procedure is repeated for each server in the cluster. Ensure that the network
channel has the same name for each server. Assuming a two-node cluster for this
example, this procedure is repeated for the second server with a listen address and port
of host02 and 5000, respectively.
9 10
nse
li c e
ble
fe r a
ans
n - t r
a no
11 ) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
9. Next, you configure the properties for your channels. In this example, the channel is
m iGenabled, HTTP is enabled, and it allows for outbound communication. A replication
a k sh channel must allow for outbound communication so it can both send and receive
L replication messages. Click Next. Do the same thing for each of the cluster server
channels.
10. If there are any SSL requirements, you configure them on this page. In this example,
you are not using SSL so you just click Finish.
11. After your network channels are created for all the servers in your cluster, you can view
them in the console. Now you have to configure your cluster to use this channel for
replication.
1
2
nse
li c e
ble
fe r a
3 s
- t r an
no n
a
) has ideฺ
ฺ c om t Gu 4
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
1. ( l ak
Within the administration console, expand Environment and select Clusters.
m iG
a k sh 2. Select the cluster you want to configure to use the new replication channel.
L 3. Select the Replication subtab under the Configuration tab.
4. Enter the name of the replication channel for this cluster to use. In this example, the
same name that was used when creating the channels on each server in the cluster,
ReplicationChannel is used. This tells the cluster to use the channel named
ReplicationChannel for all replication traffic.
Note: You can optionally use SSL to secure your replication channel; however, doing so can
potentially cause a slowdown in performance because most replication is done
synchronously. This means that when a client updates its session state, that client waits for
WebLogic to finish updating the state of the secondary session before getting control back.
– Basic
– Multi-tier
2. Consider your network and security topologies.
A. Where to place firewalls
— Do not place firewalls in between cluster members. e
B. Decide on one-to-many cluster communication c e ns
e li
— Multicast
r a bl
Unicast s fe
an
—
– In-memory replication
– File storage
– JDBC storage
– Coherence*Web
7. If using the multi-tier architecture with EJBs, decide on the e
EJB load balancing algorithm. c e ns
e li
– Round-robin r a bl
– Random s fe
- t r an
– Weight-based n no
a
8. Decide how pinned services will be
) hashandled. i d eฺ
– Service-level migration om
c G u
ฺ t
– Whole server migration
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
EJB load ( lak choices are:
balancing
i G
m
ksh
• Round-robin (the default): The algorithm cycles through a list of WebLogic Server
La instances in order. The advantages of the round-robin algorithm are that it is simple,
quick, and very predictable. The disadvantage is it treats all servers the same (even
though you may have some that are faster than others).
• Random: The algorithm routs requests to servers at random. The disadvantages of
random load balancing include the slight processing overhead incurred by generating a
random number for each request, and the possibility that the load may not be evenly
balanced over a small number of requests.
• Weight-based: Each server hosting EJBs can be given a weight. Select the server in the
Servers table. Select Configuration > Cluster. Enter a number between 1 and 100 in
the Cluster Weight field. This value determines what proportion of the load the server
will bear relative to other servers in the EJB cluster.
A pinned service is one that is active on only one cluster host. JTA (transaction) recovery and
JMS Servers are pinned services.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
Select the cluster in the Clusters table and click the Control
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
bl e
fe r a
t r a nsfunctions
The same
no n- under the
as
a Servers
om t Gu
Control tab.
ฺ c
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The Migration subtab allows you to manually migrate “singleton” services from one server in
m iG
the cluster to another. Service-level and whole server migration are covered in the Oracle
a k sh WebLogic Server 12c: Administration II course.
L
When there are issues with a cluster, you have tools to help:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The table was customized to show each cluster server: name, state, how often it left the
m iG
cluster (went down), free heap memory, total heap size, and number of open sockets.
a k sh
L
messages.
– Set debug flags to generate more detailed log messages:
— In the administration console, select the server from Servers
table, click the Debug tab, expand scopes, and select flags.
• The OHS logs are found here:
<ORACLE_INSTANCE>/diagnostics/logs/OHS/ e n se
OHS_instance_name e l ic
l ab
– The OHS error log: <OHS_INSTANCE_NAME>.logsfer
ra events.
Records OHS errors, but can be configured to-trecord
n
on
—
La ksh
There are two types of logs for Oracle HTTP Server. Error logs record server problems, but
can also be configured to record other server events. Access logs record which components
and applications are being accessed and by whom. The location of the OHS logs is
configurable, as are the names of the log files. The location and names given in the slide are
their defaults.
nse
– ConnectTimeoutSecs (how long the plug-in waits to e
li c
establish a connection)
a b le
If this is set too low, the plug-in can give up on a server f r not
eand
—
connect to it. an s
n - t r
– ConnectRetrySecs (pause time before n oretrying a
a
connection)
) h as deฺ
—If this is accidentally set higher
c o ui
m thanGConnectTimeoutSecs,
the plug-in will alwaysetimeฺ outenduring t a retry.
g d
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
(la ksh to
miG
a k sh
L
o m server
primary server to the secondary
c G
t
geฺ (file
or to files or the database deorn database persistence).
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
sh to
( lak
To serialize an object means to convert its state to a byte stream so that the byte stream can
i G
m
be reverted into a copy of the object. A Java object is serializable if its class or any of its
La ksh
superclasses implements either the java.io.Serializable interface or its subinterface,
java.io.Externalizable.
cluster.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Transactions
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Objectives
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
nse
Application WebLogic Server Resource li c e
bl e
Transaction Manager Manager
fe r a
ans EJB
n - t r
a no
) has iResourced eฺ
TLog
ฺ c om t Gu Manager JMS
g e den
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
G (Server implements the Java Transaction API (JTA) to manage transactions.
WebLogic
i
m
La kshIt can act as the transaction manager to the various transactional resource managers in a
global, or distributed, transaction.
As it coordinates a global transaction, it tracks the transaction in a binary transaction log (also
called a TLog).
Resource(s)
Pre-commit ready Commit
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Committing
Resources nse
Start
done li c e
transaction
ble
Transaction
fe r a
No transaction
complete
t r a ns
Committed
no n-
a
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
States:( lak
m iG
a k sh • No transaction: No transaction in progress
L • Active: The application is processing the transaction. The transaction has not yet
reached the two-phase commit processing.
• Preparing: In the first phase of 2PC before all participants have responded: "ready to
commit.”
• Prepared: In between when all participants have responded to “prepare” but before the
commit point or the initiation of rollback processing
• Committing: The time from when the commit decision is made up to the point when all
participants have been informed of the outcome and the commit is complete
• Committed: The transaction has been committed
Resource(s)
Pre-commit ready Roll
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
back
Active Preparing Prepared
Rolling back
Resources nse
Start
done li c e
transaction
bl e
Transaction
fe r a
No transaction
complete
t r a ns back
Rolled
non-
a
) h as deฺ
Other possible Marked rollback
c o m Gui Unknown
states:
g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
States:( laks
m iG
a k sh • No transaction: No transaction in progress
L • Active: The application is processing the transaction. The transaction has not yet
reached the two-phase commit processing.
• Preparing: In the first phase of 2PC before all participants have responded: "ready to
commit”
• Prepared: In between when all participants have responded to “prepare” but before the
commit point or the initiation of rollback processing
• Rolling back: This state occurs from the point when rollback processing is initiated up
to the point when all participants have been instructed to roll back and the rollback is
complete.
• Rolled back: The transaction has been rolled back.
• Marked rollback : The transaction has been marked for rollback by application code, as
with the setRollbackOnly() method. The transaction has not started to roll back, but
it will be rolled back, eventually.
• Unknown: The transaction is in a transient condition. Currently, WebLogic Server does
not know the state of the transaction. The state will change soon.
global transactions.
• WebLogic Server’s JTA implementation:
– Creates a unique transaction identifier (XID)
– Supports an optional transaction name
– Tracks objects involved in transactions e
– Notifies databases of transactions c e ns
le li
– Orchestrates 2PC using XA a b
– Executes rollbacks s f er
- t r an
– Executes automatic recovery proceduresoinnthe event of
failure a n
) h as deฺ
– Manages timeouts m ui
co nt G
e
g udeฺ
i @
h is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
WebLogic Server’s implementation of JTA provides the following support for transactions. It:
i G
m
ksh
• Creates a unique transaction identifier when a client application initiates a transaction.
La • Supports an optional transaction name describing the business process that the
transaction represents. The transaction name makes statistics and error messages
more meaningful.
• Works with the WebLogic Server infrastructure to track objects that are involved in a
transaction and, therefore, must be coordinated when the transaction is ready to
commit.
• Notifies the resource managers (typically, databases) when they are accessed on behalf
of a transaction. Resource managers lock the accessed records until the end of the
transaction.
• Orchestrates the two-phase commit when the transaction completes, which ensures that
all the participants in the transaction commit their updates simultaneously. WebLogic
Server coordinates the commit with any databases that are being updated using the
Open Group’s XA protocol. Most relational databases support this standard.
1
2
nse
li c e
ble
fe r a
ans
n - t r 3
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
To configure transactions for the domain, perform the following:
i G
m
ksh
1. In the Change Center, click Lock & Edit. In the Domain Structure, select the domain
La name.
2. Select the Configuration tab and the JTA subtab.
3. Set the JTA attributes.
4. Click the Save button. In the Change Center, click Activate Changes.
Note that the monitoring of JTA and the JTA logging attributes are not set here. These are
found at the server level.
Field Description
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Field Description
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Lak decision. A heuristic decision occurs when a resource unilaterally decides, during the
completion stage of a transaction, to commit or rollback updates, no matter what it was
instructed to do by the transaction manager. This can leave data in an inconsistent
state. Network failures or resource timeouts are possible causes for heuristic decisions.
Disable this feature only if you know what to do with the resource when it reports a
heuristic decision.
• Unregister Resource Grace Period: The amount of time, in seconds, a transaction
manager waits for the transactions involving the resource to complete before
unregistering a resource. An example of a resource being unregistered is when you
undeploy a data source. This grace period helps minimize the risk of abandoned
transactions because of an unregistered resource. At the end of the grace period, if
outstanding transactions are associated with the resource, a log message is written to
the server on which the resource was previously registered.
• Execute XA Calls in Parallel: If threads are available, execute XA calls in parallel. This
is enabled by default.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( lak
m iG
a k sh
L
standard JTA.
• The WebLogic JTA transaction object supports the
weblogic.transaction.Transaction interface
(which extends javax.transaction.Transaction).
– This adds various capabilities, the most important of which,
nse
to an administrator, is the ability to name transactions. li c e
If developers write their code well, transactions can have abl
e
er
—
La ksh
Commit XA
Prepare XA
2 resources
resources
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
Application
t a ns
Commit
r
n o n- non-XA Database
Non-XA
a work
Record Tx for
3 ) as Source
hData deฺ
LLR
high availability
c o m G ui 4
g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
sh to
( lak
WebLogic Server maintains an LLR table on the database to which a JDBC LLR data source
i G
m
pools its connections. This table is used for storing transaction log records, and is
La ksh
automatically created. If multiple LLR data sources are deployed on the same WebLogic
Server instance and connect to the same database instance and schema, they will share the
same LLR table. LLR table names are automatically generated unless administrators choose
to configure them. The default table name is WL_LLR_SERVERNAME.
In a global transaction with an LLR participant, the WebLogic Server transaction manager
follows these basic steps:
1. It receives a commit request from the application.
2. It calls a “prepare” on all XA-compliant transaction participants.
3. It inserts a commit record to the LLR table on the LLR participant (rather than to the
usual transaction log).
4. It commits the LLR participant’s local transaction (which includes both the transaction
commit record insert and the application’s SQL work).
5. It calls a commit on all other transaction participants.
6. After the transaction completes successfully, it later deletes the database transaction log
entry as part of a future transaction.
La • Data Source: The JDBC data source used by the transaction manager to store transaction logs.
- Important notes about the data source: You cannot configure the transaction log
store to use a JDBC data source that is configured to use an XA JDBC driver nor
configured to support global transactions.
• Prefix Name: When using multiple TLOG JDBC stores, use this attribute to create a
label ending in "_." This label is prepended to the name of the server hosting the JDBC
TLOG store. After the server name, another "_" is appended to the string to form a
unique JDBC TLOG store name. The default prefix name is "TLOG_" . For example, a
valid JDBC TLOG store name, using the default Prefix Name, is TLOG_myserver_
where TLOG_ is the Prefix Name and myserver is the name of the server hosting the
JDBC TLOG store.
Note: By default, the table used for the TLog is named WLStore. If it does not already exist,
WebLogic Server creates it by using a default Data Definition Language (DDL) file. Under the
Advanced section of the Transaction Log Store settings, you can choose your own DDL file
(and other settings, as well).
g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
You can ( l
i Gconfigure a JDBC TLOG store to persist transaction logs to a database, which
m the following benefits:
provides
La ksh • JDBC stores may make it easier to handle failure recovery because the JDBC interface
can access the database from any machine on the same network.
• It can leverage the replication and high availability characteristics of the underlying
database.
• It simplifies disaster recovery by allowing the easy synchronization of the state of the
database and TLOGs.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Under the Summary tab:
m iG
a k sh • Transactions Total Count: The total number of transactions processed. This total
includes all committed, rolled back, and heuristic transaction completions since the
L server was started.
• Transactions Committed Total Count: The total number of transactions committed
since the server was started
• Transactions Rolled Back Total Count: The number of transactions that were rolled
back since the server was started
• Transactions Rolled Back for Timeout Total Count: The number of transactions that
were rolled back due to a timeout
• Transactions Rolled Back for Resource Errors Total Count: The number of
transactions that were rolled back due to a resource error
• Transactions Rolled Back for Application Errors Total Count: The number of
transactions that were rolled back due to an application error
• Transactions Rolled Back for System Errors Total Count: The number of
transactions that were rolled back due to an internal system error
• Transaction One Resource One Phase Committed Total Count: The total number of
transactions with only one enlisted resource that were one-phase committed since the
server was started
• Transaction Read Only One Phase Committed Total Count: The total number of
transactions with more than one enlisted resource that were one-phase committed due to
read-only optimization since the server was started
• Transaction Two Phase Committed Total Count: The total number of transactions with
more than one enlisted resource that were two-phase committed since the server was nse
started li c e
ble
• r a
Transaction LLR Committed Total Count: The total number of LLR transactions that
fe
were committed since the server was started
ans
• - t r
Active Transactions Total Count: The number of active transactions on the server
n
Other JTA subtabs: a no
has ideฺ
• Transaction Log Store Statistics: Runtime statistics for the transaction log store for this
)
ฺ c om t Gu
server displayed in a configurable table
ge uden
• Transaction Log Store Connections: Runtime statistics for the active transaction log
@
n d hi is St
store connections displayed in a configurable table
i ฺ gra se th
• Transactions By Name: This page shows statistics about named transactions
s h m to u
coordinated by the server.
( lak
• XA Resources: Use this page to monitor XA resource transactions coordinated by this
m iG
server.
a k sh • Non-XA Resources: This page shows information about transactions in which non-XA
resources on the server participate.
L
• Transactions: This page shows information about current transactions coordinated by the
server or in which server resources participate. It also allows you to select a transaction
that is in work and force a commit or rollback.
• Recovery Services: This page shows information about transactions that were processed
by the server as part of recovery on server startup or after a crash.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The columns in the table are:
m iG
a k sh • Name: The name of the XA resource that participated in the global transactions
L • Transactions: The total number of transactions processed. This total includes all
committed, rolled back, and heuristic transaction completions since the server was
started.
• Commits: The number of transactions that were committed since the server was started
• Rollbacks: The number of transactions that were rolled back since the server was
started
• Timeout Rollbacks: The number of transactions that were rolled back due to a timeout
• Resource Rollbacks: The number of transactions that were rolled back due to a
resource error
• Application Rollbacks: The number of transactions that were rolled back due to an
application error
• System Rollbacks: The number of transactions that were rolled back due to an internal
system error
previous slide, it is because not all tabs are shown in this screenshot due to space
limitations.
• The Non-XA Resources tab gives information about transactions in which non-XA
resources participated.
• A heuristic status (or heuristic decision) is a decision made by one or more resources in a
transaction to commit or roll back without first getting the consensus outcome that is
determined by the resource manager. A resource typically makes a heuristic decision only e
under abnormal circumstances, such as a communication failure. When a resource makes
c e ns
li
a heuristic decision, there is a chance that the decision made differs from that of the
e
transaction manager, resulting in a loss of data integrity. r a bl
s fe
- t r an
no n
a
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
Commit? Rollback?
Active Yes
Preparing Yes
Prepared Yes Yes
Committing Yes
nse
Committed Yes li c e
ble
Rolling Back Yes
fe r a
ans
Rolled Back Yes
n - t r
Marked Roll Back Yes
a no
Unknown Yes ) hasYesideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
What the ( lak values mean:
status
i G
m
ksh
• Active: The application is processing the transaction. The transaction has not yet
La reached the two-phase commit processing.
• Preparing: In the first phase of 2PC before all participants have responded: "ready to
commit”
• Prepared: In between when all participants have responded to “prepare” but before the
commit point or the initiation of rollback processing.
• Committing: The time from when the commit decision is made up to the point when all
participants have been informed of the outcome and the commit is complete.
• Committed: The transaction has been committed. It is likely that heuristics exist,
otherwise the transaction would have been completed and would not have been
displayed in the list of current transactions.
• Rolling Back: This state occurs from the point when rollback processing is initiated up
to the point when all participants have been instructed to roll back and the rollback is
complete.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
console.
– With all the possible states of a transaction, you can see how
far along in the process an active transaction is.
• Use the server logs.
– If a message is logged during a transaction, the transaction
ID is part of that log message. nse
li c e
– Look for exceptions in the logs. WebLogic JTA supports b allle
the standard JTA exceptions. fer a
an the s
—
- t r
It extends the RollbackException class to preserve
original reason for the rollback. non a
) h asmore
– Turn on transaction debug flags for
d edetailed
ฺ log
messages. m ui
co nt G
e
g udeฺ
i @
h is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
JTA Debugging Scopes (those not currently used by WebLogic Server are not listed):
i G
m
ksh
• DebugJTAXA (scope weblogic.transaction.xa) – Traces for XA resources
La • DebugJTANonXA (scope weblogic.transaction.nonxa) – Traces for non-XA
resources
• DebugJTAXAStackTrace (scope weblogic.transaction.stacktrace) –
Detailed tracing that prints stack traces at various critical points
• DebugJTA2PC (scope weblogic.transaction.twopc) – Traces all two-phase
commit operations
• DebugJTA2PCStackTrace (scope weblogic.transaction.twopcstacktrace) –
Detailed two-phase commit tracing that prints stack traces
• DebugJTATLOG (scope weblogic.transaction.tlog) – Traces transaction logging
information
• DebugJTAJDBC (scope weblogic.transaction.jdbc,
weblogic.jdbc.transaction) – Traces information about reading and writing JTA
records
• DebugJTAGatewayStackTrace (scope
weblogic.transaction.gatewaystacktrace) – Stack traces related to imported
transactions
• DebugJTANaming (scope weblogic.transaction.naming) – Traces transaction
naming information
• DebugJTANamingStackTrace (scope
weblogic.transaction.namingstacktrace) – Traces transaction naming nse
information li c e
• DebugJTAResourceHealth (scope weblogic.transaction.resourcehealth) – ble
fe r a
Traces information about XA transaction resource health
ans
• DebugJTAMigration (scope weblogic.transaction.migration) – Traces
n - t r
information about Transaction Log migration
a no
•
has ideฺ
DebugJTALifecycle (scope weblogic.transaction.lifecycle) – Traces
)
information about the transaction server lifecycle (initialization, suspension, resuming, and
shutdown) ฺ c om t Gu
• ge uden
DebugJTALLR (scope weblogic.transaction.llr) – Traces all Logging Last
@
Resource operations n d hi is St
• ฺ gra se th
DebugJTAHealth (scope weblogic.transaction.health) – Traces information
i
h m to u
about transaction subsystem health
s
• ( la k
DebugJTATransactionName (scope weblogic.transaction.name) – Traces
iG
transaction names
k s hm
• DebugJTAResourceName (scope weblogic.transaction.resourcename) – Traces
L a transaction resource names
_______________________.
a. WebLogic Server
b. Cluster
c. Transactional resource
d. Domain
nse
e. Continent li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
l ak
Gc (
Answer:
i
m
La ksh
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Objectives
Subject
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
has
*
Role * Principal *
assigned to
has
has nse
access
li c e
Policy to is a is a
ble
* fe r a
User ns
Group
a
o n -tr
a n
) has ideฺ
m u
Resource eฺco nt G
@ g ude
d i
h is St
n
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
A User is a Principal. A Group is a Principal. A Subject, after authentication, is assigned one
m iG
or more Principals (before authentication the Subject has zero Principals). A Group contains
a k sh zero or more Principals (Users and other Groups). A Principal (a User or, more often, a
L Group) is assigned to zero or more Roles. A Policy states that a particular Role has access to
a particular Resource (or set of Resources).
Note: The “*” means “zero or more.”
in the request parameters in a format that the role mapping provider can use. The role
mapping provider uses the request parameters to compute a list of roles to which the
subject making the request is entitled, and passes the list of applicable roles back to the
WebLogic Security Framework. The authorization provider determines whether the subject
is entitled to perform the requested action on the WebLogic Server resource.
• Adjudication: The adjudication provider determines what to do if multiple authorization
providers’ access decisions do not agree. The adjudication provider resolves authorization e
conflicts by weighing each access decision and returning a final result.
c e ns
• e
Role Mapping: The WebLogic Security Framework calls each role mapping provider that li
r a bl
is configured as part of an authorization decision (see the explanation of the authorization
s fe
- t an
provider). The role mapping provider returns the list of roles a particular user has. These
r
roles are returned to the WebLogic Security Framework, where they can be used in an
no n
access decision. WebLogic Server resources can be configured so that certain roles can
a
has ideฺ
perform certain actions. (For example, in a web application, resources (given as URL
)
patterns), can be protected so that only a user with the proper role is allowed access to
them.) ฺ c om t Gu
• ge uden
Password Validation: When the password validation provider is configured with an
@
d hi is St
authentication provider, the authentication provider invokes the password validation
n
i ฺ gra se th
provider whenever a password is created or updated. The password validation provider
s h m to u
then performs a check to determine whether the password meets the criteria established
( la k
by a set of configurable rules.
m iG
a k sh
L
ge uden
<WL_HOME>/server/lib.
@
hi is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
WebLogic ( lak uses its embedded LDAP server to store users, groups, security roles, and
Server
m i Gpolicies for the WebLogic security providers. The embedded LDAP server is a
security
a k shcomplete LDAP server that is production quality for reasonably small environments (10,000 or
L fewer users). For applications that need to scale above this number, the embedded LDAP
server can serve in the development and integration environments for future export to an
external LDAP server for the test and production environments.
When the RDBMS security store is configured in a security realm, any of the following security
providers that have been created in the security realm automatically uses only the RDBMS
security store, and not the embedded LDAP server:
• XACML Role Mapping and Authorization
• Default, PKI, and SAML Credential Mapping
• SAML Identity Assertion
Other security providers continue to use their default security stores; for example, the
WebLogic authentication provider continues to use the embedded LDAP server. Note that the
use of the RDBMS security store is required to use SAML 2.0 services in two or more
WebLogic Server instances in a domain, such as in a cluster.
Server
• Includes default providers:
Users
– Default authenticator Groups
– Default identity asserter Roles
Policies
– XACML* role mapper
Replicated to
– XACML* authorization provider e
– Default password validator c e ns
Managed Managed
e li
– Default credential mapper Server
feabl
Server
r
– Default certificate path provider a n s
Validates certificate chains o n -tr
—
a n
• Uses the embedded LDAP security
) h as deฺ
store
c o m Access
* eXtensible G uiControl Markup Language:
g ฺ XML-based
eAn d e nt security policy language
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
G ( the configuration and management of security, WebLogic Server provides a
To simplify
i
m security configuration. In the default security configuration, a default security realm,
shdefault
Lak myrealm, is set as the active security realm, and the WebLogic authentication, identity
assertion, credential mapping, certification path, password validation, EXtensible Access
Control Markup Language (XACML) authorization, and XACML role mapping providers are
defined as the security providers in this security realm. (XACML is OASIS standard, XML-
based, security policy, and access control language.)
The WebLogic Server embedded LDAP server for a domain consists of a master LDAP
server, maintained in the domain’s administration server, and a replicated LDAP server
maintained in each managed server in the domain. When changes are made using a
managed server, updates are sent to the embedded LDAP server on the administration
server. The embedded LDAP server on the administration server maintains a log of all
changes. The embedded LDAP server on the administration server also maintains a list of
managed servers and the current change status for each one. The embedded LDAP server
on the administration server sends appropriate changes to each managed server. This
process occurs when an update is made to the embedded LDAP server on the administration
server. However, depending on the number of updates, it may take several seconds or more
for the changes to be replicated to the managed servers.
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The easiest way to customize the default security configuration is to add the security
m iG
providers you want to the default security realm (myrealm). Many customers instead create
a k sh an entirely new security realm and place in it the security providers they want. This preserves
L your ability to revert more easily to the default security configuration. You configure security
providers for the new realm, migrate any security data, such as users and groups, from the
existing default realm, and then set the new security realm as the default realm.
A valid security realm requires an authentication provider, an authorization provider, an
adjudication provider, a credential mapping provider, a role mapping provider, and a
certification path builder. Optionally, define identity assertion, auditing, and certificate registry
providers. If you configured the default authentication, authorization, credential mapping, or
role mapping provider or the default certificate registry in the new security realm, verify that
the settings of the embedded LDAP server are appropriate.
• Authenticators:
– Establish the user’s identity given some credentials (like
username and password)
– Can associate multiple principals with a single user, such as
groups
nse
• Identity asserters: c e
le li
– Validate tokens claiming a user has already been a b
authenticated s f er
– Allow WebLogic Server to participate in single- t r an (SSO)
sign-on
solutions n on
s a
– Can map the token to a local user
) a eฺ authenticators to
h andiduse
m Gu
ฺco
look up that user’s principals t
ge uden
@
hi is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Authentication providers are used to prove the identity of users or system processes.
m iG
Authentication providers also remember, transport, and make that identity information
a k sh available to various components of a system (via subjects) when needed.
L Both users and groups can be used as principals by application servers like WebLogic
Server. A principal is an identity assigned to a user or group as a result of authentication. The
Java Authentication and Authorization Service (JAAS) requires that subjects be used as
containers for authentication information, including principals. Each principal stored in the
same subject represents a separate aspect of the same user's identity, much like credit cards
in a person's wallet.
An identity assertion provider is a specific form of authentication provider that allows users or
system processes to assert their identity using tokens supplied by clients. Typical token types
include X509 certificates, SAML, and Kerberos. Identity assertion providers enable perimeter
authentication and support single sign-on (SSO). For example, an identity assertion provider
can generate a token from a digital certificate, and that token can be passed around the
system so that users are not asked to sign on more than once.
Unlike in a simple authentication situation, identity assertion providers do not verify
credentials such as usernames and passwords. They verify that the user exists.
The SAML identity assertion provider acts as a consumer of SAML security assertions, allowing
WebLogic Server to participate in SSO solutions for web or web service applications. It validates
assertions by checking the signature and validating the certificate for trust based on data
configured for the associated partner. The provider then extracts the identity information
contained in the assertion, and maps it to a local subject in the security realm.
The Negotiate identity assertion provider enables SSO with Microsoft clients. The provider
decodes Simple and Protected Negotiate (SPNEGO) tokens to obtain Kerberos tokens, ns e
validates the Kerberos tokens, and maps Kerberos tokens to WebLogic users. li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
• LDAP:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
– Is a TCP/IP protocol
– Provides a hierarchical lookup and search service
– Models information as a tree of entries, whose attributes are
defined by a schema or “object class”
– Defines default schemas for common entries like people and
groups e n se
– Supports SSL e l ic
bl ra
• Entries: f e
tr ans
– Identify their locations in the tree by using an-distinguished
name (DN) n o
a
s eฺ
) haLDAP
– Can be referrals that link to other idservers
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The Lightweight Directory Access Protocol, better known as LDAP, is a protocol that provides
m iG
access to a compliant directory of information via TCP/IP (Transmission Control
a k sh Protocol/Internet Protocol). The strengths of LDAP-compliant directories include speed,
L simplicity, and the ability to be replicated and distributed across several servers. An LDAP
directory can be used to store a great deal of information from user login credentials to
company telephone directories.
Unlike databases that are designed for processing hundreds or thousands of changes per
minute, LDAP directories are heavily optimized for read performance. LDAP is intentionally
designed for environments where search operations are much more common than modify
operations.
LDAP Version 3 implements a referral mechanism that allows servers to return references to
other servers as a result of a directory query. This makes it possible to distribute directories
globally by partitioning a directory information tree (DIT) across multiple LDAP servers.
Organizational
unit (ou) employees contractors
nse
li c e
bl e
fe r a
Unique
t r a ns
on-
identifier mort marie mark mimi mike
(uid)
a n
h ideฺ
a s
) u
Person DN: uid=marie,
ฺ c om ou=employees,
t G o=myldap
e
g ude n
i @
h is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
Directories are viewed as a tree, analogous to a computer’s file system. Each entry in a
i G
m
directory is called an object. These objects are of two types: containers and leaves. A
La ksh
container is like a folder; it contains other containers or leaves. A leaf is simply an object at
the end of a branch. A tree cannot contain any arbitrary set of containers and leaves. It must
match the schema defined for the directory.
The top level of the LDAP directory tree is the base, referred to as the base DN. A base DN
can be one of several forms. Here are some examples:
• A domain name, broken into components (dc=Acme,dc=com)
• An organization name (o=Acme Corp)
• An organization name along with a country (o=Acme Corp,c=India)
Organizational units are standard LDAP object classes that act as containers for other entries.
The identifying attribute for an organizational unit is “ou.” The standard LDAP schema also
defines a person class and a group class, which is a collection of people.
The person type also includes other attributes such as Common Name (a person’s full
name: cn), Unique Identifier (uid), Surname (last name: sn), and Password
(userpassword).
• = (equal)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
– Example: (uid=tjp)
• & (logical and)
– Example: (&(uid=tjp)(sn=Parker))
• | (logical or)
– Example: (|(uid=tjpark)(uid=tjp)) e
c e ns
• ! (logical not)
e li
– Example: (!(sn=Parker)) r a bl
s fe
• * (wildcard)
- t r an
n no
Here is an LDAP search filter that finds all person a
s entries whose user ID
begins with “t,” while ignoring those whose)surnameid h a e ฺ
starts with “Th”:
o m G u
eฺc dent
(&(&(uid=t*)(!(sn=Th*)))(objectclass=person))
g
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
The “&”G ( l
represents a logical “and” when combining multiple expressions that have been
i
m together in parentheses. Similarly, the “|” represents a logical “or,” and a “!”
grouped
nse
li c e
LDAP Authenticator
bl e
fe r a
an s
n - t r
OpenLDAP Oracle Internet Directory a noOracle Active Directory
Authenticator Authenticator
) has ideฺ Authenticator
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Each LDAP authentication provider stores user and group information in an external LDAP
m iG
server. The providers differ primarily in how they are configured by default to match typical
a k sh directory schemas for their corresponding LDAP server. For example, the generic
L authenticator is configured to use a person's common name (cn) as a user ID, while by
default Oracle Internet Directory uses the “uid” attribute for this purpose. Similarly, the names
of object classes used to represent people or groups may vary from vendor to vendor. For
example, the generic authenticator is configured to use the object class
“groupofuniquenames,” while by default Oracle Internet Directory uses the object class
“groupofnames.”
WebLogic Server does not support or certify any particular LDAP servers. Any LDAP v2 or v3
compliant LDAP server should work with WebLogic Server.
If an LDAP authentication provider is the only configured authentication provider for a security
realm, you must include the Admin role and assign that role to a user or group of users in the
LDAP directory. If the LDAP user who boots WebLogic Server is not properly added to a
group that is assigned to the Admin role, and the LDAP authentication provider is the only
authentication provider with which the security realm is configured, WebLogic Server cannot
be booted.
1
nse
li c e
4bl
e
fe r a
ans
n - t r
a no
2
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
1. ( l ak
After locking the configuration, in the Domain Structure, select Security Realms.
m iG
a k sh 2. In the Realms table, click the realm name.
L 3. Select Providers > Authentication. Click the New button.
4. Enter the Name of the provider and select the Type from the drop-down list. Then click
OK.
nse
li c e
5 ble
fe r a
ans
7 n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
5. Click the name of the new provider in the Authentication Providers table.
m iG
a k sh 6. Click Configuration > Provider Specific.
L 7. Enter values for the following connection attributes:
- Port: The port of the LDAP server
- Principal: The Distinguished Name (DN) of the LDAP user that WebLogic Server
should use to connect to the LDAP server
- Credential: The credential (usually a password) used to connect to the LDAP
server
- SSL Enabled (shown on next slide): Specifies whether the SSL protocol should be
used when connecting to the LDAP server. For a more secure deployment, Oracle
recommends using the SSL protocol to protect communication between the LDAP
server and WebLogic Server.
8. Click Save. Then activate the changes.
to start searching
How to retrieve
all users
How to retrieve
a user, given nse
the username li c e
bl e
fe r a
t r a ns attribute
Entity
no n- that contains
the username
a
) has ideฺ
ฺ c om t Gu Schema used to
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Enter values for any of the following user search attributes:
m iG
a k sh • User Base DN: The base distinguished name (DN) of the tree in the LDAP directory
that contains users
L
• All Users Filter: The LDAP filter expression used to retrieve all users. If not specified, a
simple default filter is generated based on the user object class.
• User From Name Filter: The LDAP filter expressions used to locate a user entry given
its user ID. Use the token “%u” to indicate where the provider should insert the user ID
before executing the search.
• User Search Scope (not shown): Specifies how deep in the LDAP directory tree the
provider should search for users. Valid values are “subtree” and “onelevel.”
• User Name Attribute: The attribute of an LDAP user object that specifies the user’s
login ID
• User Object Class: The LDAP object class that stores users
• Use Retrieved User Name as Principal (not shown): Specifies whether or not the
username retrieved from the LDAP server should be used as the principal
Location in the
tree from which
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
to start searching
How to retrieve
all groups
How to retrieve
a group, given
its name nse
li c e
bl
Entity attribute thate
fe r a
contains group name
t r a ns
n- Schema used to
no
s a model a group
a ฺ
m ) h uide Entity attribute that
e ฺ co nt G contains members
@ g ude
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Enter values for any of the following group search attributes:
m iG
a k sh • Group Base DN: The base distinguished name (DN) of the tree in the LDAP directory
that contains group definitions.
L • All Groups Filter: An LDAP filter expression for finding all groups beneath the base
group distinguished name (DN). If not specified, a simple default search filter is created
based on the group object class.
• Group From Name Filter: An LDAP filter expression for finding a group given the name
of the group. Use the “%g” token to indicate where the provider should insert the user ID
before executing the search. If not specified, a simple default search filter is created
based on the group schema.
• Group Search Scope (not shown): Specifies how deep in the LDAP directory tree to
search for groups. Valid values are “subtree” and “onelevel.”
• Ignore Duplicate Membership (not shown): Determines whether duplicate members
are ignored when adding groups.
Note: A static group contains a list of members that you explicitly administer. A dynamic group
is one whose membership, rather than being maintained in a list, is computed, based on rules
and assertions you specify.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( lak
m iG
a k sh
L
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Enter values for any of the following attributes that apply to subgroup searching:
m iG
a k sh • Group Membership Searching: Specifies whether recursive group searches into
nested groups are unlimited or limited. For configurations that use only the first
L level of nested group hierarchy, this attribute allows improved performance during user
searches by limiting the search to the first level of the group.
• Max Group Membership Search Level: Specifies how many levels of group
membership can be searched. This setting is valid only if Group Membership Searching
is set to “limited.” A value of 0 indicates that only direct groups will be found. That is,
when searching for membership in Group A, only direct members of Group A will be
found. If Group B is a member of Group A, the members of Group B will not be found by
this search. Any non-zero value indicates the number of levels to search. For example, if
this attribute is set to 1, a search for membership in Group A will return direct members
of Group A. If Group B is a member of Group A, the members of Group B will also be
found by this search. However, if Group C is a member of Group B, the members of
Group C will not be found by this search.
high availability.
• Connection attempts can be made sequentially or in
parallel. List of hosts
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Enabling a cache involves a trade-off of performance and accuracy. Using a cache means
iG
k s hm that data is retrieved faster, but it runs the risk that the data may not be the latest available.
La The time-to-live (TTL) setting specifies how long you are willing to accept potentially stale data. What this value should be depends upon your particular business needs. If you
frequently change group memberships for users, then a long TTL could mean that group-
related changes will not show up for a while. If group memberships almost never change after
a user is added, a longer TTL may be fine. TTL attributes are specified in seconds.
The cache size is related to the amount of memory you have available, as well as the cache
TTL. Consider the number of entries that might be loaded in the span of the TTL, and size the
cache in relation to that number. A longer TTL will tend to require a larger cache size. For
group membership caching, specify the number of groups to cache. For basic entry caching,
specify the maximum size of the cache in kilobytes.
providers.
• For authenticators, control flags determine the processing
logic as each provider is executed.
Change
execution order.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
Each security realm must have at least one authentication provider configured. The WebLogic
m iG
Security Framework supports multiple authentication providers for multipart authentication.
a k sh Therefore, you can use multiple authentication providers as well as multiple types of
L authentication providers in a security realm.
The order in which WebLogic Server calls multiple authentication providers can affect the
overall outcome of the authentication process. The Authentication Providers table lists the
authentication providers in the order in which they will be called. By default, authentication
providers are called in the order in which they were configured. Use the Reorder button on
the Security Realms > Providers > Authentication page in the administration console to
change the order in which authentication providers are called by WebLogic Server and listed
in the console.
When you configure multiple authentication providers, also use the Control Flag for each
provider to control how the authentication providers are used in the login sequence. When
additional authentication providers are added to an existing security realm, by default the
Control Flag is set to OPTIONAL. If necessary, change the setting of the Control Flag and the
order of authentication providers so that each authentication provider works properly in the
authentication sequence.
Action Action
REQUIRED Must succeed Execute next Execute next provider,
provider but outcome is: FAIL
REQUISITE Must succeed Execute next Return control to
provider application with: FAIL
SUFFICIENT Not required to succeed Return control to Execute next provider
ns e
application with:
li c e
SUCCESS
a b le
OPTIONAL Not required to succeed Execute next Execute next s f er
provider
provider
- t r an
n on
s a
) h ideฺ
a
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak The authenticator is required to succeed. If it succeeds or fails,
• REQUIRED:
G
iauthentication
sh m still continues to proceed down the list. If it has failed, the overall outcome
Lak of the authentication is a failure. Use case: This authenticator must succeed, but you still
wish to call other authenticators. Perhaps another of the authenticator performs some
auditing function.
• REQUISITE: The authenticator is required to succeed. If it succeeds, authentication
continues down the list. If it fails, control immediately returns to the application
(authentication does not proceed down the list). Use case: This authenticator must
succeed. If it fails, there is no need to call any other authenticator.
• SUFFICIENT: The authenticator is not required to succeed. If it does succeed, control
immediately returns to the application (authentication does not proceed down the list). If
it fails, authentication continues down the list. Use case: This authenticator does not
have to succeed, but if it does, it is sufficient to validate the user, so no other
authenticators need to be called.
• OPTIONAL: The authenticator is not required to succeed. If it succeeds or fails,
authentication still continues to proceed down the list. Use case: This authenticator does
not have to succeed. No matter what it returns, the overall outcome can be success or
failure.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( lak
m iG
a k sh
L
• If you think users are doing things that they should not do,
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
SAML tokens )
om t Gu
—
ฺ c
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
In addition to the events listed in the slide, the default WebLogic auditing provider records the
m iG
following types of security events:
a k sh • When the lock-out on a user account expires.
L
• A security policy is used and an authorization decision is made.
• A role definition is used.
• A role or policy is removed or “undeployed.”
The WebLogic auditing provider audits security events of the specified severity and higher.
The severity levels, in order from lowest to highest, are: INFORMATION, WARNING, ERROR,
SUCCESS, FAILURE. You can also set the severity level to CUSTOM, and then enable the
specific severity levels that you want to audit, such as ERROR and FAILURE events only.
An audit event includes a context object that can hold a variety of different attributes,
depending on the type of event. When you configure an auditing provider, you specify which
context attributes are recorded for each event. By default, no context attributes are audited.
1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
2 nse
Context attributes to
li c e
record
bl e
fe r a
an s
n - t r
a no
h a s eMinimum ฺ severity to
m ) u id record
o G
g eฺc dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
h to
( laks
1. After locking the configuration, in the Domain Structure, select Security Realms and
m iG
click the name of the realm you are configuring (for example, myrealm). Click the
a k sh Providers > Auditing tabs. Click New. Give the provider a Name and keep the Type of
L DefaultAuditor.
2. Select the new provider in the table and click the Configuration > Provider Specific
tabs.
3. Update the following fields, if desired:
- Active Context Handler Entries: Specifies which context attributes are recorded
by the auditing provider, if present within an event. Use the arrow buttons to move
the Available entries to the Chosen list. The context attributes are things like
HttpServletRequest, HttpServletResponse, Port, Protocol, Address,
and so on.
- Rotation Minutes: Specifies how many minutes to wait before creating a new
audit file. At the specified time, the audit file is closed and a new one is created.
- Severity: The minimum severity level an event must have to be recorded
- There are more options if the Severity chosen is CUSTOM. There are also options
to configure the format of audit log entries under “Advanced.”
Flag Description
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
• The wrong base DN, object class, or attribute has been set
for users or groups.
• A configured search filter is syntactically valid, but it is
semantically incorrect.
– So, it fails to retrieve the intended users or groups. e
• An insufficient “maximum level for nested group c e ns
e li
memberships” has been set. r a bl
– So, not all group members are found, which means ns some fe
t r a
on-
users are not mapped to their proper roles.
n
• WebLogic Server does not trust the s a server’s SSL
LDAP
certificate (and they are set to ) h ideฺ over SSL).
a
communicate
m u
co nt G
e
g udeฺ
i @
h is St
n d
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
After a user is authenticated, groups are searched to create a list of groups to which this user
i G
m
belongs. Then role mapping can occur between these groups and roles. If the user does not
La ksh
belong to any groups or if the search criteria are invalid, you will see debug messages:
<SecurityDebug> <search(...), base DN & below)>
<SecurityDebug> <Result has more elements: false>
The Max Group Membership Search Level field, in the configuration of an LDAP
authentication provider, specifies how many levels to search when looking for members of a
group. (This setting is valid only if Group Membership Searching is set to limited.) A
value of 0 indicates that only direct groups will be found. This means that, when searching for
membership in Group A, only direct members of Group A are found. If Group B is a member
of Group A, the members of Group B will not be found. A nonzero value indicates how many
levels to search. For example, if it is set to 1, a search for membership in Group A will return
direct members of Group A. If Group B is a member of Group A, the members of Group B will
also be found. However, if Group C is a member of Group B, the members of Group C will not
be found.
If WebLogic Server does not trust the LDAP server’s certificate and you have set them up to
communicate over SSL, they will not be able to communicate. Perhaps the LDAP server’s
certificate is from a CA that is not in WebLogic Server’s trust keystore.
a. Directory Network
b. Dynamic Name
c. Distinguished Name
d. Directory Name
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
l ak
Gc (
Answer:
i
m
La ksh
a k sh
m iG
( la
k s h
i ฺ
n
m to u
d
@
gra se th
ฺ c
hi is St
)
ge uden
om t Gu
a
has ideฺ
n no
- t r an
s
fe r a bl
eli c e ns
e
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
Backup Recovery
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
- Deployed applications, such as .ear or .war files that reside outside of the domain
directory. You do not need to back up application artifacts in managed server
directory structures because they can be retrieved from the Administration Server
during managed server startup.
- Database artifacts including any database-based metadata repositories used by
Oracle Fusion Middleware. You can use Oracle Recovery Manager (RMAN) to back
up an Oracle database. nse
- Persistent stores, such as JMS resources and WebLogic Server TLogs (transaction li c e
ble
logs)
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
• Online:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
– Non-disruptive
– Possibly inconsistent
— If backing up takes one hour, the changes made during that
hour will not be within the backup and must be tracked
• Offline:
– Requires all processes to be stopped nse
li c e
– Relatively easy ble
fe r a
• Full: s
- t r an
– Easier to recover, slower to create n
a no
• Incremental:
) h as deฺ
– Harder to recover, faster to m create ui
c o G
g eฺ dent
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
OnlineG (
l
m i
ks h
If your environment requires 24x7 availability, you have no choice but to perform online
La backups. Different components require different tools to perform online backups (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 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 backup
is fairly simple (also known as a cold or consistent backup). Using operating system tools
such as TAR or ZIP, the backup is guaranteed to be consistent. Make sure you preserve file
permissions on UNIX systems.
and keep several generations of them in case you accidentally capture “a problem” in the most
recent backup.
Incremental
Considering that the executable files and the configuration files are usually backed up
separately, most backups are incremental. Backing up “changes only” may require several sets
of backups to perform a full recovery. RMAN can help automate this for databases, especially if
the backups are kept online (on disk as opposed to tape). e
You can make an incremental backup at the functional level. For example, you can make a c e ns
WebLogic backup from <WL_HOME>, make an instance backup from <ORACLE_INSTANCE>, e li
make a database backup from <ORACLE_HOME>, and so on. With WebLogic Server, make a r a bl
s fe
- t an
backup of all domains and then make backups of individual domains. The disadvantage of
r
doing this is that the backup process will take longer, but the advantage is that the recovery
no n
process can be simplified. Alternatively, if you do not make so many different kinds of
a
) has ideฺ
incremental backups, the backup procedure will complete faster, but now you have complicated
and lengthened your potential recovery time. It is a delicate tradeoff balancing storage space
versus time versus complexity. ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
2. Back up <MW_HOME>.
3. Back up the domain.
4. Back up directories from which applications are deployed.
5. Back up the managed server domains on other machines
or re-create their domains with the pack/unpack utilities.
e n se
6. Back up the instance home for configured system e l ic
components (like OHS). r a bl
n s fe
7. Back up the database using RMAN.
n - tra
8. Back up Oracle Inventory. a no
9. Back up the oraInst.loc and as deฺ files (in /etc).
) horatab
i
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To perform a full offline backup:
m iG
a k sh 1. Shut down all processes in Middleware home: 1) system components 2) managed
servers 3) admin server 4) Node Managers 5) database 6) database listeners.
L
2. Back up the Middleware home directory, <MW_HOME>. For example:
tar -cpf mw_home_backup_04-12-2013.tar $MW_HOME/*
3. Back up the domain. For example:
tar -zcpf domain_backup_04-12-2013.tarz domain_dir/*
Note: It is also possible to use the pack utility.
4. Back up the directory from which applications are deployed. For example:
tar -zcpf app_backup_04-12-2013.tarz app_dir/*
Note
- If you deploy applications from a directory inside the domain, this is unnecessary.
- If you used the pack utility to back up the domain, the deployed applications are
already in the JAR file in a directory called _apps_.
- For example:
tar -cpf instance_home_backup_04-12-2013.tar
$ORACLE_INSTANCE/*
7. Back up the database repositories by using the Oracle Recovery Manager (RMAN). If you
are doing a full offline backup, you do not need to use RMAN, instead you can just create
a TAR file of the database.
nse
8. Back up the OraInventory directory.
li c e
- For example:
ble
tar -cpf orainven_home_backup_04-12-2013 fe r a
ans
t r
/u01/app/oracle/oraInventory
n -
no
9. Back up the oraInst.loc and oratab files, which are usually located in the /etc
a
has ideฺ
directory.
)
10. Back up the oraenv utility found in the user bin directory, for example,
/usr/local/bin. ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
<ORACLE_INSTANCE>/*
Note: Inform administrators to refrain from configuration changes until after the backup.
6. Back up the database repositories by using the Oracle Recovery Manager (RMAN).
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
nse
li c e
ble
fe r a
t r a ns
on-
Disabled by default
n
s a
a
hHow many d ฺ
earchives
) i
ฺ c om t Guto save
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
shm to u
( lak
Under the_domain_name > Configuration > General > Advanced, you can enable the
i G
m
automatic backup of the configuration at the domain level. Each startup of the administration
La ksh
server creates two files in the domain directory: config-booted.jar and config-
original.jar. In addition, each activated change of the configuration makes a backup
named configArchive/config-n.jar, where n is a sequential number. The Archive
Configuration Count attribute limits the number of retained configuration JARs. In the example
shown, there are never more than five archive files kept. After five backups, older backups are
automatically deleted.
You may want to set a higher number such as 10 or 20 for the Archive Configuration Count
depending on:
• The available disk space
• The need for backup and restoration
• The time taken for backup and restore activity
• A Middleware home
• An Oracle home
• An Oracle WebLogic Server domain
• The administration server configuration
• A managed server nse
li c e
• An Oracle instance le
a b
• Fusion Middleware system component configurations s f er and
data - t r an
n no
a
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
To restore a Middleware home:
m iG
a k sh • Stop all relevant processes that are related to the domain, such as the administration
server, Node Manager, and managed servers.
L
• Restore the Middleware home directory from a backup.
• Start all relevant processes that rely on the Middleware home.
To restore an Oracle WebLogic Server domain:
• Stop all processes that are related to the domain, such as the administration server and
managed servers.
• Restore the domain directory from backup.
• Start all processes that are related to the domain.
- If you cannot start the administration server, or managed server, you may need to
perform recovery of those components.
If the administration server configuration has been lost because of file deletion or file system
corruption, the administration server console continues to function if it was already running.
The administration server directory is regenerated automatically. However, the security
information is not generated. As a result, whenever you start the administration server, it
prompts for a username and password. To prevent this, you can recover the configuration.
G (laconfiguration
during
version. For Java
of a component. In these cases, you may want to revert to an earlier
components, perform the steps to restore a managed server. For
m i
ksh
System components such as OHS, Oracle Web cache, and so on:
La - Stop the component.
- Restore the files from the appropriate backup.
- Start the component.
a component, rather than just restoring one or two files. In this way, you are more likely to
guarantee a successful recovery.
• Recover the database to the most current state, using point-in-time recovery (if the
database is configured to be able to do this). This is typically a time right before the
database failure occurred.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
– Data loss
– User error
– Malicious attack
– Corruption of data
– Media failure e
– Application failure c e ns
e li
• Recovery depends on the cause: r a bl
s fe
– Repair
- t r an
– Replace no n
a
– Relocate
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
If the problem was caused by a minor configuration error, the administrator may be able to
m iG
reverse the steps and remove the problem without a formal recovery. If the problem requires
a k sh replacing hardware, restore using full backups. Recovery is complicated when you need to
L 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.”
d h i@ Stu
r a n this
m iฺg u© s2013,
Copyright e Oracle and/or its affiliates. All rights reserved.
a k sh to
l
G ( pack command that created the remote managed server domain JAR file can be
The original
i
m to recreate the managed server domain in a recovery. The significant configuration and
shused
Lak application files are stored at the administration server, so when the managed server is
started, it first refreshes all its configuration information and redeploys all its applications from
the administration server.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra se th
s h m to u
( la k
m iG
a k sh
L
nse
Enabled li c e
by default ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
The administration server is required only for making changes to the active configuration. It is
m iG
not required for the normal operation of the managed servers, as long as the managed
a k sh servers have Managed Server Independence mode enabled, which is the default. This allows
L 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 time 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 default times
can be changed to suit your particular environment.
Upgrade
Assistant(s)*
Start
Yes
A. In the terminal
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2015, Oracle and/or its affiliatesฺ
window, run
<MW_HOME>/
oracle_common/
common/bin/
reconfig.sh.
B. Go through the nse
li c e
wizard screens. e
r a bl
C. Manually finish the s fe
Node Manager - t r an
no n
configuration. a
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
( lak
C. To finish the Node Manager configuration:
m iG
a k sh 1. Run <WL_HOME>/server/bin/startNodeManager.sh.
L 2. Copy the <WL_HOME>/common/nodemanager.properties file from the previous
installation into the
<MIDDLEWARE_HOME>/oracle_common/common/nodemanager/ directory of the
new installation.
3. Shut down and restart Node Manager.
4. Verify that you can start servers through Node Manager.
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
• Backing up a domain
• Restoring a domain
nse
li c e
ble
fe r a
ans
n - t r
a no
) has ideฺ
ฺ c om t Gu
@ ge uden
n d hi is St
i ฺ gra © s2013,
Copyright e h and/or its affiliates. All rights reserved.
tOracle
s h m to u
(l ak
miG
a k sh
L
a k sh
m iG
( la
k s h
i ฺ
n
m to u
d
@
gra se th
ฺ c
hi is St
)
ge uden
om t Gu
a
has ideฺ
n no
- t r an
s
fe r a bl
eli c e ns
e