Sams Teach Yourself J2EE™ in 21 Days

Book description

J2EE has become required knowledge for any serious Java developer, but learning this large and complex specification requires a substantial investment of time and energy. Sams Teach Yourself J2EE in 21 Days presents the enterprise Java architecture in accessible, easy-to-comprehend lessons, describing how each J2EE tool solves the challenges of n-Tier development. Using the architecture as a roadmap, following chapters describe Enterprise JavaBeans (EJB), JavaServer Pages (JSP), servlets, and more, giving readers a full understanding of J2EE development.

Further chapters cover the role of XML, custom JSP tags, and how Java Connectors allow J2EE applications to interact with legacy and non-Java systems. The book finishes with sample applications that put all the pieces together, including an example using J2EE to create Web Services. Along the way, every concept is illustrated with practical, real-world examples to ensure understanding by Java students as well as experts.

Table of contents

  1. Copyright
  2. About the Authors
  3. Acknowledgments
  4. Tell Us What You Think!
  5. Introduction
  6. Introducing J2EE and EJBs
    1. The Challenge of N-Tier Development
      1. Monolithic Development
      2. The Move into the Second Tier
      3. Complexity Simplified by Modularity
      4. Benefits of the 3-Tier Scenario
      5. A Model for Enterprise Computing
      6. Java 2 Enterprise Edition (J2EE)
      7. The Future of J2EE
      8. Summary
      9. Q&A
      10. Exercises
    2. The J2EE Platform and Roles
      1. Revisiting the J2EE Platform
      2. Using Sun Microsystems' J2EE SDK
      3. Understanding Tiers and Components
      4. Understanding Containers
      5. Understanding the Services Containers Supply to Components
      6. Introducing Platform Roles
      7. Packaging and Deploying J2EE Applications
      8. Summary
      9. Q&A
      10. Exercises—Case Study
    3. Naming and Directory Services
      1. Naming and Directory Services
      2. Why Use a Naming Service?
      3. What is JNDI?
      4. Common Naming Services
      5. Naming Conventions
      6. Using JNDI
      7. Obtaining an Initial Context
      8. Initial Context Naming Exceptions
      9. Binding JNDI Objects
      10. JNDI Name Lookup
      11. Contexts
      12. More on JNDI Names
      13. Attributes
      14. More on Objects
      15. What Else Can JNDI Do?
      16. Summary
      17. Q&A
      18. Exercise
    4. Introduction to EJBs
      1. What Is an EJB?
      2. Why Use EJBs?
      3. What's in an EJB?
      4. How Do I Create an EJB?
      5. How Do I Deploy an EJB?
      6. How Do I Use an EJB?
      7. Deploying and Using an EJB in the J2EE Reference Implementation
      8. Summary
      9. Q&A
      10. Exercises
    5. Session EJBs
      1. Overview
      2. The javax.ejb Package for Session Beans
      3. Stateless Session Bean Lifecycle
      4. Specifying a Stateless Session Bean
      5. Implementing a Stateless Session Bean
      6. Configuring and Deploying a Stateless Session Bean
      7. Stateful Session Bean Lifecycle
      8. Specifying a Stateful Session Bean
      9. Implementing a Stateful Session Bean
      10. Configuring and Deploying a Stateful Session Bean
      11. Client's View
      12. Patterns and Idioms
      13. Gotchas
      14. Summary
      15. Q&A
      16. Exercises
    6. Entity EJBs
      1. Overview
      2. The javax.ejb Package for Entity Beans
      3. Entity Bean Types
      4. Remote Versus Local Interfaces
      5. BMP Entity Bean Lifecycle
      6. Specifying a BMP Entity Bean
      7. Implementing a BMP Entity Bean
      8. Configuring and Deploying a BMP Entity Bean
      9. Client's View
      10. Session Beans Revisited
      11. Patterns and Idioms
      12. Gotchas
      13. Summary
      14. Q&A
      15. Exercises
    7. CMP and EJB QL
      1. Overview of Container-Managed Persistence
      2. CMP Entity Bean Lifecycle
      3. Container-Managed Relationships
      4. EJB QL
      5. Specifying a CMP Entity Bean
      6. Implementing a CMP Entity Bean
      7. Configuring a CMP Entity Bean
      8. Deploying a CMP Entity Bean
      9. Patterns and Idioms
      10. Gotchas
      11. Summary
      12. Q&A
      13. Exercises
  7. Developing J2EE Applications
    1. Transactions and Persistence
      1. Overview of Transactions
      2. Container-Managed Transaction Demarcation
      3. Bean Managed Transaction Demarcation
      4. Extended Stateful Session Bean Lifecycle
      5. Transactions: Behind the Scenes
      6. Overview of Persistence Technologies
      7. JDBC
      8. SQLj
      9. JDO
      10. Gotchas
      11. Summary
      12. Q&A
      13. Exercises
    2. Java Message Service
      1. Messaging
      2. Java Message Service API
      3. JMS API Architecture
      4. Developing JMS Applications Using JBoss1
      5. Programming a JMS Application Using J2EE RI
      6. Point-to-Point Messaging Example
      7. Simple Synchronous Receiver Example
      8. The Publish/Subscribe Message Domain
      9. Publish/Subscribe Messaging Example
      10. Introduction to XML
      11. Summary
      12. Q&A
      13. Exercise
    3. Message-Driven Beans
      1. What Are Message-Driven Beans?
      2. Programming Interfaces in a Message-Driven Bean
      3. Life Cycle of a Message-Driven Bean
      4. Creating a Message-Driven Bean
      5. Writing a Simple Message-Driven Bean
      6. Running the Example
      7. Developing the Agency Case Study Example
      8. Using Other Architectures
      9. Summary
      10. Q&A
      11. Exercise
    4. JavaMail
      1. Understanding E-Mail
      2. Introducing the JavaMail API
      3. Setting up Your Development Environment
      4. Sending a First E-mail
      5. Creating Multi-Media E-mails
      6. Sending E-mails with Attachments
      7. Exploring the JavaMail API
      8. Summary
      9. Q&A
      10. Exercises
    5. Servlets
      1. The Purpose and Use of Servlets
      2. Introduction to HTTP
      3. Introduction to HTML
      4. The Servlet Environment
      5. The Servlet Class Hierarchy
      6. Simple Servlet Example
      7. Passing Parameter Data to a Servlet
      8. Web Applications
      9. Handling Errors
      10. Retaining Client and State Information
      11. Servlet Filtering
      12. Event Listening
      13. Servlet Threads
      14. Security and the Servlet Sandbox
      15. Agency Case Study
      16. Summary
      17. Q&A
      18. Exercises
    6. JavaServer Pages
      1. What Is a JSP?
      2. JSP Syntax and Structure
      3. First JSP example
      4. JSP Lifecycle
      5. JSP Directives
      6. Accessing HTTP Servlet Variables
      7. Using HTTP Request Parameters
      8. Simplifying JSP pages with JavaBeans
      9. Adding a Web Interface to the Agency Case Study
      10. Comparing JSP with Servlets
      11. Summary
      12. Q&A
      13. Exercise
    7. JSP Tag Libraries
      1. The Role of Tag Libraries
      2. Developing a Simple Custom Tag
      3. Tags with Attributes
      4. Tags that Define Script Variables
      5. Iterative Tags
      6. Co-operating Tags
      7. Defining Tag Extra Info Objects
      8. Processing Tag Bodies
      9. JavaServer Pages Standard Tag Library (JSPTL)
      10. Summary
      11. Q&A
      12. Exercise
  8. Integrating J2EE into the Enterprise
    1. Security
      1. Security Overview
      2. Common Security Technology
      3. Security in J2EE
      4. Security and EJBs
      5. Security in Web Applications and Components
      6. Security and JNDI
      7. Summary
      8. Q&A
      9. Exercises
    2. Integrating XML with J2EE
      1. The Drive to Platform-Independent Data Exchange
      2. Origins of XML
      3. Structure and Syntax of XML
      4. Creating Valid XML
      5. Parsing XML
      6. The JAXP Packages
      7. Parsing XML using SAX
      8. Document Object Model (DOM) Parser
      9. Modifying a DOM Tree
      10. Java Architecture for XML Binding
      11. Extending the Agency Case Study
      12. Summary
      13. Q&A
      14. Exercises
    3. Transforming XML Documents
      1. Presenting XML to Clients
      2. Extensible Stylesheet Transformations (XSLT)
      3. Using XALAN with J2EE
      4. Using XSLT in Java Applications
      5. XSLT Stylesheets
      6. Using Stylesheet Elements
      7. XSLT Compilers
      8. Summary
      9. Q&A
      10. Exercises
    4. Patterns
      1. J2EE Patterns
      2. Applying J2EE-Specific Patterns
      3. Patterns in Context
      4. Directions for J2EE Patterns
      5. Summary
      6. Q & A
      7. Exercises
    5. Integrating with External Resources
      1. Reviewing External Resources and Legacy Systems
      2. Introducing Connector Architecture
      3. Using the Common Client Interface
      4. Introducing Other Connectivity Technologies
      5. Introducing CORBA
      6. Introducing Java IDL
      7. Using RMI over IIOP
      8. Introducing JNI
      9. Evaluation of Integration Technologies
      10. Summary
      11. Q&A
      12. Exercises
    6. Using RPC-Style Web Services with J2EE
      1. Web Service Overview
      2. Web Services for J2EE
      3. Using an RPC-style SOAP-Based Web Service
      4. Implementing an RPC-Style SOAP-Based Web Service
      5. Parameter Types and Type Mapping
      6. Summary
      7. Q&A
      8. Exercises
    7. Web Service Registries and Message-Style Web Services
      1. Registries for Web Services
      2. Accessing Information in a UDDI Registry
      3. Using JAXR for Registry Access
      4. Using a Message-Based SOAP Interface
      5. Sending and Receiving SOAP Messages with JAXM
      6. Summary
      7. Q&A
      8. Exercises
    8. An Introduction to UML
      1. Introducing the UML
      2. Use Case Diagrams
      3. Class Diagrams
      4. Sequence Diagrams
    9. SQL Reference
      1. Commonly Used SQL Statements (SQL99)
      2. Commonly Used SQL Clauses
    10. An Overview of XML
      1. What Is XML?
      2. Enforcing XML Document Structure
      3. Where to Find More Information
    11. The Java Community Process
      1. Introducing the JCP
      2. Getting Involved
      3. Understanding the JSR Process
      4. Taking the Next Step
    12. Glossary
  9. Index

Product information

  • Title: Sams Teach Yourself J2EE™ in 21 Days
  • Author(s): Martin Bond, Dan Haywood, Debbie Law, Andy Longshaw, Peter Roxburgh
  • Release date: April 2002
  • Publisher(s): Sams
  • ISBN: 9780672323843