• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
J2EE Study Guide
 

J2EE Study Guide

on

  • 1,767 views

 

Statistics

Views

Total Views
1,767
Views on SlideShare
1,767
Embed Views
0

Actions

Likes
0
Downloads
38
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    J2EE Study Guide J2EE Study Guide Document Transcript

    • Sun® Certified Enterprise Architect for J2EE Study Guide (Exam 310-051) McGraw-Hill/Osborne is an independent entity from Sun Microsystems, Inc. and is not affiliated with Sun Microsystems, Inc. in any manner. This publication and CD may be used in assisting students to prepare for a Sun Certified Enterprise Architect for J2EE Technology Exam. Neither Sun Microsystems nor McGraw-Hill/Osborne warrants that use of this Paul R. Allen, publication and CD will ensure passing the relevant exam. Sun, Sun Microsystems, and the Sun Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Java and all Java-based marks are trademarks or registered Joseph J. Bambara trademarks of Sun Microsystems, Inc. in the United States and other countries. McGraw-Hill/Osborne New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto
    • CONTENTS Acknowledgments xxi Preface xxiii Introduction xxvii 1 Sun Certification for Enterprise Architect I 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 6 J2EE Architecture Must Respond to Consumer Demand 7 The Architect Must Be Able to Integrate J2EE and Legacy Systems 8 The J2EE Standard Promotes Competition and Choices 8 Design Goals of J2EE Architecture 9 J2EE Architects Should Strive for Service Availability 9 J2EE Architecture and Connectivity to Existing Data 10 Expanded User Definition: Customers, Employees, and Partners 10 Flexible User Interaction 11 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 23 Reference Architecture 25 Flexible Reference Architecture 26 Architectural Design and Principles 27 Where Architecture Fits in Analysis, Design, and Development .. 28 XI
    • Sun Certified Enterprise Architect for J2EE Study Guide Architectural Terminology 33 Abstraction 33 Surface Area 34 Boundaries 34 Brittleness 35 Capabilities, Friction, and Layering 35 Principles of Architecture 36 Layering 36 Tiers 37 Capabilities of an Architecture 39 Creating an Architecture Using Distributed Services and J2EE 46 Enterprise JavaBeans 49 Distributed Application Lifecycle 50 Iterative Development/MVC 52 Simplified Architecture and Development 53 Component-Based Application Models 54 J2EE APIs and Certification 58 J2EE Specification 60 J2EE Reference Implementation 60 Sun BluePrint Design Guidelines for J2EE 60 XML and J2EE 60 Why Use XML? 62 Electronic Data Exchange and E-Commerce 63 Electronic Data Interchange (EDI) 63 Enterprise Application Integration (EAI) 64 Software Development and XML 64 XML Technology and the Java Platform 65 Distributed Programming Services 66 Naming and Registration 66 Remote Method Invocation (RMI) 66 Protocols 67 Distributed Object Frameworks 68 Given an Architecture Described in Terms of Network Layout, List Benefits and Potential Weaknesses Associated with It 70
    • Contents XJM Exercise 2-1: Role of Architect 71 Exercise 2-2: Architecture Terminology 71 Exercise 2-3: Abstraction, Boundaries, Brittleness, and Capabilities 72 Exercise 2-4: Fundamentals of System Architecture 72 Exercise 2-5: Abstraction 73 / Two-Minute Drill 74 Q&A Self Test 76 Self Test Answers 78 3 Object-Oriented Analysis and Design 79 Analysis and Design of Object-Oriented Architecture 80 Key Features of OOP: Objects and Classes 81 Defining Object-Oriented Analysis and Design 82 Project Lifecycle 82 Unified Modeling Language 85 Elements Used in UML 85 Relationships Used in UML 88 Diagrams Used in UML 89 Stereotypes 94 Practical Use of UML Diagrams 95 / Two-Minute Drill 110 Q&A Self Test 113 Self Test Answers 117 4 Applicability of J2EE Technology 121 Explain the J2EE Architecture and System Requirements 122 J2EE Technology Layers Applied 123 J2EE Application Components 126 J2EE Architecture 130 Exercise 4-1: J2EE Architecture and the Nonfunctional Requirements of a System 132 Development Methodology and Process 134
    • Sun Certified Enterprise Architect for J2EE Study Guide Explain the Use of Patterns in the J2EE Framework 140 Use of Patterns in the J2EE Framework 141 Exercise 4-2: Patterns in the J2EE Framework and Development 143 Describe the Concepts of "Best Practices" and "Guidelines" 145 Identifying the Need for Best Practices 146 Best Practice—Client Tier 147 Illustrate the Use of J2EE for Workflow 148 Best Practice—MVC Pattern 149 Exercise 4-3: Structuring Development 156 Exercise 4-4: Defining Best Practice and Guideline 157 Review Best Practices Applicable for All Tiers 158 Review Best Practices for the Client Tier 159 Enumerate the Components and Categories of the Web Tier 159 Explain How to Apply MVC to the Web Tier 160 Review the Best Practices for the Presentation Layer 160 Exercise 4-5: Illustrate the Use of J2EE for Workflow 161 Review the Internationalization and Localization 162 Internationalization, Localization, and Locale 162 Exercise 4-6: Localization and Internalization 163 The EJB Tier 163 J2EE Best Practices—Data Access Objects 163 J2EE Best Practices—Value Objects 164 J2EE Best Practices—Session Bean Facade 165 J2EE Best Practices—Master Detail 166 Exercise 4-7: Data Access Objects 167 Exercise 4-8: Value Objects 167 Exercise 4-9: Facades 168 J2EE Best Practices—EIS Integration Tier 168 J2EE Connector Overview 170 Illustrate When to Use of J2EE Technology Use for Given Situations . . 172 EIS Guidelines—Data Access 174 EIS Access Objects 174 Guidelines—Connections 174
    • Contents XV Performance-Related Best Practices Data Caching 175 J2EE Best Practices Services 175 Security 177 Security Terminology 177 Authentication in the EJB and EIS Integration Tiers 178 Transactions 180 Transaction Guidelines in EIS 183 Exercise 4-10: Security Guidelines 184 Exercise 4-11: The Role of Transactions 184 / Two Minute Drill 186 Q&A SelfTest 191 Self Test Answers 197 Design Patterns 201 Identify the Benefits of Using Design Patterns 203 The Gang of Four's Design Patterns 204 Identify the Most Appropriate Design Pattern for a Given Scenario . . . 206 GoF Creational Design Patterns 206 GoF Structural Design Patterns 220 GoF Behavioral Design Patterns 239 J2EE Patterns 276 State the Name of a Gamma et al. Design Pattern Given the UML Diagram and/or a Brief Description of the Pattern's Functionality . . 281 Identify Benefits of a Specified Gamma et al. Design Pattern 284 Identify the Gamma et al. Design Pattern Associated with a Specified J2EE Technology Feature 286 / Two-Minute Drill 287 Q&A SelfTest 292 SelfTest Answers 299 Legacy Connectivity 301 Introduction to Legacy Connectivity 302 Legacy Connectivity Using Java: the Classic Approach 303 Legacy Connectivity Using J2EE Connector 309
    • Sun Certified Enterprise Architect for J2EE Study Guide Java Connector Architecture 314 J2EE Connector Architecture: a General Integration Strategy . . 315 The Structure of the JCA 316 Basic JCA Adapter Implementation 320 Distinguish Appropriate from Inappropriate Techniques for Providing Access to a Legacy System from Java Technology Code Given an Outline Description of That Legacy System 334 Exercise 6-1: Techniques and Best Practices 335 Exercise 6-2: Implementing Data Validation and Referential Integrity Constraints 337 Exercise 6-3: Legacy Mapping 340 Exercise 6-4: Transaction Monitors 340 Exercise 6-5: Off-Board Servers 340 Exercise 6-6: JDBC vs. ODBC 341 Exercise 6-7: Accessing Legacy System Software 341 Exercise 6-8: Accessing COM Objects 341 Exercise 6-9: RMI vs. CORBA 342 / Two-Minute Drill 343 Q&A SelfTest 345 SelfTest Answers 347 Enterprise JavaBeans and the EJB Container Model . . . 349 List the Required Classes/Interfaces That Must Be Provided for an Enterprise JavaBeans Component 351 Classes and Interfaces for EJB 352 Distinguish Between Session and Entity Beans 353 Session and Entity Beans 354 Recognize Appropriate Uses for Entity, Stateful Session, and Stateless Session Beans 355 When to Use Entity and Session JavaBeans 356 Distinguish Between Stateful and Stateless Session Beans 356 Using Session Beans 357 Exercise 7-1: Review Code for a Stateless Session Bean . . . . 367 Exercise 7-2: Review Code for a Stateful Session Bean 376 Using Entity Beans 383
    • Contents X V Ij Exercise 7-3: Review Code for Entity Bean Using Container-Managed Persistence 386 A Closer Look at Entity Beans 399 State the Benefits and Costs of Container-Managed Persistence 407 Managing Persistence 407 EJB Clients 415 State the Transactional Behavior in a Given Scenario for an Enterprise Bean Method with a Specified Transactional Attributed as Defined in the Deployment Descriptor 417 Transactions and Transaction Management 418 Given a Requirement Specification Detailing Security and Flexibility Needs, Identify Architectures that Would Fulfill Those Requirements 421 Security 421 EJB Framework 425 Identify Costs and Benefits of Using an Intermediate Data Access Object Between an Entity Bean and the Data Resource 429 Using Data Access Objects for Entity Beans 429 State the Benefits of Bean Pooling in an EJB Container 430 Bean Pooling in the EJB Container 430 Explain How the Enterprise JavaBeans Container Does Lifecycle Management and Has the Capability to Increase Scalability 431 The Lifecycle of an EJB 431 </ Two-Minute Drill 435 Q&A SelfTest 438 SelfTest Answers 443 8 Messaging 447 Messaging Basics 448 Messages 448 Middleware 448 Message-Oriented Middleware 449 Communication Modes 450 Identify Scenarios That Are Appropriate to Implementation Using Messaging 451
    • XVlii Sun Certified Enterprise Architect for J2EE Study Guide List Benefits of Synchronous and Asynchronous Messaging 452 Identify Scenarios That Are More Appropriate to Implementation Using Asynchronous Messaging, Rather Than Synchronous 452 Identify Scenarios That Are More Appropriate to Implementation Using Synchronous Messaging, Rather Than Asynchronous 453 Java Message Service 454 Handling Exceptions 455 Managing Sessions 455 Components of a JMS Message 455 Required Components of a JMS Application 458 Objects Used to Create and Receive Messages in a JMS Client Application 458 How the Point-to Point Message Model Works 461 How the Publish/Subscribe Message Model Works 467 Message-Driven Bean (MDB) Component 475 Identify Scenarios That Are Appropriate to Implementation Using Messaging, Enterprise JavaBeans Technology, or Both 480 / Two-Minute Drill 482 Q&A SelfTest 484 SelfTest Answers 488 Internationalization and Localization 491 State Three Aspects of Any Application That Might Need to Be Varied or Customized in Different Deployment Locales 492 Internationalization and Localization 492 Overview of Internationalizing an Application 493 List Three Features of the Java Programming Language That Can Be Used to Create an Internationalizable/Localizable Application 494 Java Support for Internationalization and Localization 494 Using Java Internationalization APIs in J2EE Applications . . . . 503 Web Tier Internationalization 504 Logging and Error Messages 507 / Two-Minute Drill 511 Q&A SelfTest 512 Self Test Answers 516
    • Contents 10 Security 519 Security 520 Identify Security Restrictions That Java 2 Technology Environments Normally Impose on Applets Running in a Browser 523 Applets in a Browser 523 Given an Architectural System Specification, Identify Appropriate Locations for Implementation of Specified Security Features and Select Suitable Technologies for Implementation of Those Features 525 Authentication 525 Authorization 539 / Two-Minute Drill 548 Q&A SelfTest 549 SelfTest Answers 552 11 Case Study: Overview of Securities Trading System .. 555 The Case Study Infrastructure 556 WebSphere Application Server 558 Continuous Trade Processing 558 SQLBIS Database Server 560 Model and Develop the Case Study 560 Actor Definition 561 Business Process Model 562 Sequence Diagrams 567 Class Descriptions 568 Class Diagrams 568 State Transition (Lifecycle) Diagrams 569 Trade System Design and Implementation 573 Stock Order Entry Screen 573 Trade Application Packages 579 Trade Application Implementation Infrastructure 579 Glossary 583
    • XX Sun Certified Enterprise Architect for J2EE Study Guide A About the CD 597 System Requirements 598 Code on the CD 598 Installing and Running MasterExam 598 MasterExam 599 Electronic Book 599 Help 599 Removing Installation(s) 599 Technical Support 599 LearnKey Technical Support 600 LearnKey Online Training 600 Index 601