Oracle WebLogic Server 10g R3: Monitoring and Performance Tuning Volume I Student Guide D58373GC10 Edition 1.0 May 2009 D60297
Author Aaron Campbell Technical Contributors and Reviewers Bill Bunch TJ Palazzolo Nagavalli Pataballa Editor Vijayalakshmi Narasimhan Graphic Designer Satish Bettegowda Publishers Pavithran Adka Syed Ali Copyright 2009, Oracle. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered 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, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you 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 warranted to be error-free. Restricted Rights Notice 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 applicable: U.S. GOVERNMENT RIGHTS The U.S. Government s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Contents 1 Introduction Objectives 1-2 Agenda 1-3 Target Audience 1-4 Course Objectives 1-5 Course Agenda 1-6 Classroom Guidelines 1-9 Course Environment 1-10 Summary 1-11 Quiz 1-12 2 Introduction to the WebLogic Diagnostics Framework (WLDF) Objectives 2-2 Road Map 2-3 Diagnostics 2-4 WebLogic Diagnostics Framework 2-5 WLDF Data 2-6 Section Summary 2-7 Quiz 2-8 Road Map 2-9 Preview of WLDF Services 2-10 WLDF Services 2-11 Categories of Components 2-12 Data Creators and Data Collectors 2-13 Archives 2-14 Data Accessors 2-16 Watches and Notifications 2-17 Managers 2-18 System Image Captures 2-19 Putting It All Together 2-20 Section Summary 2-21 Quiz 2-22 Road Map 2-23 MBeans and XML 2-24 Ways to Configure WLDF 2-25 iii
WLDF Components Configuration 2-26 Diagnostics System Module 2-27 Diagnostic System Module s Resource Descriptor 2-28 Referencing the Diagnostic System Module 2-29 Example Reference from config.xml 2-31 Resource Descriptor Configuration 2-33 Managing Diagnostic Modules 2-35 Section Summary 2-36 Quiz 2-37 Summary 2-38 3 Generating Data Objectives 3-2 Road Map 3-3 Generating Data 3-4 Data Creators 3-5 Data Creators and Data Collectors 3-6 Types of Data Creators 3-7 Section Summary 3-8 Quiz 3-9 Road Map 3-10 The Need to Manage Applications 3-11 What Is JMX? 3-12 JMX Benefits 3-13 JMX Architecture 3-14 Agent Level 3-15 Instrumentation Level 3-16 Distributed Services Level 3-17 WebLogic JMX 3-18 MBeans 3-19 MBean Types 3-20 Runtime MBeans 3-21 MBean Servers 3-22 WLS MBeans Capabilities 3-25 MBean Types, Attributes, and Operators 3-26 Example MBean Reference 3-27 Getting Information Using MBeans 3-28 WLNav Tool 3-31 WLNav Benefits 3-32 WebLogic Navigation Tool 3-33 Section Summary 3-34 iv
Quiz 3-35 Practice 3-1 Overview: Browsing Runtime MBeans 3-36 Road Map 3-37 WLDF Instrumentation Component 3-38 Instrumentation Location Types 3-39 Diagnostic Actions 3-40 Diagnostic Monitors 3-42 Diagnostic Monitor Types 3-43 Delegating Monitors (Sampling) 3-44 Configuration Basics 3-45 Configuring Server-Scoped Instrumentation 3-46 Sample Server-Scope Instrumentation Descriptor File 3-47 Diagnostic Context 3-48 Request Dyeing 3-49 Section Summary 3-50 Practice 3-2 Overview: Creating a Diagnostics System Module 3-51 Practice 3-3 Overview: Creating Diagnostic Monitors 3-52 Summary 3-53 Quiz 3-54 4 Gathering Data Objectives 4-2 Gathering 4-3 Oracle WebLogic Server 10g R3: Monitoring and Performance Tuning Data Collectors 4-4 Road Map 4-5 WLDF Logging 4-6 How WLS Uses Logging Services 4-7 Logging System 4-8 Server Logs 4-11 Subsystem Logs 4-13 Log Message Format 4-14 Message Attributes 4-15 Configuration Scenarios 4-18 Logging Volume Control 4-19 Rotating Log Files 4-21 Redirecting JVM Output 4-25 Log File Directories and Locations 4-26 Filtering WLS Log Messages 4-27 Filtering Domain Log Messages 4-29 Log4J Support 4-30 v
Configuring Log4J 4-31 Jakarta Commons API Support 4-32 Section Summary 4-33 Quiz 4-34 Road Map 4-35 Harvestable and Harvested Data 4-36 Harvested Metrics 4-38 Harvester 4-39 Configuring a Harvester 4-40 Specifying Complex and Nested Harvester Attributes 4-44 Using Wildcards in Harvester Instance Names 4-45 Harvesting from the DomainRuntime MBeanServer 4-46 Practice 4-1 Overview: Creating and Configuring Data Harvesters 4-47 Section Summary 4-48 Quiz 4-49 Road Map 4-50 Watches 4-51 Notifications 4-52 Watch and Notification Configuration: Overview 4-53 Configuring Watches 4-55 Configuring Notifications 4-60 Notifications 4-63 JMX Notifications 4-64 JMS Notifications 4-67 SNMP Notifications 4-73 Example 4-74 SMTP Notifications 4-75 Image Notifications 4-78 Specifying Complex Attributes in Harvester Watch Rules 4-81 Using Wildcards in Watch Rule Instance Names 4-82 Practice 4-2 Overview: Creating Watches and Notifications 4-83 Section Summary 4-84 Quiz 4-85 Road Map 4-86 Diagnostic Image Capture 4-87 Information Captured by Diagnostic Image Capture 4-88 Captured Image File 4-89 Configuring Diagnostic Images 4-90 Capturing Diagnostic Images 4-91 Practice 4-3 Overview: Manually Capturing a Diagnostic Image 4-93 Section Summary 4-94 vi
Quiz 4-95 Summary 4-96 5 Accessing and Persisting Data Objectives 5-2 Accessing and Persisting 5-3 Road Map 5-4 What Are Data Accessors? 5-5 Data Accessors 5-6 Accessing Data Using Data Accessors: Basics 5-7 Online and Offline Accessors 5-8 Data Stores 5-9 Supported Data Store Types 5-10 Data Stores Accessed by Data Accessor 5-11 Section Summary 5-12 Quiz 5-13 Road Map 5-14 Accessing Diagnostic Data 5-15 Accessing Diagnostic Data Using the Administration Console 5-16 Accessing Data Programmatically Using Runtime MBeans 5-19 Access Diagnostic Data Online Using WLST 5-20 Accessing Diagnostic Data Offline Using WLST 5-22 Using WLDF Query Language with Data Accessor 5-24 Diagnostic MBeans 5-25 Section Summary 5-29 Practice 5-1 Overview: Accessing Data Gathered by WLDF 5-30 Quiz 5-31 Road Map 5-32 Data Archiver 5-33 Data Retirement Policy 5-35 Configuring a File-Based Store 5-36 Configuring a JDBC-Based Store 5-40 Viewing the Harvested Data 5-45 Section Summary 5-46 Practice 5-2 Overview: Setting Up a JDBC-Based Diagnostic Archive 5-47 Summary 5-48 Quiz 5-49 6 Configuring a Diagnostic Context Objectives 6-2 Road Map 6-3 vii
What Is Diagnostic Context? 6-4 Context ID 6-5 Dyes and Dye Flags 6-6 DyeInjection Monitor 6-7 Types of Dyes 6-8 PROTOCOL Dye Flag 6-10 Dye Vector 6-11 Configuring the DyeInjection Monitor 6-12 Context Life Cycle 6-14 Section Summary 6-15 Quiz 6-16 Road Map 6-17 Dye Filtering 6-18 Configuring Dye Filters for Server-Scoped Monitors 6-19 Configuring Dye Filters for Application-Scoped Monitors 6-20 Dye Filtering Rules 6-21 Tracing Requests in the Log File 6-22 Tracing Requests Using the WLDF Data Accessor 6-24 Section Summary 6-25 Practice 6-1 Overview: Filter and Trace Requests 6-26 Quiz 6-27 Road Map 6-28 THROTTLE Dye Flag 6-29 THROTTLE_INTERVAL 6-30 THROTTLE_RATE 6-31 Configuring the THROTTLE Dye 6-32 Throttling Delegating and Custom Monitors 6-34 Section Summary 6-37 Quiz 6-38 Road Map 6-39 weblogic.diagnostics.context 6-40 DiagnosticContextHelper API 6-41 DiagnosticContextHelper Methods 6-42 weblogic.diagnostics.context Example 6-43 Section Summary 6-44 Practice 6-2 Overview: Throttling the Volume of Instrumentation Events 6-45 Summary 6-46 Quiz 6-47 viii
7 Filtering WebLogic Server Log Messages Objectives 7-2 Road Map 7-3 Log Messages 7-4 Loggers 7-6 Logger Object 7-7 Message Handlers 7-8 Handler Object 7-10 Creating a Handler 7-11 Subscribing a Handler 7-12 Client JVM Using WLS Logging Services 7-13 Instance of WLS 7-14 Administration Server 7-15 Filters 7-16 Severity Levels 7-17 Message Severity Levels 7-19 Section Summary 7-21 Quiz 7-22 Road Map 7-23 Setting Severity Level 7-24 Setting Severity Level for Loggers 7-25 Publishing Messages Based on Severity Level by the Logger 7-26 Example 7-27 Setting Severity Level for Handlers 7-28 Set Severity Level Using the Console 7-29 Set Severity Level Using WLST 7-30 Set Severity Level Using Java API 7-31 Publishing Messages by the Handler Based on Severity Level 7-32 Setting Severity Level on Log4j Appender 7-33 Section Summary 7-34 Quiz 7-35 Road Map 7-36 Setting Filter 7-37 Setting Filters for Loggers and Handlers 7-38 Setting a Filter for a Logger Object 7-39 Example of Implementing a Filter Class 7-40 Setting a Filter for a Handler Object 7-42 Setting a Filter on Log4j Appender 7-43 Filtering Messages Published by Logger Object Based on Filter Criteria 7-44 Example 7-45 Setting Severity Level and Filters on Message Handler 7-46 ix
Comparison of Java Logging Handlers with JMX Listeners 7-48 Section Summary 7-49 Practice 7-1 Overview: Creating and Applying a Logging Filter 7-50 Summary 7-51 Quiz 7-52 8 Performance Monitoring Objectives 8-2 Road Map 8-3 Cost of Poor Performance 8-5 Terminology: Performance 8-6 Terminology: Scalability 8-7 Software Performance Engineering 8-8 Section Summary 8-10 Quiz 8-11 Road Map 8-12 Benchmarks 8-13 Section Summary 8-15 Quiz 8-16 Road Map 8-17 Load and Stress Testing 8-18 Performance Testing 8-19 Metrics 8-20 Results Reporting 8-21 Methodology 8-22 Methodology Tips 8-23 Section Summary 8-24 Quiz 8-25 Road Map 8-26 Load Testing Tools 8-27 Grinder 8-29 Distributed, Agent-Based Load Testing 8-30 Installing Grinder 8-32 Running Grinder 8-33 Setting Up a Test Directory for Grinder 8-34 The grinder.properties File 8-35 The httpscript.py File 8-36 Record Scripts with Proxy 8-38 Run the Tests 8-39 Test Results 8-40 out_host-n.log 8-41 x
Grinder Console 8-42 Grinder Summary Statistics 8-43 Section Summary 8-44 Quiz 8-45 Road Map 8-46 CPU Bound 8-47 I/O Bound 8-48 Database Bound 8-49 Network Bound 8-50 Changing WebLogic Server Properties 8-51 Things to Remember 8-52 Section Summary 8-53 Summary 8-54 Quiz 8-55 9 Java Virtual Machine Basics Objectives 9-2 Road Map 9-3 Java 9-4 Java Virtual Machine (JVM) 9-5 Java Heap 9-7 Garbage Collection 9-8 JVM Tuning 9-10 JVM Implementations 9-11 Sun HotSpot VM 9-12 Oracle JRockit JVM 9-13 Section Summary 9-14 Summary 9-15 Quiz 9-16 10 Java Tuning Sun HotSpot JVM Objectives 10-2 Road Map 10-3 Garbage Collection Review 10-4 Generational Garbage Collection 10-5 Review: Generational Heap 10-6 Sun HotSpot JVM Monitoring Tools 10-7 J2SE Monitoring and Management Architecture 10-8 Monitoring HotSpot VM 10-9 JConsole 10-10 Remote Monitoring 10-13 xi
Securing Remote Access 10-14 JConsole 10-16 JConsole Summary 10-17 Monitoring Memory 10-18 Monitoring MBeans 10-19 Displaying Chart 10-20 jps 10-21 jstat 10-23 jstat Usage 10-25 jstat: Usage Tips 10-27 jinfo 10-28 Why Use jinfo 10-30 jmap 10-31 jmap: Usage Tips 10-35 jstack 10-36 Tuning GC Manually 10-38 GC Algorithms 10-40 Ergonomics 10-41 Maximum Pause Time Goal 10-42 Throughput Goal 10-43 Footprint Goal 10-44 Ergonomics Behavior 10-45 Server-Class Machine Detection 10-46 More Ergonomics 10-47 64-Bit Enhancements 10-49 Monitoring Heap and GC: JConsole 10-50 Monitoring Heap: WLDF Console Extension 10-51 Monitoring GC: verbose:gc 10-52 Requesting GC Manually 10-54 Sizing Heap Memory 10-55 Evaluating GC Algorithm 10-56 GC Tuning Tips 10-58 Practice 10-1 Overview: Monitoring and Tuning Sun HotSpot JVM 10-64 Summary 10-65 Quiz 10-66 11 Tuning Oracle JRockit JVM Objectives 11-2 JRockit JVM 11-3 JRockit Benefits 11-4 JRockit in the Configuration Wizard 11-5 xii
Garbage Collection Review 11-6 Generational Garbage Collection 11-7 Generational Heap: JRockit 11-8 JRockit Mission Control 11-9 JRockit Mission Control: Architecture 11-11 JRockit Management Console 11-12 JRockit Management Console Architecture 11-13 Management Server 11-14 JRockit Management Console 11-15 Overview 11-17 MBean Browser 11-18 Memory 11-19 Threads 11-20 Runtime 11-21 Triggers 11-22 Exception Count 11-23 Method Profiler 11-24 Ctrl-Break Handler 11-25 jrcmd 11-26 Best Practices 11-27 JRockit Runtime Analyzer 11-28 Recording Engine 11-29 Recording from JRockit Management Console 11-30 JRA Recording from the Command Line 11-32 Recording from jrcmd 11-33 Recording from JRockit Command Line 11-34 Recording Using Trigger Rules 11-35 JRA Application 11-36 General Tab 11-37 Methods Tab 11-38 Garbage Collection 11-39 GCs Tab 11-40 Details of a Selected GC 11-41 Heap Overview 11-43 Object Statistics 11-44 Optimizations 11-45 Lock Profiling 11-46 JRockit Memory Leak Detector 11-47 Memory Leaks 11-48 JRockit Memory Leak Detector 11-49 Tips to Avoid Memory Leaks 11-52 xiii
Best Practices 11-53 JRockit Garbage Collectors 11-54 JRockit GC Tuning Tips 11-56 Monitor Garbage Collection 11-60 Monitoring Garbage Collection 11-61 Detecting Low Memory Conditions 11-67 Section Summary 11-69 Practice 11-1 Overview: Monitoring and Tuning JRockit JVM 11-70 Summary 11-71 Quiz 11-72 12 Core WebLogic Server Tuning Objectives 12-2 Road Map 12-3 Threads 12-4 Native IO Performance Pack 12-5 Socket Reader 12-7 Section Summary 12-9 Quiz 12-10 Road Map 12-11 Stuck Threads 12-12 Auto Restart of Server 12-15 Section Summary 12-16 Quiz 12-17 Road Map 12-18 Garbage Collection Thresholds 12-19 Section Summary 12-22 Quiz 12-23 Road Map 12-24 Chunk Tuning 12-25 Tuning Chunk Size 12-26 Tuning Chunk Pool Size 12-27 Section Summary 12-28 Quiz 12-29 Road Map 12-30 Connection Backlog Buffering 12-31 Section Summary 12-34 Quiz 12-35 Road Map 12-36 Secure Sockets Layer (SSL) 12-37 Section Summary 12-38 xiv
Summary 12-39 Quiz 12-40 13 Work Managers Objectives 13-2 Road Map 13-3 Work Managers 13-4 Default Work Manager 13-5 Work Manager Scheduling Guidelines 13-6 Section Summary 13-7 Quiz 13-8 Road Map 13-9 Request Classes 13-10 Fair Share Request Class 13-11 Response Time Request Class 13-13 Context Request Class 13-14 Constraints 13-15 Maximum Threads Constraints 13-16 Minimum Threads Constraints 13-17 Capacity Constraints 13-18 Referencing Classes or Constraints 13-19 Section Summary 13-20 Quiz 13-21 Road Map 13-22 Global-Level Work Managers 13-23 Global Work Manager Component 13-26 Global-Level Work Managers 13-27 Application-Level Work Manager 13-28 Component-Level Configuration 13-29 Component-Level Work Managers 13-30 Web Application-Level Work Managers 13-31 Stuck Thread Work Manager 13-32 Section Summary 13-34 Quiz 13-35 Road Map 13-36 Backward Compatibility 13-37 Migration to Work Managers 13-38 Section Summary 13-39 Road Map 13-40 Understanding CommonJ 13-41 Accessing CommonJ Work Managers 13-42 xv
Mapping CommonJ to Work Managers 13-43 Section Summary 13-45 Practice 13-1 Overview: Using Work Managers 13-46 Summary 13-47 Quiz 13-48 14 Tuning JSP Objectives 14-2 Road Map 14-3 What Is a JavaServer Page? 14-4 Introduction to JSP 14-5 JSP Request Processing 14-6 JSP Precompile 14-7 Using the JSP Compiler jspc 14-8 Using the precompile Parameter 14-10 Java Compiler 14-11 Page Check Interval 14-12 Setting JSP Page Check Interval 14-14 Setting Servlet Reload Check Interval 14-15 keepgenerated Parameter 14-16 verbose Parameter 14-17 Page Directive and HTTP Session 14-18 Session Timeout 14-19 Session Invalidation 14-22 jsp:usebean Scope 14-23 Single Thread Model 14-25 WebLogic cache Tag 14-26 Logging 14-27 Summary 14-28 Practice 14-1 Overview: Tuning JSP 14-29 Quiz 14-30 15 Tuning JDBC Objectives 15-2 Road Map 15-3 What Is JDBC? 15-4 JDBC Drivers 15-6 JDBC Architecture 15-7 JDBC Drivers 15-8 Connection Pools 15-9 xvi
Data Sources 15-10 Connection Pool Size 15-11 Shrink Frequency 15-12 Testing Connections 15-13 Row Prefetch 15-14 Statement Cache 15-15 PinnedToThread 15-17 Batch Updates 15-18 Combining Transactions 15-19 Transaction Isolation Levels 15-20 Database Tuning 15-22 Database Tuning: Oracle 15-24 Database Tuning: SQL Server 15-26 Practice 15-1 Overview: Tuning JDBC 15-27 Summary 15-28 Quiz 15-29 16 Tuning JMS Objectives 16-2 Road Map 16-3 Definition: Java Message Service 16-4 Definitions: JMS Clients 16-6 Two Types of Domains 16-7 JMS Architecture 16-8 JMS Clients 16-9 Tuning JMS Clients 16-10 Asynchronous Messages 16-11 Aggregation and Message Pipeline 16-13 Persistent Stores 16-14 Comparing a JDBC Store with a File Store 16-15 File Persistence 16-16 Paging 16-18 Message Buffer Size 16-19 Throttling 16-20 Throttling Techniques 16-21 Quotas 16-23 Threshold 16-25 Flow Control 16-27 Handling Expired Messages 16-29 Configure Expiration Policy 16-30 Expired Message Scanning 16-31 xvii
Messaging Preference 16-32 Acknowledgement 16-33 Message Selectors 16-34 Transactions 16-35 Store and Forward (SAF) 16-36 SAF Tuning 16-38 Practice 16-1 Overview: Tuning JMS 16-39 Summary 16-40 Quiz 16-41 17 Tuning EJB Objectives 17-2 Road Map 17-3 Enterprise JavaBeans 17-4 EJB Interfaces 17-6 EJB Application Structure 17-7 Stateless Session Beans 17-8 Pool Management 17-10 Determining Pool Size 17-12 Configuring a Stateless Session EJB Pool 17-13 Message-Driven Beans (MDB) 17-15 Configuring a Message-Driven EJB Pool 17-16 Stateful Session Beans 17-18 Cache Management 17-19 What Happens When Cache Fills Up? 17-21 Determining Cache Size 17-22 Cache Tips 17-23 Idle Timeout and Eligibility 17-24 Cache Type 17-25 Configuring a Stateful Session EJB Cache 17-26 Entity Beans 17-29 Configuring an Entity EJB Pool and Cache 17-31 Combined Caching with Entity EJBs 17-33 Cache Between Transactions 17-35 The Process 17-36 Cache Between Transactions: Example 17-37 Entity Bean Concurrency Strategies 17-38 Concurrency Strategies 17-39 Entity Bean Concurrency Strategies 17-42 Entity Bean Bulk Updates 17-44 include-updates 17-45 xviii
Setting include-updates 17-46 Relationship Caching 17-47 Setting Relationship Caching 17-48 Field Groups 17-50 Container-Managed Transactions (CMT) 17-51 The <container-transaction> Tag 17-52 Six Values of <trans-attribute> 17-53 Transaction Attribute Tips 17-54 Per-Method Isolation Level 17-55 Design Considerations 17-57 Transaction Timeout 17-58 Entity Beans Multiple Configurations 17-59 Client State 17-60 EJB Invocation 17-61 Design Patterns 17-62 Coarse-Grained Versus Fine-Grained 17-63 Summary 17-64 Practice 17-1 Overview: Tuning EJB 17-65 Quiz 17-66 18 Tuning WebLogic Server Clusters Objectives 18-2 Road Map 18-3 What Is Clustering? 18-4 Load Balancing and Failover 18-6 Quiz 18-8 Road Map 18-9 Basic Cluster Architecture 18-10 Multi-Tier Cluster Architecture 18-12 Metropolitan Area Network Clustering 18-14 Wide Area Network Clustering 18-15 Communication in a WAN 18-16 Quiz 18-17 Road Map 18-18 Load Balancers 18-19 Performance Versus Cost 18-20 Hardware Load Balancers 18-21 Quiz 18-25 Road Map 18-26 HTTP Session State Replication 18-27 xix
In-Memory Replication 18-28 Persistent JDBC Replication 18-29 Persistent File Replication 18-31 Session Persistence Comparison 18-32 Replication Configuration 18-33 Section Summary 18-34 Quiz 18-35 Road Map 18-36 Remote Calls 18-37 Peer-to-Peer Communication 18-39 Cluster Multicast Communication 18-40 Practice 18-1 Overview: Tuning Session Persistence 18-41 Summary 18-42 Quiz 18-43 19 (Appendix) Application-Scoped Instrumentation Objectives 19-2 Road Map 19-3 Review: Server-Scoped Instrumentation 19-4 Application-Scoped Instrumentation 19-5 Aspect-Oriented Programming (AOP) and AspectJ 19-6 Conventional Technique 19-7 Aspect-Oriented Programming Technique 19-8 Joinpoints 19-9 Call Versus Execution Joinpoints 19-11 Pointcuts 19-14 Anatomy of a Pointcut 19-15 Pointcut Signature 19-16 Advice/Actions 19-18 Anatomy of an Aspect 19-20 Application-Scoped Deployment Descriptors 19-21 Instrumentation Monitors 19-22 Application-Scoped Delegating Monitors 19-23 Custom Monitors 19-25 Deploying Application-Scoped Instrumentation 19-26 Section Summary 19-27 Road Map 19-28 Enable Instrumentation 19-29 Create Descriptor File 19-30 Add a Delegating Monitor 19-32 Add a Custom Monitor 19-34 xx
Define Pointcuts for a Custom Monitor 19-35 Execution Pointcut 19-36 Call Pointcut 19-37 Joinpoint and Method Signatures 19-38 Pointcut Examples 19-40 Completed Deployment Descriptor 19-42 Associate Descriptor File to Application 19-44 Deploy the Application 19-45 Section Summary 19-46 Road Map 19-47 Use Deployment Plans for Dynamic Control 19-48 Hot Swap Capabilities 19-49 weblogic.plangenerator 19-51 Deployment Plan Elements 19-53 Sample Deployment Plan 19-55 Updating via the Administration Console 19-58 Section Summary 19-60 Summary 19-61 20 (Appendix) WLDF Console Extensions Objectives 20-2 Road Map 20-3 WLS Administration Console 20-4 Extending the Admin Console 20-5 WLDF Console Extension 20-6 Console Extension Requirements 20-7 Installing the Console Extension 20-8 Displaying the Console Extension 20-9 WLDF Console Extension 20-10 Section Summary 20-11 Road Map 20-12 Anatomy of the Console Extension 20-13 Tabs Panel Overview 20-14 Toolbar and Scrollbar 20-15 View Panel Overview 20-16 View Types 20-17 Anatomy of a Chart 20-18 Creating a View: Step 1 20-19 Creating a View: Step 2 20-20 Creating a View: Step 3 20-21 Creating a View: Step 4 20-22 xxi
Creating a View: Step 5 20-23 Section Summary 20-24 Road Map 20-25 Data Collection and the CE 20-26 Harvester Data: From WLDF 20-27 Harvester Data: From the CE 20-28 How Metric Data Is Collected 20-29 Presenting Metric Data 20-30 No Harvesting: Display Current Data 20-31 Harvesting: Display Current Data 20-32 Harvesting: Display Historical Data 20-33 Harvesting: Display Current and Historical Data 20-34 Working with Metric Charts and Graphs 20-35 Displaying the Contents of the MBean Tree on the Metrics Tab 20-36 MBean Tree Visual Cues 20-37 Instrumentation Data: From WLDF 20-38 Instrumentation Data: From the CE 20-39 How Event Data Is Collected and Presented 20-40 Method Performance Charts 20-41 Working with Method Performance Charts and Graphs 20-42 Displaying Requests 20-43 Displaying Methods 20-44 Section Summary 20-45 Summary 20-46 21 (Appendix) Tuning Other JVMs Objectives 21-2 Road Map 21-3 IBM Virtual Machine for Java 21-4 Performance Tips on AIX 21-5 Tuning Java on HP-UX 21-7 Section Summary 21-8 Summary 21-9 22 (Appendix) CPU Monitoring Objectives 22-2 Road Map 22-3 Introduction 22-4 CPU Monitoring Tools 22-5 Windows Task Manager 22-6 iostat Command 22-7 xxii
Usage: iostat 22-8 vmstat Command 22-9 Usage: vmstat 22-10 sar Command 22-12 Usage: sar 22-13 Other Useful Commands 22-14 CPU Usage 22-15 Section Summary 22-16 Road Map 22-17 Some Basics 22-18 32-Bit Versus 64-Bit 22-19 Advantage of 64-Bit 22-20 64-Bit Applications 22-21 Misconceptions 22-22 Disadvantage of 64-Bit 22-23 Beyond 64 Bits 22-24 Section Summary 22-25 Summary 22-26 23 (Appendix) OS Tuning Objectives 23-2 Road Map 23-3 Windows 2000: Web Server Registry 23-4 MemCacheSize 23-5 ObjectCacheTTL 23-6 MaxCachedFileSize 23-7 Windows 2000: Background Services 23-8 Windows XP: Visual Effects 23-9 TCP Window Size 23-10 TCP-Related Tuning Parameters 23-11 Monitoring Tools 23-18 ipconfig 23-19 ping 23-21 tracert 23-23 netstat 23-24 Windows Performance Monitor 23-26 Microsoft Network Monitor 23-28 Section Summary 23-29 Road Map 23-30 TCP-Related Parameters 23-31 xxiii
Parameters in etc/system 23-33 Parameters with CE Gigabit Cards 23-34 TCP Settings for HP-UX 23-35 inode Cache 23-36 Size of the Buffer Cache 23-37 Section Summary 23-38 Road Map 23-39 Maximum Transfer Unit 23-40 Message Queue Limit 23-41 File Handles 23-42 Socket Queue 23-43 Section Summary 23-44 Summary 23-45 24 (Appendix) Performance Enhancing Patterns Objectives 24-2 Road Map 24-3 Design Patterns 24-4 Fast Path 24-6 First Things First 24-7 Alternate Routes 24-8 Flex Time 24-9 Batching 24-10 Slender Cyclic Functions 24-11 Fast Lane Reader 24-12 Section Summary 24-13 Road Map 24-14 AntiPatterns 24-15 Excessive Dynamic Allocation 24-16 Circuitous Treasure Hunt 24-17 One-Lane Bridge 24-18 Unnecessary Processing 24-19 Sisyphus List Subset 24-20 The god Class 24-21 Section Summary 24-22 Road Map 24-23 Exceptions 24-24 Logging 24-25 Section Summary 24-26 Road Map 24-27 New Technologies 24-28 xxiv
Hibernate 24-29 AJAX 24-31 XML Processing 24-33 XML Streaming 24-34 Section Summary 24-35 Road Map 24-36 Introduction 24-37 Components 24-38 Server Modes 24-39 HSQL Server Mode 24-40 HSQL Web Server 24-41 HSQLDB Servlet 24-42 In-Process (Standalone) Mode 24-43 Memory-Only Mode 24-44 HSQL Database Files 24-45 Connecting to a Database 24-46 HSQL Database Server 24-47 HSQL Database Manager 24-48 Closing the Database 24-50 Section Summary 24-51 Closing Thoughts 24-52 Summary 24-53 25 (Appendix) Working with Ant Objectives 25-2 Road Map 25-3 What Is Ant? 25-4 Executing Ant from the Command Line 25-5 Command-Line Execution 25-6 Ant Build Files 25-7 Example: A Simple Build File 25-8 Project Properties 25-9 Ant Targets 25-10 Built-In Tasks 25-11 Section Summary 25-12 Road Map 25-13 Compiling Java Applications 25-14 Executing Java Applications 25-15 Using Command-Line Arguments 25-16 Defining System Properties 25-17 Creating a Java Archive File 25-18 xxv
Creating a Web Archive File 25-19 Creating an Enterprise Archive File 25-20 Deploy an Application 25-21 Manipulating the File System 25-22 Overview: FileSets and PatternSets 25-23 Examples: FileSets and PatternSets 25-24 Executing Another Build File 25-26 A Complete Command-Line Example 25-27 Web Application Build File 25-28 Section Summary 25-32 Summary 25-33 Appendix A: Practices and Solutions xxvi