ebook img

SCEA Sun certified enterprise architect for Java EE study guide (exam 310-051) PDF

654 Pages·2007·6.28 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 SCEA Sun certified enterprise architect for Java EE study guide (exam 310-051)

SCEA Sun® Certified Enterprise Architect for Java EE Study Guide ™ (Exam 310-051) Paul R. Allen Joseph J. Bambara New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto Copyright © 2007 by The McGraw-Hill Companies. All rights reserved. Manufactured in the United States of America. Except as per- mitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. 0-07-151093-1 The material in this eBook also appears in the print version of this title: 0-07-148861-8. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate train- ing programs. For more information, please contact George Hoare, Special Sales, at [email protected] or (212) 904-4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. DOI: 10.1036/0071488618 ABOUT THE CONTRIBUTORS About the Authors Paul R. Allen is a principal of UCNY, Inc., an international consulting firm that helps Fortune 500 companies improve their operations through the use of web, database, and object technology. He has been developing applications for more than 20 years. He has been developing database applications for the last 18 years and using Weblogic, WebSphere, and Java for web development for the past eight years. His industry experience includes financial, brokerage, pharmaceutical, and manufacturing. He specializes in transitioning clients to web-based, object-oriented database technology. He has taught numerous courses in computing at the Columbia University of New York. He has coauthored the following books: PowerBuilder: A Guide To Developing Client/Server Applications (McGraw-Hill, 1995), Informix: Client /Server Application Development (McGraw-Hill, 1997), Informix: Universal Data Option (McGraw-Hill, 1998), SQL Server 7 Developer’s Guide (IDG, 2000) and J2EE Unleashed (SAMS, 2002). He has presented numerous courses and presentations on computing in several cities and countries, including Berlin, Copenhagen, London, Los Angeles, Nashville, New York, Orlando, Oslo, Paris, Stockholm, Vienna, and Washington, D.C. over the past 12 years. His e-mail address is [email protected]. Joseph J. Bambara is a principal of UCNY, Inc., an international consulting firm that helps Fortune 500 companies improve operations through the use of database and object technology. He has been developing application systems for more than 25 years, including relational database development for the last 20 years and Java application server for web development for the past eight years. He is a Certified Trainer and Developer. His industry experience includes financial, brokerage, manufacturing, medical, and entertainment. Mr. Bambara has a Bachelor’s and Master’s degree in Computer Science. He also holds a Juris Doctorate in Law and is admitted to the New York Bar. He has taught various computer courses for CCNYs School of Engineering. He has coauthored the following books: PowerBuilder: A Guide To Developing Client/Server Applications (McGraw-Hill, 1995), Informix: Client /Server Application Development (McGraw-Hill, 1997), Informix: Universal Server (McGraw-Hill, 1998), Informix: Universal Data Option (McGraw-Hill, 1998), SQL Server 7 Developer’s Guide (IDG, 2000) and J2EE Unleashed (SAMS, 2002). He has presented numerous courses and presentations for Weblogic, WebSphere, and Copyright © 2007 by The McGraw-Hill Companies. Click here for terms of use. Sybase in several cities and countries, including Los Angeles, Vienna, Paris, Berlin, Orlando, Nashville, New York, Copenhagen, Oslo, and Stockholm over the past ten years. His e-mail address is [email protected]. About the Technical Editor Thomas Garben is a principal of J-Class Solutions, Inc., a consulting firm that provides enterprise application architecture services and resources. He has developed applications for several different industries, ranging from Guided Missile Systems for the U.S. Navy, to Financial Applications for many major banks and clearing houses on Wall Street, to content distribution systems for major sports entertainment firms. He has been developing applications since 1985 and has been immersing himself in Java and J2EE technologies since their inception. He holds degrees in Physics, Math, and Computer Engineering and a Master’s degree in Systems and Computer Engineering. He is a coauthor of the book J2EE Unleashed (SAMS, 2002). His e-mail address is [email protected]. Copyright © 2007 by The McGraw-Hill Companies. Click here for terms of use. CONTENTS AT A GLANCE 1 Sun Certification for the Enterprise Architect ........................... 1 2 Common Architectures and Protocols ..................................... 21 3 Object-Oriented Analysis and Design ..................................... 81 4 Applicability of JEE Technology ........................................... 125 5 Design Patterns .............................................................. 203 6 Legacy Connectivity ......................................................... 297 7 Enterprise JavaBeans and the EJB Container Model ..................... 355 8 Messaging ..................................................................... 459 9 Internationalization and Localization ...................................... 505 10 Security ....................................................................... 531 11 Case Study: Overview of Securities Trading System ..................... 569 A About the CD ................................................................ 597 Glossary ....................................................................... 601 Index .......................................................................... 615 ix For more information about this title, click here CONTENTS Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii 1 Sun Certification for the Enterprise Architect . . . . . . 1 Widespread Capabilities for Application Development . . . . . . . . . . . 3 Java Is the Glue That Binds the Application Development Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Companies Increasingly Need the Internet to Compete . . . . . . . . . . 5 Challenges of Application Development for the Enterprise . . . . . . . . 6 Increasing Programmer Productivity . . . . . . . . . . . . . . . . . . 7 JEE Architecture Must Respond to Consumer Demand . . . . 7 The Architect Must Be Able to Integrate JEE and Legacy Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 The JEE Standard Promotes Competition and Choices . . . . 8 Design Goals of JEE Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 9 JEE Architects Should Strive for Service Availability . . . . . 9 JEE Architecture and Connectivity to Existing Data . . . . . . 10 Expanded User Definition: Customers, Employees, and Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Flexible User Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Flexible Business Component Model . . . . . . . . . . . . . . . . . 11 Sun Certified Enterprise Architect Distinguishes the JAVA Professional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 General SCEA Test Preparation Tips . . . . . . . . . . . . . . . . . . . . . . . 17 2 Common Architectures and Protocols . . . . . . . . . . . 21 Types of Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Reference Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Flexible Reference Architecture . . . . . . . . . . . . . . . . . . . . . 26 xi xii SCEA Sun Certified Enterprise Architect for Java EE Study Guide Architectural Design and Principles . . . . . . . . . . . . . . . . . . . . . . . . 27 Where Architecture Fits in Analysis, Design, and Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Architectural Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Surface Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Brittleness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Capabilities, Friction, and Layering . . . . . . . . . . . . . . . . . . 36 Principles of Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Layering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Tiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Capabilities of an Architecture . . . . . . . . . . . . . . . . . . . . . 39 Creating an Architecture Using Distributed Services and JEE . . . . . . 47 Enterprise JavaBeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Distributed Application Life cycle . . . . . . . . . . . . . . . . . . . 50 Iterative Development/MVC . . . . . . . . . . . . . . . . . . . . . . . 53 Simplified Architecture and Development . . . . . . . . . . . . . 54 Component-Based Application Models . . . . . . . . . . . . . . . 55 JEE APIs and Certification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 JEE Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 JEE Reference Implementation . . . . . . . . . . . . . . . . . . . . . 61 Sun BluePrint Design Guidelines for JEE . . . . . . . . . . . . . . 61 XML and JEE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Why Use XML? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Electronic Data Exchange and E-Commerce . . . . . . . . . . . . 63 Electronic Data Interchange (EDI) . . . . . . . . . . . . . . . . . . . 64 Enterprise Application Integration (EAI) . . . . . . . . . . . . . . 64 Software Development and XML . . . . . . . . . . . . . . . . . . . . 65 XML Technology and the Java Platform . . . . . . . . . . . . . . . 66 Distributed Programming Services . . . . . . . . . . . . . . . . . . . . . . . . . 67 Naming and Registration . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Remote Method Invocation (RMI) . . . . . . . . . . . . . . . . . . 67 Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Distributed Object Frameworks . . . . . . . . . . . . . . . . . . . . . 68 Given an Architecture Described in Terms of Network Layout, List Benefits and Potential Weaknesses Associated with It . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Contents xiii Exercise 2-1 Role of Architect . . . . . . . . . . . . . . . . . . . . 72 Exercise 2-2 Architecture Terminology . . . . . . . . . . . . . 72 Exercise 2-3 Abstraction, Boundaries, Brittleness, and Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Exercise 2-4 Fundamentals of System Architecture . . . . . 73 Exercise 2-5 Abstraction . . . . . . . . . . . . . . . . . . . . . . . . 74 Certification Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 3 Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 3 Object-Oriented Analysis and Design . . . . . . . . . . . . 81 Analysis and Design of Object-Oriented Architecture . . . . . . . . . . . 83 Key Features of OOP: Objects and Classes . . . . . . . . . . . . . 84 Defining Object-Oriented Analysis and Design . . . . . . . . . . 85 Project Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Unified Modeling Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Elements Used in UML . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Relationships Used in UML . . . . . . . . . . . . . . . . . . . . . . . . 92 Diagrams Used in UML . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Stereotypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Practical Use of UML Diagrams . . . . . . . . . . . . . . . . . . . . . 99 3 Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 4 Applicability of JEE Technology . . . . . . . . . . . . . . . . . 125 Explain the JEE Architecture and System Requirements . . . . . . . . . 126 JEE Technology Layers Applied . . . . . . . . . . . . . . . . . . . . . 126 JEE Application Components . . . . . . . . . . . . . . . . . . . . . . 130 JEE Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Exercise 4-1 JEE Architecture and the Nonfunctional Requirements of a System . . . . . . . . . . . . . . . . . . . . . . . 136 Development Methodology and Process . . . . . . . . . . . . . . . 138 Explain the Use of Patterns in the JEE Framework . . . . . . . . . . . . . . 144 Use of Patterns in the JEE Framework . . . . . . . . . . . . . . . . . 144 Exercise 4-2 Patterns in the JEE Framework and Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 xiv SCEA Sun Certified Enterprise Architect for Java EE Study Guide Describe the Concepts of “Best Practices” and “Guidelines” . . . . . . . 149 Identifying the Need for Best Practices . . . . . . . . . . . . . . . . 151 Best Practice: Client Tier . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Illustrate the Use of JEE for Workflow . . . . . . . . . . . . . . . . . . . . . . . 152 Best Practice: MVC Pattern . . . . . . . . . . . . . . . . . . . . . . . . 153 Exercise 4-3 Structuring Development . . . . . . . . . . . . . . 160 Exercise 4-4 Defining Best Practice and Guideline . . . . . 162 Review Best Practices Applicable for All Tiers . . . . . . . . . . . . . . . . . 162 Review Best Practices for the Client Tier . . . . . . . . . . . . . . . . . . . . 163 Enumerate the Components and Categories of the Web Tier . . . . . . 164 Explain How to Apply MVC to the Web Tier . . . . . . . . . . . . . . . . . 164 Review the Best Practices for the Presentation Layer . . . . . . . . . . . . 165 Exercise 4-5 Illustrate the Use of JEE for Workflow . . . . . 165 Review the Internationalization and Localization . . . . . . . . . . . . . . 166 Internationalization, Localization, and Locale . . . . . . . . . . . 166 Exercise 4-6 Localization and Internalization . . . . . . . . . 167 The EJB Tier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 JEE Best Practices: Data Access Objects . . . . . . . . . . . . . . . 168 JEE Best Practices: Value Objects . . . . . . . . . . . . . . . . . . . . 168 JEE Best Practices: Session Bean Facade . . . . . . . . . . . . . . . 169 JEE Best Practices: Master Detail . . . . . . . . . . . . . . . . . . . . 170 Exercise 4-7 Data Access Objects . . . . . . . . . . . . . . . . . 171 Exercise 4-8 Value Objects . . . . . . . . . . . . . . . . . . . . . . 172 Exercise 4-9 Facades . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 JEE Best Practices: EIS Integration Tier . . . . . . . . . . . . . . . 172 JEE Connector Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Illustrate When to Use JEE Technology for Given Situations . . . . . . 176 EIS Guidelines: Data Access . . . . . . . . . . . . . . . . . . . . . . . 178 EIS Access Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Guidelines: Connections . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Performance-Related Best Practices: Data Caching . . . . . . . 178 JEE Best Practices: Services . . . . . . . . . . . . . . . . . . . . . . . . 179 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Security Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Authentication in the EJB and EIS Integration Tiers . . . . . . 182 Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Transaction Guidelines in EIS . . . . . . . . . . . . . . . . . . . . . . 187 Exercise 4-10 Security Guidelines . . . . . . . . . . . . . . . . . 188 Contents xv Exercise 4-11 The Role of Transactions . . . . . . . . . . . . . 188 3 Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 5 Design Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Identify the Benefits of Using Design Patterns . . . . . . . . . . . . . . . . . 204 Design Patterns by Gamma et al., also known as The Gang of Four (GoF) . . . . . . . . . . . . . . . . . . . . . . . . 205 Identify the Most Appropriate Design Pattern for a Given Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 GoF Creational Design Patterns . . . . . . . . . . . . . . . . . . . . . 206 GoF Structural Design Patterns . . . . . . . . . . . . . . . . . . . . . 221 GoF Behavioral Design Patterns . . . . . . . . . . . . . . . . . . . . . 239 Sun’s J2EE Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 State the Name of a Gamma et al. Design Pattern Given the UML Diagram and/or a Brief Description of the Pattern’s Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Identify Benefits of a Specified Gamma et al. Design Pattern . . . . . . 282 Identify the Gamma et al. Design Pattern Associated with a Specified Java EE Technology Feature . . . . . . . . . . . . . . . . . . . . 284 3 Two-Minute Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Q&A Self Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 Self Test Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 6 Legacy Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Introduction to Legacy Connectivity . . . . . . . . . . . . . . . . . . . . . . . 298 Legacy Connectivity Using Java: the Classic Approach . . . . 300 Legacy Connectivity Using JEE Connector Architecture . . . 305 Java Connector Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 JEE Connector Architecture: A General Integration Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 The Structure of the JCA . . . . . . . . . . . . . . . . . . . . . . . . . 312 Basic JCA 1.0 Adapter Implementation . . . . . . . . . . . . . . . 316 JCA 1.5 Adapter Implementation . . . . . . . . . . . . . . . . . . . 329 Distinguish Appropriate from Inappropriate Techniques for Providing Access to a Legacy System from Java Technology Code Given an Outline Description of That Legacy System . . . . . 339

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.