ebook img

Oracle Application Server 10g: J2EE Deployment and Administration PDF

581 Pages·2004·20.77 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Oracle Application Server 10g: J2EE Deployment and Administration

Oracle Application Server 1O g J2EE Deployment and Administration MICHAEL WESSLER WITH ERIN MULDER, ROB HARROP, AND JAN MACHACEK APress Media, LLC Oracle Application Server lOg: J2EE Deployment and Administration Copyright © 2004 by Michael Wessler, Erin Mulder, Rob Harrop, and Jan Machacek Originally published by Apress in 2004 All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN 978-1-59059-235-9 ISBN 978-1-4302-0744-3 (eBook) DOI 10.1007/978-1-4302-0744-3 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Tony Davis Technical Reviewers: Jeremy Smith and Jakob Hammer-Jakobsen Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore, Chris Mills, Steve Rycroft, Dominic Shakeshaft, Jim Sumser, Gavin Wray Project Manager: Beth Christmas Copy Edit Manager: Nicole LeClerc Copy Editor: Mark Nigara Production Manager: Karl Brooks Production Editor: KellyWmquist Compositor: Diana Van Winkle, Van Winkle Design Group Proofreaders: Linda Seifert, Katie Stence, Greg Teague Indexer: Valerie Perry Artist: Diana Van Wmkle, Van Winkle Design Group Book Designer: Diana Van Wmkle, Van Wmkle Design Group Cover Designer: Kurt Krames Manufacturing Manager: Tom Debolski The information in this book is distributed on an "as is" basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. To my grandmother Alma johnson; for always being incredibly supportive and loving. -Michael Wessler Contents at a Glance About the Authors ................................................................ xix About the Technical Reviewers ..................................................... xxi Acknowledgments ............................................................... xxiii CHAPTER 1 Overview of Features, Editions, and Releases .................... 1 CHAPTER 2 Developing with Oracle 10g AS ................................. 15 CHAPTER 3 OC4J Installation and Runtime Behavior ........................ 23 CHAPTER 4 General Server Configuration .................................. 41 CHAPTER 5 Configuring JNDI and JDBC Services ........................... 59 CHAPTER 6 Configuring Java Message Service ............................. 79 CHAPTER 7 Security ....................................................... 99 CHAPTER 8 Using JavaMail and Java APis for XML ........................ 125 CHAPTER 9 J2EE Application Deployment ................................. 137 CHAPTER 10 Web Applications ............................................. 159 CHAPTER 11 Enterprise JavaBeans ......................................... 195 CHAPTER 12 J2EE Connectors ............................................. 221 CHAPTER 13 Configuring Web Services ..................................... 251 CHAPTER 14 Application Clients ............................................ 267 CHAPTER 15 Architecture and Deployment Topologies ...................... 279 CHAPTER 16 Installation and Administration ................................ 303 CHAPTER 17 Configuring J2EE Services .................................... 343 CHAPTER 18 Deploying Applications ........................................ 369 CHAPTER 19 Configuring Web Caching ..................................... 389 CHAPTER 20 Configuring Enterprise Security ............................... 423 CHAPTER 21 Configuring Clustering and Failover ........................... 457 APPENDIX A Server Configuration Files and Document Type Declaration .... 497 APPENDIX B Deployment Descriptors and Document Type Declaration ...... 519 APPENDIX C Command-Line Utility Usage .................................. 527 APPENDIX D Debugging Tips ............................................... 541 INDEX ......................................................................... 549 v Contents About the Authors ................................................................ xix About the Technical Reviewers ..................................................... xxi Acknowledgments ............................................................... xxiii Overview of Features, Editions, and Releases ............. 1 Choosing an Edition .............................................. 1 Deciding Which Features You Need ............................ 3 Choosing a Release Version ........................................ 4 OAS ........................................................ 5 iAS ........................................................ 5 9iAS v1 ..................................................... 5 9iAS v2 ..................................................... 5 10gAS ..................................................... 5 J2EE Features ................................................... 6 Servlets and JavaServer Pages ................................ 6 Enterprise JavaBeans ........................................ 7 Java Message Service ....................................... 7 Java Database Connectivity and J2EE Connectors ............... 7 Transactions ................................................ 7 Security .................................................... 7 Other J2EE Services ......................................... 8 Non-J2EE Components ........................................... 8 Oracle HTIP Server .......................................... 8 Web Cache ................................................. 9 Application Server Control .................................... 9 Single Sign-On ............................................. 10 Content Management SDK ................................... 1o Integration ................................................. 1o Oracle Internet Directory ..................................... 11 JDeveloper ................................................ 11 Toplink ................................................... 12 Portal ..................................................... 12 Discoverer ................................................. 12 Reports ................................................... 13 vii viii CONTENTS Forms ..................................................... 13 Personalization ............................................. 13 Wireless ................................................... 13 Summary ...................................................... 13 CHAPTER 2 Developing with Oracle 10g AS ............................ 15 Choosing an Edition for Developers ................................ 15 Consider Application Requirements ........................... 15 Consider Developer Experience ............................... 16 Setting Up the Development Environment. ..................... 16 Choosing an Edition for Testing .................................... 17 Running Unit Tests .......................................... 17 Running Integration Tests .................................... 17 Running Performance Tests .................................. 18 Environmental Considerations ................................ 18 Strategies for Development ....................................... 18 Strategies for Testing ............................................ 19 Strategies for Deployment ........................................ 20 Accessing J2EE Applications ...................................... 21 Summary ...................................................... 21 CHAPTER 3 OC4J Installation and Runtime Behavior .................. 23 Installing the Standalone Server ................................... 23 Downloading and Setting Up OC4J Standalone ................. 24 Testing Your Installation ..................................... 25 Exploring the Server Directory Structure ....................... 27 Basic Operation ................................................. 28 Starting the Server .......................................... 28 Stopping the Server. ........................................ 29 Restarting the Server ....................................... 30 Sample Scripts ............................................. 31 Running as a Windows Service ............................... 31 Running as a UNIX Service ................................... 32 Runtime Behavior ............................................... 32 Server Architecture ......................................... 32 Classloading ............................................... 34 Ports and Protocols ......................................... 39 Performance and Memory Usage ............................. 39 Compilers ................................................. 40 Summary ...................................................... 40 lx General Server Configuration .............................. 41 Working with Configuration Files .................................. 41 Configuring Application-level Resources ....................... 41 Editing Configuration Files ................................... 42 Managing Multiple Configurations ............................ 42 Finding the Right Configuration File ................................ 44 Configuring Logging ............................................. 46 Configuring Log Filenames and Locations ...................... 46 Redirecting Standard Output and Error Streams ................ 47 Using OC4J Debug Parameters ............................... 47 Configuring File Locations ........................................ 48 Configuring Ports ................................................ 49 HTIP ...................................................... 49 HTIPS .................................................... 50 Java Message Service ...................................... 51 Remote Method Invocation ................................... 51 IIOP ....................................................... 51 Configuring Compilers ........................................... 52 In-Process Compilation ...................................... 53 Compiling with Jikes ........................................ 53 Configuring Transactions ......................................... 53 Transaction Timeout ........................................ 53 Transaction Recovery ....................................... 54 Configuring Other J2EE Services .................................. 54 Configuring HTIP Connection Throttling ............................ 54 Configuring Deployment Behavior ................................. 55 application-auto-deploy-directory ............................ 56 application-directory ........................................ 56 deployment-directory ....................................... 56 connector-directory ......................................... 56 auto-start-applications ...................................... 57 Configuring Applications ......................................... 57 Summary ...................................................... 58 Configuring JNDI and JDBC Services ...................... 59 Java Naming and Directory Interface .............................. 59 Understanding JNDI Locations ............................... 60 Getting a JNDI Context ...................................... 61 x CONTENTS Accessing Databases from J2EE Applications ....................... 61 Simple Database Access in Non-J2EE Environment ............. 61 Database Access in a J2EE Environment. ...................... 62 JDBC Drivers ................................................... 64 Choosing the Right Driver .................................... 65 Choosing a Data Source Type ..................................... 68 Configuring Data Sources ........................................ 68 Customizing Data-Source Attributes ........................... 71 Customizing Data Source Properties .......................... 73 Deploying Data Sources ..................................... 74 Using Data Sources .............................................. 74 Determining the Correct JNDI Location ........................ 75 Overriding the Default Username and Password ................ 75 Using Oracle JDBC extensions ................................ 75 Configuring Two-Phase Commit ................................... 76 Summary ...................................................... 11 ICH Configuring Java Message Service ........................ 79 JMS in Oracle 1O g Application Server .............................. 79 The Resource Provider Model ................................ 80 Configuring and Using Oracle 1O g AS JMS .......................... 81 Standard Configuration ...................................... 81 Building and Configuring an Application ....................... 83 Configuring File Persistence .................................. 90 Configuring Hosts and Ports .................................. 92 Configuring Logging ........................................ 92 Configuring Oracle JMS .......................................... 93 Setting Up the Queue ....................................... 93 Configuring Oracle 1O g AS ................................... 94 Configuring the Hello World Application ........................ 95 Configuring Third-Party JMS ...................................... 95 Picking Your Provider ............................................ 97 Summary ...................................................... 98 ICil Security ...................................................... 99 Introduction to J2EE Security ................................ 1o o Introduction to the Java Authentication and Authorization Service ................................. 1o o ONTENTS XI Oracle Application Server Security Overview .................. 102 Creating and Configuring a Secure Application ................ 104 Administering the HelloServlet Application with JAZN Admintool ..................................... 115 Using the JAZNUserManager LDAP Provider ................... 116 Using DataSourceUserManager .............................. 119 Customizing Security ....................................... 122 Choosing Your Security Method .............................. 123 Summary ..................................................... 124 a CHAPTER Using JavaMail and Java APis for XML. .................. 125 JavaMail ...................................................... 125 Building an Application with JavaMail and JNDI ............... 125 Configuring a Mail Session .................................. 126 Creating a Local Resource Reference ........................ 127 The Mail Form ............................................. 128 Building the JavaMaiiServlet ................................ 129 Choosing Between Global and Local Namespaces ............. 133 Java APis for XML .............................................. 134 Determining your JAX version ............................... 134 Overriding the JAX implementation .......................... 135 Testing the JAX Override .................................... 135 Summary ..................................................... 136 CHAPTER 9 J2EE Application Deployment ............................. 137 J2EE Architecture .............................................. 137 Configuration .................................................. 138 OC4J Server Configuration Files ............................. 139 Application Configuration Files .............................. 140 Organization and Packaging ..................................... 141 Java Archive File .......................................... 142 Web Archive (WAR) File ..................................... 143 Enterprise Archive (EAR) File ................................ 148 Deployment ................................................... 150 Deployment Steps ......................................... 150 Explanation of Deployment. ................................. 153 Forcing a Automatic Redeployment. ...................... 156 Summary ..................................................... 157

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.