J2EE™ Tutorial, The

Book description

You're familiar with Java™ programming, but now it's time for you to take it to the next level and begin creating enterprise applications with the Java™ 2 Platform, Enterprise Edition (J2EE™). The J2EE™ Tutorial is the hands-on, example-driven guide that offers unparalleled technical guidance into developing and deploying applications on the J2EE platform.

Written by the uniquely qualified members of the Java Software team at Sun Microsystems, The J2EE™ Tutorial uses the same effective interactive approach as the successful Java™ Tutorial collection. Throughout this book's development, hundreds of suggestions and volumes of feedback from both users and architects were integrated to ensure great writing and truly useful guidance.

Inside you'll find a smart mix of example programs—including source code—that are used to illustrate key J2EE concepts. In addition, clear explanations will help you make easy work of the range of technologies collected into the J2EE platform, including:

  • Enterprise JavaBeans™

  • Java™ Servlets

  • JavaServer Pages™

  • Java™ Message Service (JMS)

  • Java Naming and Directory Interface™ (JNDI)

  • XML

  • J2EE™ Connector Architecture

  • JavaMail™

  • JDBC™

  • When you're ready to create your own great enterprise applications, turn to the unmatched guidance, understanding, and experience you'll find only in The J2EE™ Tutorial.

    The accompanying CD-ROM is filled with a wealth of valuable resources, including all three Java™ Tutorial books, the J2SE 1.3.1 and J2EE 1.3.1 software development kits, the Java BluePrints sample application and book, and Forte for Java Plugin for the J2EE SDK.



    0201791684B03012002

    Table of contents

    1. Copyright
    2. Foreword
    3. Preface
    4. About the Authors
    5. Overview
      1. Distributed Multitiered Applications
      2. J2EE Containers
      3. Packaging
      4. Development Roles
      5. Reference Implementation Software
    6. Getting Started
      1. Setting Up
      2. Creating the J2EE Application
      3. Creating the Enterprise Bean
      4. Creating the J2EE Application Client
      5. Creating the Web Client
      6. Specifying the JNDI Names
      7. Deploying the J2EE Application
      8. Running the J2EE Application Client
      9. Running the Web Client
      10. Modifying the J2EE Application
      11. Common Problems and Their Solutions
    7. Enterprise Beans
      1. What Is an Enterprise Bean?
      2. What Is a Session Bean?
      3. What Is an Entity Bean?
      4. What Is a Message-Driven Bean?
      5. Defining Client Access with Interfaces
      6. The Contents of an Enterprise Bean
      7. Naming Conventions for Enterprise Beans
      8. The Life Cycles of Enterprise Beans
    8. A Session Bean Example
      1. The CartEJB Example
      2. Other Enterprise Bean Features
    9. Bean-Managed Persistence Examples
      1. The SavingsAccountEJB Example
      2. deploytool Tips for Entity Beans with Bean-Managed Persistence
      3. Mapping Table Relationships for Bean-Managed Persistence
      4. Primary Keys for Bean-Managed Persistence
      5. Handling Exceptions
    10. Container-Managed Persistence Examples
      1. Overview of the RosterApp Application
      2. The PlayerEJB Code
      3. A Guided Tour of the RosterApp Settings
      4. Method Invocations in RosterApp
      5. Running the RosterApp Example
      6. deploytool Tips for Entity Beans with Container-Managed Persistence
      7. Primary Keys for Container-Managed Persistence
    11. A Message-Driven Bean Example
      1. Example Application Overview
      2. The J2EE Application Client
      3. The Message-Driven Bean Class
      4. Running the SimpleMessageEJB Example
      5. deploytool Tips for Message-Driven Beans
      6. deploytool Tips for JMS Clients
    12. Enterprise JavaBeans Query Language
      1. Terminology
      2. Simplified Syntax
      3. Example Queries
      4. Full Syntax
      5. EJB QL Restrictions
    13. Web Clients and Components
      1. Web Client Life Cycle
      2. Web Application Archives
      3. Configuring Web Clients
      4. Deploying Web Clients
      5. Running Web Clients
      6. Updating Web Clients
      7. Internationalizing Web Clients
    14. Java Servlet Technology
      1. What Is a Servlet?
      2. The Example Servlets
      3. Servlet Life Cycle
      4. Sharing Information
      5. Initializing a Servlet
      6. Writing Service Methods
      7. Filtering Requests and Responses
      8. Invoking Other Web Resources
      9. Accessing the Web Context
      10. Maintaining Client State
      11. Finalizing a Servlet
    15. JavaServer Pages Technology
      1. What Is a JSP Page?
      2. The Example JSP Pages
      3. The Life Cycle of a JSP Page
      4. Initializing and Finalizing a JSP Page
      5. Creating Static Content
      6. Creating Dynamic Content
      7. Including Content in a JSP Page
      8. Transferring Control to Another Web Component
      9. Including an Applet
      10. Extending the JSP Language
    16. JavaBeans Components in JSP Pages
      1. JavaBeans Component Design Conventions
      2. Why Use a JavaBeans Component?
      3. Creating and Using a JavaBeans Component
      4. Setting JavaBeans Component Properties
      5. Retrieving JavaBeans Component Properties
    17. Custom Tags in JSP Pages
      1. What Is a Custom Tag?
      2. The Example JSP Pages
      3. Using Tags
      4. Defining Tags
      5. Examples
      6. How Is a Tag Handler Invoked?
    18. Transactions
      1. What Is a Transaction?
      2. Container-Managed Transactions
      3. Bean-Managed Transactions
      4. Summary of Transaction Options for Enterprise Beans
      5. Transaction Timeouts
      6. Isolation Levels
      7. Updating Multiple Databases
      8. Transactions in Web Components
    19. Security
      1. Overview
      2. Security Roles
      3. Web-Tier Security
      4. EJB-Tier Security
      5. Application Client-Tier Security
      6. EIS-Tier Security
      7. Propagating Security Identity
      8. J2EE Users, Realms, and Groups
      9. Setting Up a Server Certificate
    20. Resource Connections
      1. JNDI Names and Resource References
      2. Database Connections for Enterprise Beans
      3. Mail Session Connections
      4. URL Connections
    21. J2EE Connector Architecture
      1. About Resource Adapters
      2. The Black Box Resource Adapters
      3. Resource Adapter Tutorial
      4. Common Client Interface
    22. The Duke’s Bank Application
      1. Enterprise Beans
      2. Application Client
      3. Web Client
      4. Internationalization
      5. Building, Packaging, Deploying, and Running the Application
    23. HTTP Overview
      1. HTTP Requests
      2. HTTP Responses
    24. J2EE SDK Tools
      1. J2EE Administration Tool
      2. Cleanup Tool
      3. Cloudscape Server
      4. Deployment Tool
      5. J2EE Server
      6. Key Tool
      7. Packager Tool
      8. Realm Tool
      9. runclient Script
      10. Verifier Tool
    25. Examples
    26. Glossary

    Product information

    • Title: J2EE™ Tutorial, The
    • Author(s): Stephanie Bodoff, Dale Green, Kim Haase, Eric Jendrock, Monica Pawlan, Beth Stearns
    • Release date: March 2002
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780201791686