You are previewing J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software.
O'Reilly logo
J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software

Book Description

Technologies, architecture, and Java patterns for building robust multi-tier J2EE applications.

  • All you need to build robust, multi-tier J2EE applications

  • Presents in-depth coverage of J2EE technologies, architecture, and Java design patterns

  • Covers Web services, XML, security, messaging, networking, and much more

  • Complete case study covers the design, construction, and integration of every application tier

  • To build high-performance Web applications and services with J2EE, developers need deep mastery over J2EE's diverse technologies and effective architectural strategies for designing distributed multi-tier applications. In J2EE and Beyond, a leading J2EE developer delivers both. Art Taylor ranges far beyond JSPs, EJBs, and servlets, offering practical insight into many crucial J2EE APIs, and presenting powerful design patterns that illuminate the effective use of J2EE 1.3 and J2SE 1.4. Taylor's example-rich coverage encompasses all this, and more:

  • JAXM, JAXP, and other J2EE APIs for XML and Web services development

  • Java security APIs: JSSE for SSL support, JCE for cryptography, and JAAS for authentication and authorization

  • Effective strategies for utilizing RMI and Java networking

  • The latest enhancements to JDBC database connectivity

  • Making the most of logging and other J2SE 1.4 enhancements

  • Java messaging (JMS), directory services (JNDI), and much more

  • J2EE and Beyond also includes a complete case study demonstrating how every tier, each core J2EE technology, and related technologies such as XML all come together to create a J2EE application.

    Table of Contents

    1. Copyright
    2. Preface
    3. About Prentice Hall Professional Technical Reference
    4. J2EE and Beyond
      1. Introduction
      2. When It All Began
      3. Multitiered Development with J2EE
      4. Core J2EE Packages
      5. J2EE Components
      6. Presentation Tier Components
      7. Business Tier Components
      8. Summary
    5. J2EE Architecture and Design
      1. Introduction
      2. Architecture Defined
      3. Architecture and J2EE
      4. Goals of the Architectural Process
      5. The Architectural Process
      6. Summary
    6. Analysis, Design, and Development Techniques with J2EE
      1. Introduction
      2. The Architectural Process
      3. Project Communication and the Unified Modeling Language
      4. The Analytical Process, J2EE Style
      5. Use Case Analysis
      6. Managing Use Case Complexity
      7. Object Types
      8. Summary
    7. J2EE Case Studies
      1. Introduction
      2. The Discussion Group System
      3. The Movie Shopping System
      4. Summary
    8. The JDBC API: JDBC Basics
      1. Introduction
      2. Connecting to the Relational Database
      3. the JDBC Package
      4. The javax.sql Package
      5. Using JDBC
      6. Using the Connection Class
      7. JNDI and DataSources
      8. Summary
    9. JDBC: Connecting to the Database and Using the Data
      1. Introduction
      2. Retrieving and Manipulating Data: The Statement Class and JDBC Exceptions
      3. Summary
    10. JDBC: Preparing SQL Statements and Examining Results
      1. Introduction
      2. The PreparedStatement
      3. The ResultSet Class
      4. Data Type Mapping
      5. Summary
    11. Java Security
      1. Introduction
      2. Java Security and Protection Domains
      3. The Java Security Environment
      4. Java Security Classes
      5. Providing Security through Encryption
      6. The Java keystore
      7. Using the keytool Utility
      8. Summary
    12. The Java Authentication and Authorization API (JAAS)
      1. Introduction
      2. Package History and Design
      3. The JAAS Package
      4. Authentication with JAAS
      5. Code Example
      6. Application Execution
      7. Summary
    13. The Java Secure Sockets Extension: JSSE
      1. Introduction
      2. The JSSE API
      3. The SSL Protocol
      4. JSSE Installation
      5. The JSSE Package
      6. JSSE Code Sample
      7. The SSLServer Class
      8. The SSLServer Class Constructor
      9. The SSLClient Class
      10. The SSLClient Class Constructor
      11. The Client Superclass
      12. Summary
    14. Using Cryptography with Java
      1. Introduction
      2. Package Design
      3. JCE Example
      4. Summary
    15. Using a Naming Service with Java: The JNDI Package
      1. Introduction
      2. JNDI and Naming Services
      3. The Context
      4. Directory Servers
      5. LDAP Basics
      6. The JNDI API
      7. JNDI Coding Examples
      8. The DirectoryService Class: The getContext Method
      9. The Environment Class
      10. Summary
    16. Using Logging with J2EE
      1. Introduction
      2. The Benefits of Logging
      3. The log4j API
      4. A log4j Code Example
      5. The java.util.logging Package
      6. Java JDK Logging Code Sample
      7. The SingleLineFormatter Class
      8. Creating a Convenience Method to Implement Logging
      9. Summary
    17. Java and XML: Introduction to XML
      1. Introduction
      2. Uses of XML
      3. What It Is and What It Isn't
      4. XML: Applying Order to Data
      5. XML Standards
      6. Java XML Packages
      7. The XML Document
      8. Elements in an XML Document
      9. Describing the XML Document: The DTD
      10. Summary
    18. XML and Java: The JAXP Package
      1. Introduction
      2. Parsing and Transforming
      3. JAXP Overview
      4. XML Parsing and Transformations
      5. Retrieving the Value of a Specific Node using DOM
      6. Event-Driven Parsing: The SAX Parser
      7. Summary
    19. XML Transformation and Creating XML Documents
      1. Introduction
      2. Transforming XML Documents
      3. Programming XML Transformations
      4. Converting Objects to XML Format
      5. The JDBCXML Class
      6. Summary
    20. Java Networking API
      1. Introduction
      2. TCP/IP Networking
      3. TCP/IP Network Addresses
      4. Network Programming: The Network Socket
      5. Java Sockets
      6. Data Transmission and Object Serialization
      7. Socket Programming Example
      8. Summary
    21. Using Remote Method Invocation
      1. Introduction
      2. The Concept of Remote Objects
      3. The RMI Framework
      4. Building an RMI Application
      5. Using Java RMI
      6. RMI Classes and Interfaces
      7. The Hello World RMI Example
      8. Using the RMI Registry
      9. An RMI Order Status Server
      10. Summary
    22. Additional RMI Concepts
      1. Introduction
      2. Using RMI Callbacks
      3. Auto-starting RMI Servers with Activation
      4. Binding RMI Objects into a Directory Server
      5. RMI versus Other Remote Services Solutions
      6. Dynamic Class Loading with RMI
      7. Summary
    23. Using Messaging with Java: The JMS API
      1. Introduction
      2. The JMS API
      3. When Messaging Is a Good Choice
      4. Using JMS with a Message Queue
      5. Using Publish and Subscribe Messaging
      6. Summary
    24. The JavaMail API
      1. Introduction
      2. Electronic Mail
      3. Summary
    25. JAXM: Java Web Services
      1. Introduction
      2. Why We Need Web Services
      3. Web Services Defined
      4. The SOAP Messaging Standard
      5. Java and Web Services
      6. JAXM Packages
      7. Using JAXM: Sample Applications
      8. Summary
    26. Using a Remote Provider: SOAP-RP
      1. Introduction
      2. SOAP Remote Providers
      3. The provider.xml Configuration File
      4. JAXM Provider Examples
      5. The MoviesOrderService Class: The onMessage Method
      6. Sending a Message to a SOAP Messaging Provider
      7. Summary
    27. Enterprise JavaBeans: An Introduction
      1. Introduction
      2. The Java Middleware Architecture
      3. The EJB Container
      4. Server Clusters and Failover capabilities
      5. EJB Deployment
      6. EJB Runtime Operation (How EJBs Work)
      7. EJBs and Transactions
      8. Developing EJBs
      9. Summary
    28. EJBs: Deployment, Security, and Transactions
      1. Introduction
      2. EJB Roles
      3. The EJB Deployment Descriptor
      4. Security with EJBs
      5. Transactions with EJBs
      6. Bean-Managed Transactions
      7. Summary
    29. Programming with EJBs
      1. Introduction
      2. Types of Entity Beans
      3. Connecting EJBs to Presentation Tier Components
      4. The ServletExample2 Class Declaration
      5. Session Beans: The MoviesFacadeBean Class
      6. Accessing an Entity Bean
      7. The MoviesBean JavaBean
      8. Entity Beans: The MoviesEntityBean Class
      9. Message-Driven Beans
      10. EJB MDB Client
      11. The Deployment Descriptor
      12. Message Driven Beans: Security and Transactions
      13. Summary
    30. Using Java Servlets
      1. Introduction
      2. The Network: TCP/IP
      3. The Network: HTTP
      4. The HTML Standard
      5. The Web Application
      6. The Execution of Java Servlets
      7. Servlet Example
      8. The ServletExample1 Class: The web.xml File
      9. Summary
    31. Java Server Pages: The Basics
      1. Introduction
      2. Why JSP?
      3. Java Server Pages Development
      4. How JSP Works
      5. The Web Application and the Session
      6. The Concept of Scope
      7. JSP Implicit Objects
      8. Directives
      9. Summary
    32. JSP Examples
      1. Introduction
      2. Some JSP Examples
      3. Java Software Components: JavaBeans and EJBs
      4. Using JavaBeans with JSPs
      5. JavaBeans versus Custom Tag Libraries
      6. Using Custom Tags in JSP
      7. JavaBeans or Custom Tag Libraries: Tips on Usage
      8. Model1 and Model2 Web Application Architectures
      9. Summary
    33. Creating Graphical User Interfaces with Java
      1. Introduction
      2. The Java GUI
      3. The Abstract Windowing Toolkit (AWT)
      4. Java GUI Event Handling
      5. The Swing API
      6. The SwingGUIDemo Program
      7. The SwingGUIDemo Class
      8. Sample Application: The Table Browser Application
      9. Technical Approach
      10. The TableBrowser.java Application: the dataTableModel Inner Class
      11. Summary
    34. Using Swing Applications with RMI
      1. Introduction
      2. Using Applets
      3. The Business Logic
      4. Summary
    35. Java Design Patterns
      1. Introduction
      2. The Architectural Tiers
      3. Design Patterns
      4. Summary
    36. J2EE Applied: Creating a Framework-Based Shopping Cart Application
      1. Introduction
      2. Frameworks
      3. The Struts Framework
      4. The Movies Shopping Cart Application
      5. The Struts Package
      6. The web.xml File
      7. The Struts Configuration File
      8. Java Design Patterns
      9. Summary
    37. J2EE Applied: The Movie Store Application
      1. Introduction
      2. The Movie Store Application
      3. The LogonAction Class
      4. User Registration
      5. Displaying the Main Menu
      6. The Menu JSP Page
      7. Listing Movies
      8. The Movies Listing Servlet
      9. The XSL Template for the Movies Listing
      10. Adding to the Shopping Cart
      11. The Shopping Cart Bean
      12. The Checkout Process
      13. Sending Email
      14. Logging Out of the Movie Store
      15. The Constants
      16. Deploying and Running the Application
      17. Summary
    38. The Shopping Cart Application: Using EJBs and Blobs
      1. Introduction
      2. Refactoring the ShoppingCartBean
      3. The Session Bean Code
      4. The BlobView servlet
      5. The BlobWriter Class
      6. The Data Access Object: The GeneralDAO Class
      7. The GeneralAggregateVO Class
      8. Summary
    39. JSP in Development: A Discussion Group System
      1. Introduction
      2. Discussion Group System: Application Description
      3. The Message
      4. Application Flow for the Message System
      5. The Message System: Technical Description
      6. Message System Database Design
      7. Summary
    40. J2EE Applied: Coding the Discussion Group System
      1. Introduction
      2. The Organization of the Discussion Group System
      3. The Rest of the Story: JSP Pages and JavaBeans Code Explained
      4. Summary