The Java EE 6 Tutorial: Advanced Topics, Fourth Edition

Book description

The Java EE 6 Tutorial: Advanced Topics, Fourth Edition, is a task-oriented, example-driven guide to developing enterprise applications for the Java Platform, Enterprise Edition 6 (Java EE 6). Written by members of the Java EE 6 documentation team at Oracle, this book provides new and intermediate Java programmers with a deep understanding of the platform.

This guide–which builds on the concepts introduced in The Java EE 6 Tutorial: Basic Concepts, Fourth Edition–contains advanced material, including detailed introductions to more complex platform features and instructions for using the latest version of the NetBeans IDE and the GlassFish Server, Open Source Edition.

This book introduces the Java Message Service (JMS) API and Java EE Interceptors. It also describes advanced features of JavaServer Faces, Servlets, JAX-RS, Enterprise¿ JavaBeans components, the Java Persistence API, Contexts and Dependency Injection for the Java EE Platform, web and enterprise application security, and Bean Validation. The book culminates with three new case studies that illustrate the use of multiple Java EE 6 APIs.

Table of contents

  1. Title Page
  2. Copyright Page
  3. Contents
  4. Preface
    1. Before You Read This Book
    2. Related Documentation
    3. Typographic Conventions
    4. Default Paths and File Names
    5. Third-Party Web Site References
    6. Acknowledgments
  5. Part I: Introduction
    1. Chapter 1. Overview
      1. Java EE 6 Platform Highlights
      2. Java EE Application Model
      3. Distributed Multitiered Applications
      4. Java EE Containers
      5. Web Services Support
      6. Java EE Application Assembly and Deployment
      7. Packaging Applications
      8. Development Roles
      9. Java EE 6 APIs
      10. Java EE 6 APIs in the Java Platform, Standard Edition 6 and 7
      11. GlassFish Server Tools
    2. Chapter 2. Using the Tutorial Examples
      1. Required Software
      2. Starting and Stopping the GlassFish Server
      3. Starting the Administration Console
      4. Starting and Stopping the Java DB Server
      5. Building the Examples
      6. Tutorial Example Directory Structure
      7. Getting the Latest Updates to the Tutorial
      8. Debugging Java EE Applications
  6. Part II: The Web Tier
    1. Chapter 3. JavaServer Faces Technology: Advanced Concepts
      1. The Lifecycle of a JavaServer Faces Application
      2. Partial Processing and Partial Rendering
      3. The Lifecycle of a Facelets Application
      4. User Interface Component Model
    2. Chapter 4. Using Ajax with JavaServer Faces Technology
      1. Overview of Ajax
      2. Using Ajax Functionality with JavaServer Faces Technology
      3. Using Ajax with Facelets
      4. Sending an Ajax Request
      5. Monitoring Events on the Client
      6. Handling Errors
      7. Receiving an Ajax Response
      8. Ajax Request Lifecycle
      9. Grouping of Components
      10. Loading JavaScript as a Resource
      11. The ajaxguessnumber Example Application
      12. Further Information about Ajax in JavaServer Faces Technology
    3. Chapter 5. Composite Components: Advanced Topics and Example
      1. Attributes of a Composite Component
      2. Invoking a Managed Bean
      3. Validating Composite Component Values
      4. The compositecomponentlogin Example Application
    4. Chapter 6. Creating Custom UI Components and Other Custom Objects
      1. Determining Whether You Need a Custom Component or Renderer
      2. Understanding the Image Map Example
      3. Steps for Creating a Custom Component
      4. Creating Custom Component Classes
      5. Delegating Rendering to a Renderer
      6. Implementing an Event Listener
      7. Handling Events for Custom Components
      8. Defining the Custom Component Tag in a Tag Library Descriptor
      9. Using a Custom Component
      10. Creating and Using a Custom Converter
      11. Creating and Using a Custom Validator
      12. Binding Component Values and Instances to Managed Bean Properties
      13. Binding Converters, Listeners, and Validators to Managed Bean Properties
    5. Chapter 7. Configuring JavaServer Faces Applications
      1. Using Annotations to Configure Managed Beans
      2. Application Configuration Resource File
      3. Configuring Managed Beans
      4. Registering Application Messages
      5. Using Default Validators
      6. Registering a Custom Validator
      7. Registering a Custom Converter
      8. Configuring Navigation Rules
      9. Registering a Custom Renderer with a Render Kit
      10. Registering a Custom Component
      11. Basic Requirements of a JavaServer Faces Application
    6. Chapter 8. Uploading Files with Java Servlet Technology
      1. The @MultipartConfig Annotation
      2. The getParts and getPart Methods
      3. The fileupload Example Application
    7. Chapter 9. Internationalizing and Localizing Web Applications
      1. Java Platform Localization Classes
      2. Providing Localized Messages and Labels
      3. Date and Number Formatting
      4. Character Sets and Encodings
  7. Part III: Web Services
    1. Chapter 10. JAX-RS: Advanced Topics and Example
      1. Annotations for Field and Bean Properties of Resource Classes
      2. Subresources and Runtime Resource Resolution
      3. Integrating JAX-RS with EJB Technology and CDI
      4. Conditional HTTP Requests
      5. Runtime Content Negotiation
      6. Using JAX-RS With JAXB
      7. The customer Example Application
  8. Part IV: Enterprise Beans
    1. Chapter 11. A Message-Driven Bean Example
      1. Overview of the simplemessage Example
      2. The simplemessage Application Client
      3. The Message-Driven Bean Class
      4. Running the simplemessage Example
    2. Chapter 12. Using the Embedded Enterprise Bean Container
      1. Overview of the Embedded Enterprise Bean Container
      2. Developing Embeddable Enterprise Bean Applications
      3. The standalone Example Application
    3. Chapter 13. Using Asynchronous Method Invocation in Session Beans
      1. Asynchronous Method Invocation
      2. The async Example Application
  9. Part V: Contexts and Dependency Injection for the Java EE Platform
    1. Chapter 14. Contexts and Dependency Injection for the Java EE Platform: Advanced Topics
      1. Using Alternatives in CDI Applications
      2. Using Producer Methods, Producer Fields, and Disposer Methods in CDI Applications
      3. Using Predefined Beans in CDI Applications
      4. Using Events in CDI Applications
      5. Using Interceptors in CDI Applications
      6. Using Decorators in CDI Applications
      7. Using Stereotypes in CDI Applications
    2. Chapter 15. Running the Advanced Contexts and Dependency Injection Examples
      1. The encoder Example: Using Alternatives
      2. The producermethods Example: Using a Producer Method To Choose a Bean Implementation
      3. The producerfields Example: Using Producer Fields to Generate Resources
      4. The billpayment Example: Using Events and Interceptors
      5. The decorators Example: Decorating a Bean
  10. Part VI: Persistence
    1. Chapter 16. Creating and Using String-Based Criteria Queries
      1. Overview of String-Based Criteria API Queries
      2. Creating String-Based Queries
      3. Executing String-Based Queries
    2. Chapter 17. Controlling Concurrent Access to Entity Data with Locking
      1. Overview of Entity Locking and Concurrency
      2. Lock Modes
    3. Chapter 18. Using a Second-Level Cache with Java Persistence API Applications
      1. Overview of the Second-Level Cache
      2. Specifying the Cache Mode Settings to Improve Performance
  11. Part VII: Security
    1. Chapter 19. Java EE Security: Advanced Topics
      1. Working with Digital Certificates
      2. Authentication Mechanisms
      3. Using Form-Based Login in JavaServer Faces Web Applications
      4. Using the JDBC Realm for User Authentication
      5. Securing HTTP Resources
      6. Securing Application Clients
      7. Securing Enterprise Information Systems Applications
      8. Configuring Security Using Deployment Descriptors
      9. Further Information about Security
  12. Part VIII: Java EE Supporting Technologies
    1. Chapter 20. Java Message Service Concepts
      1. Overview of the JMS API
      2. Basic JMS API Concepts
      3. The JMS API Programming Model
      4. Creating Robust JMS Applications
      5. Using the JMS API in Java EE Applications
      6. Further Information about JMS
    2. Chapter 21. Java Message Service Examples
      1. Writing Simple JMS Applications
      2. Writing Robust JMS Applications
      3. An Application That Uses the JMS API with a Session Bean
      4. An Application That Uses the JMS API with an Entity
      5. An Application Example That Consumes Messages from a Remote Server
      6. An Application Example That Deploys a Message-Driven Bean on Two Servers
    3. Chapter 22. Bean Validation: Advanced Topics
      1. Creating Custom Constraints
      2. Customizing Validator Messages
      3. Grouping Constraints
    4. Chapter 23. Using Java EE Interceptors
      1. Overview of Interceptors
      2. Using Interceptors
      3. The interceptor Example Application
    5. Chapter 24. The Resource Adapter Example
      1. The Resource Adapter
      2. The Message-Driven Bean
      3. The Web Application
      4. Running the mailconnector Example
  13. Part IX: Case Studies
    1. Chapter 25. Duke’s Bookstore Case Study Example
      1. Design and Architecture of Duke’s Bookstore
      2. The Duke’s Bookstore Interface
      3. Running the Duke’s Bookstore Case Study Application
    2. Chapter 26. Duke’s Tutoring Case Study Example
      1. Design and Architecture of Duke’s Tutoring
      2. Main Interface
      3. Administration Interface
      4. Running the Duke’s Tutoring Case Study Application
    3. Chapter 27. Duke’s Forest Case Study Example
      1. Design and Architecture of Duke’s Forest
      2. Building and Deploying the Duke’s Forest Case Study Application
      3. Running the Duke’s Forest Application
  14. Index
  15. Ad Page

Product information

  • Title: The Java EE 6 Tutorial: Advanced Topics, Fourth Edition
  • Author(s): Eric Jendrock, Ricardo Cervera-Navarro, Ian Evans, Devika Gollapudi, Kim Haase, William Markito, Chinmayee Srivathsa
  • Release date: January 2013
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780137084005