Sun Java System Application Server 8.1: Administration & Deployment Student Guide - Volume I IAS-4444 Rev A D62040GC10 Edition 1.0 D63846
Copyright 2006, 2009, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary information, is provided under a license agreement containing restrictions on use and disclosure, 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 as expressly permitted in your license agreement or allowed by 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. Sun Microsystems, Inc. Disclaimer This training manual may include references to materials, offerings, or products that were previously offered by Sun Microsystems, Inc. Certain materials, offerings, services, or products may no longer be offered or provided.oracle and its affiliates cannot be held responsible for any such references should they appear in the text provided. Restricted Rights Notice If this documentation is delivered to the U.S. Government or anyone using the documentation on behalf of the U.S. 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 and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. UNIX is a registered trademark licensed through X/Open Company, Ltd.
This page intentionally left blank.
This page intentionally left blank.
Table of Contents About This Course...Preface-xvii Course Goals... Preface-xvii Product Names... Preface-xviii Course Map... Preface-xix Topics Not Covered... Preface-xx How Prepared Are You?... Preface-xxi Introductions...Preface-xxii How to Use Course Materials...Preface-xxiii Conventions...Preface-xxiv Icons...Preface-xxiv Typographical Conventions... Preface-xxv Additional Conventions...Preface-xxvi Introducing Application Server SE/EE 8.1...1-1 Objectives... 1-1 Relevance... 1-2 Additional Resources... 1-3 Overview of Application Server 8.1... 1-4 Application Server 8.1 Editions... 1-6 Supported Features Comparison... 1-8 Sun Java Enterprise System Suites... 1-9 Sun Java Application Platform Suite... 1-10 Application Server Key Concepts... 1-11.Web Architecture With Load Balancing... 1-12 Clustering... 1-13 Failover... 1-14 Failover With HADB... 1-15 Application Server HA Architecture... 1-16 Application Server SE/EE 8.1 Features... 1-18 Key HA Features... 1-20 Developer Productivity Support... 1-22 Tools Provided With Application Server 8.1... 1-23 v
Management Architecture... 2-1 Objectives... 2-1 Additional Resources... 2-3 Introducing the Components and Concepts of Application Server SE/EE 8.1... 2-4 Administrative Domains in Application Server 8.1... 2-5 Server Instances... 2-7 Cluster... 2-8 Configuration... 2-10 Configuration Types... 2-11 Applications and Resources... 2-12 References... 2-13 Entity Relationships... 2-15 Sample Cluster Configuration One... 2-16 Sample Cluster Configuration Two... 2-17 Sample Configuration Three... 2-18 Management Architecture... 2-19 Main Components... 2-21 DAS... 2-23 Central Repository... 2-25 Central Repository Directory Structure... 2-27 Local Repository Cache... 2-28 Node Agent... 2-29 Node Agent, Server Instance, and DAS... 2-30 Multi-Domain Management Architecture... 2-31 Synchronization... 2-32 Node Agent Synchronization At Create Time... 2-34 Node Agent Synchronization At Start Time... 2-35 Server Instance Synchronization... 2-36 JMX API MBeans... 2-37 JMX Connectors... 2-39 Installing Application Server SE/EE 8.1... 3-1 Objectives... 3-1 Relevance... 3-2 Additional Resources... 3-3 Key Features of the Application Server SE/EE 8.1 Installation.. 3-4 Supported Installation Features Matrix... 3-5 Product Components... 3-7 PointBase and Application Server 8.1 Configuration... 3-9 Supported Platforms for Installation... 3-10 Support for JDBC API Drivers... 3-11 Support for Databases... 3-12 Support for Web Servers... 3-13 Configuration Considerations... 3-14 vi Sun Java System Application Server SE/EE 8.1 2005Q2: Administration and Deployment
Application Server SE/EE 8.1 System Requirements... 3-15 HADB Platforms and System Requirements... 3-16 Installation Modes... 3-17 Directory Structure and File Layout... 3-19 Installation Root Directory Structure... 3-20 DAS Directory Structure... 3-21 Node Agent Directory Structure... 3-22 Server Instance Directory Structure... 3-24 Installation Log Files... 3-25 Sample Applications... 3-27 Configuration and Administration...4-1 Objectives... 4-1 Additional Resources... 4-3 Administration Infrastructure... 4-4 Domain Configuration... 4-6 Primary Domain Configuration Files... 4-7 Named Configuration... 4-8 The domain.xml File Structure... 4-10 Referencing Elements... 4-12 The domain.xml Reference Example... 4-13 Properties in the domain.xml File... 4-14 Server Instance Specialization... 4-16 Port Specialization... 4-17 Port Specialization Example... 4-18 Configuring Specialized Ports... 4-19 Dynamic Reconfiguration... 4-20 Dynamic Reconfigured Changes... 4-22 Administration Tools... 4-23 The asadmin Utility... 4-25 Local asadmin Commands... 4-27 The asadmin Utility Domain Commands... 4-28 Target Option... 4-30 The Admin Console... 4-31 Features of the Admin Console... 4-32 GUI Configuring Cluster... 4-33 Node Agent Configuration Modes... 4-35 Node Agent Placeholder... 4-37 Online Node Agent... 4-38 Offline Node Agent... 4-39 The asadmin CLI Node Agent Commands... 4-41 GUI Creating Node Agent Placeholder... 4-42 Domain Backup and Restore... 4-43 Principles of Operation... 4-44 Overview of Administrative Security... 4-45 Transport Security... 4-46 vii
The asadmin Utility Password Security... 4-47 Master Password... 4-48 Password Encryption... 4-49 Deployment... 5-1 Objectives... 5-1 Relevance... 5-2 Additional Resources... 5-3 Key Deployment Features... 5-4 J2EE Technology Deployment API... 5-6 Architecture... 5-8 Deployment Targets... 5-10 Deployment Life Cycle... 5-12 Initial Deployment... 5-13 Enabling and Disabling... 5-14 Adding and Deleting Targets... 5-15 Redeployment... 5-16 Undeployment... 5-18 Other Deployment Features... 5-20 Deployment Methods... 5-22 Deploying an Enterprise Application... 5-23 Auto Deploy... 5-27 Configuring Auto Deploy... 5-29 Directory Deployment... 5-31 DeployTool... 5-33 Deployment Feature Comparison... 5-35 HTTP Load Balancing... 6-1 Objectives... 6-1 Relevance... 6-2 Additional Resources... 6-3 Application Server Load Balancing... 6-4 Load Balancing Methods... 6-5 Sticky Round-Robin Load Balancing... 6-7 Dynamic Load Balancing... 6-9 Features of the Application Server s Load Balancer... 6-11 Health Check Mechanism... 6-14 Quiescing... 6-16 Idempotent URL Retries... 6-18 Configurable Error Pages... 6-20 Principles of Load Balancing... 6-21 Load Balancer Installation... 6-23 HTTP Load Balancer Configuration... 6-24 Creating an HTTP Load Balancer Configuration... 6-26 Deleting an HTTP Load Balancer Configuration... 6-28 viii Sun Java System Application Server SE/EE 8.1 2005Q2: Administration and Deployment
Creating and Deleting an HTTP Load Balancer Reference... 6-29 Enabling and Disabling Server Instances for Load Balancing... 6-31 Enabling and Disabling Applications for Load Balancing... 6-32 Creating and Deleting the HTTP Health Checker... 6-33 Generating a Load Balancer Configuration File... 6-35 Setting Up HTTP Load Balancing... 6-37 HTTP Load Balancing Setup Steps... 6-39 Adding a New Instance to Load Balancing... 6-40 Rolling Upgrade Overview... 6-41 Rolling Upgrade in Mixed Mode... 6-42 Rolling Upgrade Inside a Cluster... 6-43 Rolling Upgrade in Non-Mixed Mode... 6-46 Validation of Load Balancer Configuration... 6-48 Load Balancer Logging... 6-49 Configuring the Load Balancer Log... 6-50 Identifying Log Messages... 6-51 Interpreting Log Messages... 6-52 The RequestStart Message... 6-53 The RequestExit Message... 6-54 The UnhealthyInstances Message... 6-55 The FailedOverRequest Message... 6-56 The Quiesced Message... 6-57 HADB Basics...7-1 Objectives... 7-1 Relevance... 7-2 Additional Resources... 7-3 HADB Features... 7-4 Interfaces to HADB... 7-6 HADB Hardware Architecture... 7-7 Protecting Data in the HADB... 7-9 Data Fragmentation and Replication... 7-10 Node Monitoring... 7-11 Fault Tolerance... 7-13 Node Recovery... 7-14 Node Repair... 7-16 Double Network... 7-18 Achieving High Availability... 7-20 Configuring a System for the HADB Database... 7-22 DRU, Host, and Node Configurations... 7-23 HADB Deployment Topology... 7-25 Hardware Configuration... 7-27 Supported OS Versions for HADB V4.4... 7-30 ix
Shared Memory and Semaphore Configuration... 7-31 Performance Considerations... 7-34 Other Considerations... 7-35 HADB Management Architecture Terminology... 7-36 HADB Management Architecture... 7-38 Relationships: Agent, Domain, Database Instance, and Application Server Cluster... 7-40 HADB Directory Structure... 7-41 Configure and Start Management Agent... 7-42 MA Configuration Files... 7-43 An ma.cfg Example... 7-45 Starting the MA... 7-46 Communicating With the MA... 7-48 Performing Simple Management Tasks... 7-51 The hadbm Commands... 7-52 Create a Domain... 7-54 Create a Database... 7-56 Create a Database Example 1 Domain Does Not Exist. 7-58 Create a Database Example 2 Domain Already Exists.. 7-59 Monitor a Database... 7-60 List and Modify Database Configuration Attributes... 7-62 Start and Stop a Database... 7-65 Start and Stop a Node... 7-67 Clear a Database... 7-69 Delete a Database... 7-70 Increase Database Storage Capacity on the Nodes... 7-71 Clear and Archive History Files... 7-72 Manage HADB Software Packages... 7-73 Configuring a Cluster for HA... 7-75 Tasks Performed by the configure-ha-cluster Command... 7-76 HTTP Session Persistence... 8-1 Objectives... 8-1 Relevance... 8-2 Additional Resources... 8-3 Fundamentals of a Session and Session Persistence... 8-4 Session Basics... 8-5 How a Session Works... 8-7 HTTP Session Persistence... 8-9 Session Persistence Subsystem Architecture... 8-11 Supported Features... 8-12 Supported J2EE Object References... 8-14 EJB Technology Reference Failover... 8-16 Distributed Container Semantics... 8-17 x Sun Java System Application Server SE/EE 8.1 2005Q2: Administration and Deployment
Session Persistence Mechanisms... 8-18 Persistence Types... 8-19 The memory Persistence Type... 8-20 The file Persistence Type... 8-22 The ha Persistence Type... 8-24 Persistence Frequency... 8-25 Persistence Scope... 8-27 The session Scope... 8-28 The modified-session Scope... 8-29 The modified-attribute Scope... 8-31 Comparison of Persistence Types... 8-33 HA for SSO Sessions... 8-34 Criteria for Distributed Sessions Across Multiple Instances... 8-36 Availability at Different Levels... 8-37 Configuring Session Persistence for HA... 8-38 Creating and Configuring the HA Cluster... 8-39 Enabling HA for an Instance Using the CLI... 8-40 Enabling HA for an Instance Using the GUI... 8-41 Configuring Availability for the Web Container Using the CLI... 8-42 Configuring Availability for the Web Container Using the GUI... 8-43 Making a Web Application Distributable... 8-44 Configuring Availability Settings for a Web Application 8-45 RMI/IIOP Load Balancing and Failover...9-1 Objectives... 9-1 Relevance... 9-2 Additional Resources... 9-3 Basics of RMI/IIOP... 9-4 RMI/IIOP Communication... 9-5 RMI/IIOP Load Balancing and Failover Features... 9-7 Supported Client Types for RMI/IIOP... 9-9 Architecture... 9-10 Load Balancer Sub-System... 9-11 Failover Sub-Systems... 9-13 Server-Side Configuration... 9-15 Properties of a Named Configuration... 9-17 Setting Instance-specific Values... 9-18 Creating an IIOP Listener... 9-20 Creating a Secure IIOP Listener... 9-22 Related CLI Commands... 9-25 Configuring Clients... 9-27 Sample sun-acc.xml File... 9-29 Rolling Upgrade for Applications Accessed by Application Clients... 9-30 xi
EJB Container High Availability... 10-1 Objectives... 10-1 Relevance... 10-2 Additional Resources... 10-3 SFSB Failover Features... 10-4 SFSB Passivation... 10-6 Checkpointing... 10-7 Steps in Checkpointing... 10-9 SFSB Failover Support for Various Deployment Scenarios... 10-10 Transparent Failover... 10-12 Configuring SFSB Failover... 10-14 Availability Hierarchy... 10-15 Availability at Different Levels... 10-16 Instance-Level Availability... 10-18 Container-Level Availability... 10-20 Application and EJB Module-Level Availability... 10-22 Enabling at Bean and Method Levels... 10-24 EJB Timer Service... 10-26 Application Server EE 8.1 EJB Timers... 10-30 EJB Timer Service Configuration... 10-32 Configuring Timer Service Settings... 10-34 EJB Timer Migration... 10-35 Transaction Recovery... 10-37 Server Instance Restarts After Failure... 10-40 RM Failure in the Second Phase... 10-41 Server Instance Fails and Does Not Restart... 10-43 JMS Clustering and Failover... 11-1 Objectives... 11-1 Relevance... 11-2 Additional Resources... 11-3 JMS... 11-4 Message Queue Product Editions... 11-7 Components of a Message Queue Messaging System... 11-9 Message Queue 3.6 Features... 11-11 Multi-Consumer Durable Subscription... 11-14 Message Queue 3.6 Integrating With Application Server... 11-16 Application Server s Built-in JMS... 11-17 Architecture of the Built-in JMS... 11-18 Delivery of Inbound Messages... 11-20 Connector Architecture... 11-22 The ActivationSpec Component... 11-24 Sample MDB Descriptor... 11-26 Resource Adapter Features... 11-27 xii Sun Java System Application Server SE/EE 8.1 2005Q2: Administration and Deployment
JMS Configuration... 11-29 JMS Configuration GUI... 11-31 Types of JMS... 11-33 JMS Connection Pool... 11-35 Connection Failover... 11-37 Multi-Broker Clusters... 11-39 Multi-Broker Cluster Architecture... 11-41 Multi-Broker Cluster Architecture... 11-42 Multi-Broker Cluster Configuration... 11-44 Out-of-Box Scenario... 11-46 Dedicated Brokers... 11-47 Multi-Broker Cluster Deployment... 11-48 MQ and Application Server Clustering Normal... 11-49 MQ and Application Server Clustering Server Instance Failure... 11-50 MQ and Application Server Clustering Server Instance Restart... 11-51 MQ and Application Server Clustering Broker Failure... 11-52 Failover of a Durable Subscription... 11-53 Multi-Broker Cluster Performance... 11-55 Upgrade and Migration...12-1 Objectives... 12-1 Relevance... 12-2 Additional Resources... 12-3 Application Server Compatibility Web Server... 12-4 Application Server Compatibility 7.1 to 8.1... 12-6 Upgrading to Application Server SE/EE 8.1... 12-10 Server Configuration Migration... 12-11 Upgrade Version Support... 12-12 Supported Features of Upgrade Tool... 12-13 Non-Supported Features of Upgrade Tool... 12-17 Upgrading Clusters... 12-19 Application Migration Issues... 12-22 Migrating From Earlier Versions... 12-25 Migrating From Earlier Versions DDs... 12-26 Migrating From Earlier Versions Servlets and JSP Pages... 12-28 Migrating From Earlier Versions Web Application Modules... 12-30 Migrating From Earlier Versions Migrating EJB Modules... 12-32 Migrating From Earlier Versions EJB 1.1 to EJB 2.1... 12-34 Migrating From Earlier Versions Migrating EJB Clients... 12-36 Migrating From Earlier Versions JDBC API Code... 12-37 xiii
Migrating From Earlier Versions HTTP Session Failover... 12-38 Migrating From Earlier Versions Enterprise Applications... 12-39 Java AVK Enterprise... 12-40 Migration Tool... 12-41 Migration Tool Input... 12-43 Migration Tool GUI... 12-45 Migration Report... 12-47 Post-Migration Tasks... 12-49 Tuning Performance... 13-1 Objectives... 13-1 Relevance... 13-2 Additional Resources... 13-3 Performance Roles of Key Web Components... 13-4 Performance Tuning... 13-7 Tuning Applications... 13-9 Version Consistency... 13-10 Request Partitioning... 13-12 Read-Only Beans... 13-14 Relationship Prefetch... 13-16 Tuning Application Server... 13-17 Tuning the EJB Container... 13-18 Tunables of EJB Objects... 13-19 EJB Pool Parameters... 13-22 EJB Cache Parameters... 13-24 SFSB Cache... 13-28 Remote Interfaces and Local Interfaces... 13-29 Using Local Interfaces... 13-30 Parameter Passing... 13-31 Tuning Other Resources... 13-33 Tuning Log and Deployment Settings... 13-35 General Tuning Tips... 13-37 Tuning Application Server for HA... 13-39 JDBC API Connection Pool for HA... 13-40 Tuning the Connection Pool When SSO Is Enabled... 13-41 Impact of Session Size on Performance... 13-42 HTTP Session Persistence Frequency... 13-44 HTTP Session Persistence Scope... 13-46 Other HTTP Session Tuning Considerations... 13-47 SFSB Checkpointing... 13-48 Load Balancer Tuning... 13-49 Tuning the HADB... 13-51 OS Configurations... 13-52 Disk Usage... 13-54 xiv Sun Java System Application Server SE/EE 8.1 2005Q2: Administration and Deployment
HADB-specific Parameters... 13-56 HADB Tuning Scenarios... 13-58 Useful Performance Tuning Tools... 13-60 Troubleshooting...14-1 Objectives... 14-1 Additional Resources... 14-3 Resources for Identifying Problems... 14-4 Log Files... 14-6 Console Messages... 14-9 Application Server SE/EE 8.1 Processes... 14-10 The JVM Process Thread Dump... 14-12 Core Dump... 14-14 Problems in Application Server 8.1... 14-16 Prerequisite JDK Software Installation... 14-18 Cannot Install Load Balancer to New Web Server Instance... 14-19 Application Server 8.1 Start Problems... 14-21 Network Connection... 14-22 Port Conflicts... 14-24 Administrative Client Problems... 14-25 The asadmin Utility... 14-26 Cannot Access the Admin Console... 14-27 Application Server Problems... 14-29 Auto Deploy... 14-30 Auto Deploy Configuration GUI... 14-31 HTTP Session Failover Not Working... 14-33 Troubleshooting Server Hang Problems... 14-35 Troubleshooting Server Crash Problems... 14-37 Troubleshooting Server Crash Problems... 14-38 Troubleshooting JVM Process Problems... 14-39 Troubleshooting JVM Process Problems... 14-40 Load Balancer Errors... 14-42 Load Balancer Files Not Found... 14-43 Load Balancer Timeout Period Problems... 14-44 Dynamic Reconfiguration Fails... 14-46 HADB Problems... 14-47 HADB Database Creation Fails... 14-48 HADB Administration Errors... 14-51 The hadbm Command Fails: The agents <url> could not be reached... 14-52 The hadbm Command Fails: JAVA_HOME not defined 14-53 The create Command Fails: Path does not exist on a host... 14-54 The hadbm createdomain Command Fails... 14-55 xv
The hadbm Command Does Not Return Control to the User... 14-56 Database Does Not Start... 14-58 Database Restart Problems... 14-60 HADB Management Agent Crashes... 14-61 HADB Holding on to Shared Memory... 14-62 Double Node Failure... 14-63 The create-session-store Command Fails... 14-65 Session Data Corrupted... 14-67 Performance Problems... 14-68 xvi Sun Java System Application Server SE/EE 8.1 2005Q2: Administration and Deployment