Oracle WebLogic server 11g administration handbook ...

48 downloads 5482 Views 381KB Size Report
UpgradingOracleWebLogicServer 25 ... Oracle WebLogic server 11g administration handbook : [install, configure, manage, and secure Oracle WebLogic Server 11g]
Oracle Press

ORACLE:

Oracle

WebLogic

Server

11g

Administration Handbook

Sam R.

Alapati

Mc Graw Hill New York

Chicago

San Francisco

London Madrid Mexico City Milan Delhi San Juan Seoul New Singapore Sydney Lisbon

Toronto

ISP

Foreword

xix

Acknowledgments

xxi

Introduction

1

xxiii

Installing WebLogic Server and Using the Management Tools

1

Oracle

2

WebLogic Server: An Overview Oracle WebLogic Server Product

Set

2

Terminology

3

Important WebLogic Server Concepts

9

Execute Threads and Queues

9

Implementing

the JMX API and MBeans

10

Development

and Production Mode

11

Listen Ports and Listen Threads

11

Choosing

12

Using

a

JVM

Web Server

Plug-Ins

12

Management APIs

Installing Oracle WebLogic

13 Server

11g

14

Development-Only Installation Installation Prerequisites

14

15

Installation Modes

15

Installation Procedures

15

Checking the Installed

Features

18

Reinstalling WebLogic

Server

20

Exploring the Installation Directories The WebLogic Server Sample Applications Starting the Examples Stopping the Server

20 22

Server.

23 24

ix

X

Oracle

WebLogic Server 11g Administration Handbook

Upgrading Oracle WebLogic Upgrade

25

Server

Tools

25 25

Upgrade Procedures Performing Using

a

26

Rolling Upgrade

the Administration Console

28



29

Logging into the Administration Console Navigating the Administration Console the



Center

Using Change Working with the Administration Console Node Manager The

WebLogic Scripting

31 33 36

Tool (WLST)

39

Offline and Online WLST

39

Invoking WLST

39

in

to

Connecting

Script Mode a WebLogic Server

40 Instance

41

Disconnecting from the Server Using the Help Command

42

Key WLST Command Groups

43

43

45

Summary

Administering WebLogic

Server Instances

47 48

Managing the Servers Administration and

Servers

Managed

Admin Server Failures and the

Selecting

the Start Mode for

Configuring Class Setting the

a

Server

Manage Manager Capabilities to

49 49

51 51

Environment

Using the Node Manager Node

Managed

48 Servers

Caching

Configuring Server Instances Providing User Credentials

with the Console

52

54 Servers

57 57

Starting the Node Manager

59

Stopping the Node Manager

60

Monitoring

the Node

Configuring the Node

61

Manager Logs

Running the Node Manager

as a

Windows Service

61 63

Manager

The Node Manager Domains File Life



37

Using WLST

2



65

Key WLST Node Manager Commands Cycle of WebLogic Server Instances

65 67

The STARTING, STANDBY, and RUNNING States

67

The SHUTDOWN,

69

Self Health

SUSPENDING, Monitoring

and FAILED States

70

How the Server Deals with the FAILED State

70

Shutdown Command

70

Options

Contents

Starting

and

Stopping WebLogic Server

72

Server Messages

72

Server

72

Logs Using a Startup Script to Start and Stop Servers Using the java weblogic.Server Command Configuring Server Attributes with weblogic.Server

73 75 78

Using the Ant Tool to Manage Servers Managing Servers from the Administration Console

79

Using WLST Without the Node

87

Manager Using WLST with the Node Manager Setting Up a WebLogic Server Instance as a Windows Setting Up the Service Setting Up the Managed Server as a Windows Starting and Stopping the Service Changing Startup Credentials for a Service

Managed Deleting Summary

Server

Independence

92 93

Service

94 94

94 95 95 95

(MSI) Mode

97

Servers

98 99

Creating and Configuring WebLogic Structure of

81

89 Service

Removing a Service Dealing with WebLogic Server Failures Starting a Failed Admin Server

3

XI

WebLogic WebLogic Server a

WebLogic

Server Domains

Server Domain

101 102

Instances

103

Server Clusters

104

Domain Resources

104

Domain Restrictions

105

Domain Directories

105

Understanding Domain Configuration Changes The Domain

108

Configuration File: config.xml

Modifying Domain Configuration Using the Lock & Edit Mechanism

Tracking Changes

with

109 110

in

the Administration Console

Configuration Auditing

Domain

Making Read-Only Controlling the Logging of Configuration Changes a

Creating Domain Templates Templates Offered by WebLogic Server Creating a Custom Domain Template

a

WebLogic

Extending

Domains

117 118

119 120

Server Domain

Using the weblogic.Server Command Using the Configuration Wizard to Create a

116

119

Creating a Custom Extension Template Creating Templates with the pack and unpack Commands Creating

115

122 123 125 125

Domain

126 130

xii

Oracle

WebLogic Server 11g Administration

Handbook

Creating a Domain with WLST Commands Selecting the Startup Mode for the WebLogic

131 Domain

Advanced Domain

Configuration Options Configuring the Admin Server

136

Configuring Managed Servers

137

Configuring Clusters

137

Assigning Managed Servers to Clusters Creating HTTP Proxy Applications

137

Configuring Machines Targeting Deployments

138

136

138

to Clusters or Servers

Configuring a Persistent Store Configuring Server Environments

Configuring

142

142

Server as

a

Web Server

Default Web Application

Setting a Preventing POST Denial of ConfiguringHTTP Loggi ng Proxying Requests

to

Backing Up

a

148 148

Server

150

Proxy Plug-Ins

Hosts

151 153 155

Domain's

the

Backing Up Summary

144 147

Service Attacks

Other Web Servers

Configuring the WebLogic Configuring Virtual Protecting Domain Data

139 139

the Network

Configuring WebLogic

4

135

config.xml File

Security

156

Data

156 157

Configuring Naming, Connections, Transactions, and Messaging

159

JNDI and Naming and Directory Services

160

JNDI Architecture the

Viewing

Using JNDI

161

WebLogic

Server JNDI Tree

to Connect a

Java Client to

a

162

Server

Clustered JNDI

Configuring

165

Transactions

166

Transactions and the ACID Test

Types

of

WebLogic

162

Transactions

166 166

Transactions and the Two-Phase Commit

166

Configuring WebLogic

167

JTA

Monitoring Transaction Services

169

Transaction Logs and Transaction Recovery

170

Configuring Database Connections JDBC Architecture

Enabling

XA in the Database

171 172

175

Data Sources

175

Understanding WebLogic JDBC Configuration

176

Using

a

JDBC System Module

Creating a Generic Data Source Using a CridLink Data Source

177 179

181

Contents

Configuring Configuring

Managing

a

Multi Data Source

182

a

JDBC

Source

184

Data

Data Sources

189

Starting and Stopping a Data Source Configuring Java Messaging Services (JMS) Message Communication Modes Structure of a JMS Message Components of a JMS Messaging Application WebLogic JMS Architecture Configuring WebLogic Monitoring JMS Servers Creating JMS System Modules System Modules and Subdeployments Server JMS

of JMS-Related Services

Migration

WebLogic Messaging

190 191 191 191 192 195 199

206 208 213 215

Store-and-Forward (SAF) Service for Reliable Messaging

Bridge

216 218

Foreign JMS Servers Configuring WebLogic JavaMail

5

xiii

219 219

Configuring Mail Sessions Configuring a Mail Session Summary

221

Configuring the WebLogic Server Environment

223

220

222

Performance

Optimizing Application

224

Server Thread Pools

WebLogic

224

Work

Managers Configuring Work Managers

225 226

Work Manager Components

Defining

a

Work

228 the Console

Manager Through

Managing Server Work Overload

Throttling the Thread Pool Handling

Overload

Limiting Active

or

Failure Conditions

HTTP Sessions

Dealing with Stuck Threads WebLogic Server Self Health Monitoring Optimal Network Configuration Benefits of

231 234 234

235 236 237 238 239

Network Channels

239

Custom Network Channels

240

Using

Creating Tunneling

241

Configuring Network Channels Designing

Network Channels

The Java Connector Architecture (JCA) Resource

242 244

246

Adapters Through the Console Monitoring Resource Adapter Connections

248

The

248

Managing

Summary

WebLogic

Tuxedo Connector

247

249

xiv

Oracle

WebLogic

11g Administration Handbook

Server

Monitoring and Troubleshooting WebLogic

6

The

Server

Weblogic Diagnostic Framework Using WLDF with the JRockit Flight Recorder Using the Monitoring Dashboard Configuring Diagnostic Image Capture Diagnostic Archive

Configuring a Using a Diagnostic System Module

Configuring

Monitoring WebLogic Server Instances Monitoring with the Administration

280 Console

286 289

293 293

the Log Files

294

Log Message

295 296

Domain Log Filter

Subsystem Logs Understanding Server Log File Maintenance Setting Debugging Flags Using the Console

297

Integrating Application and Server Logging

299

Controlling

Server

Log Messages

to

Log

Destinations

WebLogic Understanding Java Thread Dumps Collecting a JRockit Thread Dump JVM

298

299

300 303 306

Crashes

Generating Logs for

307

Troubleshooting

Automatically Logging

Low Memory Conditions

308

309

Out of Memory Errors

310

Summary

Working with WebLogic Introduction to

297

300

Server Troubleshooting

7

280 283

Viewing Logs a

262

279

Monitoring Scripts Using Monitoring with SNMP Understanding WebLogic Logging Services

Configuring

259

274

WLST

a

258

267

Monitoring with JMX

of

254

265

Configuring WLDF Instrumentation Configuring Watches and Notifications Accessing the WLDF Diagnostic Data

Anatomy

252

263

Metric Collection

Understanding

251

WebLogic

311

Server Clusters

312

Server Clusters

Relationship Between Clusters and a Deployment in a Cluster

Domain

313 314

Cluster Architectures

314

How Clusters Communicate

318

Naming Cluster Configuring a Cluster Using

Instances

the Administration Console

318 320 320

Contents

325

WebLogic Server Cluster Starting and Stopping the Cluster Starting and Stopping with Scripts

Managing

a

326 326

Monitoring a Cluster Clustering WebLogic Server Services

329

JNDI Naming Service

330

330

JDBC Clustering

331

JMS and Clusters

331 331

WebLogic Server Load Balancing Load-Balancing Servlets and JSPs Balancing for EJBs and

Load

RMI

331 332

Objects

Replication Detecting Application Failures Handling Servlet and JSP Failures

334

Failover for EJBs and RMIs

338

Application

Handling

Failover and

335

335

339

Server and Service Failures

Migratable

339

Servers

Manual and Automatic Service

339

Migration

339

Migratable Targets Leasing and Automatic Migration

340

Migrating JMS-Related

Services

341

Configuring Migration

of JTA Services

343 344

Whole Server Migration

Using WLST to

Migrate

347

Services

348

Summary 8

XV

Understanding WebLogic Server Application Deployment Introduction

Server

WebLogic Types of Applications to

Deploy

Deployment Targets Deployment Tools Deployment Descriptors, Annotations, and Deployment Configuring Deployments with Deployment Plans Preparing Applications

Deploying

an

for

Archive File

351 352 Plans

352 355

360

Deployment Exploded and the Applications the Deployment Naming Files the Deployment Storing Server Accesses Source Files

WebLogic Deploying Applications Deployment Order

Using the Administration Console for

351

359

Deployment

Archive Directory

How

350

Deployment

You Can

349

361 362

362 363 365 365

Deployment

Using WLST to Deploy Applications Deploying with weblogic.Deployer Deploying with the wldeploy Ant Task

366

374 375 380

XVi

Oracle

WebLogic

Server

11g Administration Handbook

Reducing Deployment

Time During Development Using the Autodeployment Feature During Development Using FastSwap to Shorten the Development Cycle Monitoring and Updating Applications Administration Mode to

Using Redeployment Strategies

Sanity

Test

Deployments

Production

9

382 383

384 387

Production Redeployment

a

381

383

Monitoring Applications

Performing Summary

381

388

391

Managing WebLogic Server Security

393

Java EE

394

and OPSS

Security Java EE Security

and

WebLogic

Server

395

The Java Security Manager

395

Oracle Platform

395

WebLogic

Security Services Security Basics

Server

WebLogic

397

Server Resources

397

Security Realm Security Providers

398 398

Managing Security Realms

Creating and Configuring

400 a

New

Security

Realm

400

Configuring

the Security Providers

403

Configuring

the

Auditing

Provider

404

Entitlements

Caching

413

Configuring Users, Croups, Roles,

and Security Policies

414

Users

415

Groups

416

Security Roles

418

Configuring Security Policies Static and Dynamic Security Conditions

420

Security Models for Web The

Applications and EJBs

Deployment Descriptor Only

Model

421 422 422

The Custom Roles Model

422

The Custom Roles and Policies Model

423

The Advanced Model

423

Security-Related Deployment Descriptors Configuring the Embedded LDAP Server Configuring a RDBMS as the Security Store Setting Up the RDBMS Security Store Creating Tables in the RDBMS Store Setting Up JMS Notifications for Security Changes

Configuring

Domain

Security Configuring Security Domain

Enabling Using

425

427 427 427

427 428

in the Administration Console

Trust Between Domains

Connection Filters

423

429

433 434

Contents

Configuring SSL Configuring Identity and Trust Setting SSL Configuration Attributes Oracle WebLogic Security Best Practices Use

Multiple Administrative Users

Control Access to

WebLogic

Enable Security

a

Privileged Account

Auditing

446

446

446 447 447 447

Implement Security for Applications

447

449

Tuning WebLogic Server Thread Management Tuning the Network I/O

451 452

452 453

the JVM

455

Understanding Memory Management

455

Understanding Locking Tuning Messaging Applications

464 464

Tuning the Persistent Store

464

Tuning WebLogic JMS Tuning WebLogic JMS Store-and-Forward

466

Tuning the Applications and Managing Sessions Tuning Web Applications

469 469

469

Using Oracle Coherence Tuning EJB Performance SQL Tuning Best Practices

471

Managing Sessions JPA and TopLink

476

Tuning Data Sources and Transactions Tuning Data Sources

Tuning Summary

Index

441

Use Connection Filters

WebLogic Server Performance Tuning

Tuning

435

Prevent Denial of Service Attacks

Summary 10

434

446

Resources

Avoid Running the Server Under

xvii

Transactions

473 475

476 478 478 480 480

481