Java EE 7 Essentials

Book description

Get up to speed on the principal technologies in the Java Platform, Enterprise Edition 7, and learn how the latest version embraces HTML5, focuses on higher productivity, and provides functionality to meet enterprise demands. Written by Arun Gupta, a key member of the Java EE team, this book provides a chapter-by-chapter survey of several Java EE 7 specifications, including WebSockets, Batch Processing, RESTful Web Services, and Java Message Service.

You’ll also get self-paced instructions for building an end-to-end application with many of the technologies described in the book, which will help you understand the design patterns vital to Java EE development.

  • Understand the key components of the Java EE platform, with easy-to-understand explanations and extensive code samples
  • Examine all the new components that have been added to Java EE 7 platform, such as WebSockets, JSON, Batch, and Concurrency
  • Learn about RESTful Web Services, SOAP XML-based messaging protocol, and Java Message Service
  • Explore Enterprise JavaBeans, Contexts and Dependency Injection, and the Java Persistence API
  • Discover how different components were updated from Java EE 6 to Java EE 7

Publisher resources

View/Submit Errata

Table of contents

  1. Java EE 7 Essentials
  2. Dedication
  3. Foreword
  4. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. Safari® Books Online
    4. How to Contact Us
    5. Acknowledgments
  5. 1. Java Platform, Enterprise Edition
    1. Introduction
    2. Deliverables
    3. What’s New in Java EE 7
  6. 2. Servlets
    1. WebServlet
    2. Servlet Filters
    3. Event Listeners
    4. Asynchronous Support
    5. Nonblocking I/O
    6. Web Fragments
    7. Security
    8. Resource Packaging
    9. Error Mapping
    10. Handling Multipart Requests
    11. Upgrade Processing
  7. 3. JavaServer Faces
    1. Facelets
    2. Resource Handling
    3. Composite Components
    4. Request Processing Life-Cycle Phases
    5. Ajax
    6. HTTP GET
    7. Server and Client Extension Points
    8. Validating Data
    9. Navigation Rules
    10. Faces Flow
    11. Resource Library Contracts
    12. Passthrough Attributes and HTML5-Friendly Markup
    13. Component Tags
  8. 4. RESTful Web Services
    1. Resources
    2. Binding HTTP Methods
    3. Multiple Resource Representations
    4. Binding a Request to a Resource
    5. Entity Providers
    6. Client API
    7. Mapping Exceptions
    8. Filters and Entity Interceptors
    9. Validation of Resources
  9. 5. SOAP-Based Web Services
    1. Web Service Endpoints
    2. Provider-Based Dynamic Endpoints
    3. Endpoint-Based Endpoints
    4. Web Service Client
    5. Dispatch-Based Dynamic Client
    6. Handlers
  10. 6. JSON Processing
    1. Streaming API
      1. Consuming JSON Using the Streaming API
      2. Producing JSON Using the Streaming API
    2. Object Model API
      1. Consuming JSON Using the Object Model API
      2. Producing JSON Using the Object Model API
  11. 7. WebSocket
    1. Annotated Server Endpoint
    2. Programmatic Server Endpoint
    3. Annotated Client Endpoint
    4. Programmatic Client Endpoint
    5. JavaScript WebSocket Client
    6. Encoders and Decoders
    7. Integration with Java EE Security
  12. 8. Enterprise JavaBeans
    1. Stateful Session Beans
    2. Stateless Session Beans
    3. Singleton Session Beans
    4. Life-Cycle Event Callbacks
    5. Message-Driven Beans
    6. Portable Global JNDI Names
    7. Transactions
    8. Asynchronous Invocation
    9. Timers
    10. Embeddable API
    11. EJB Lite
  13. 9. Contexts and Dependency Injection
    1. Discovery of Beans
    2. Injection Points
    3. Qualifier and Alternative
    4. Producer and Disposer
    5. Interceptors
    6. Decorators
    7. Scopes and Contexts
    8. Stereotypes
    9. Events
    10. Portable Extensions
    11. Built-in Beans
    12. Life-Cycle Callbacks
  14. 10. Concurrency Utilities
    1. Asynchronous Tasks
    2. Schedule Tasks
    3. Managed Threads
    4. Dynamic Contextual Objects
  15. 11. Bean Validation
    1. Built-in Constraints
    2. Defining a Custom Constraint
    3. Validation Groups
    4. Method and Constructor Constraint
  16. 12. Java Transaction
    1. User-Managed Transactions
    2. Container-Managed Transactions
    3. @TransactionScoped
  17. 13. Java Persistence
    1. Entities
    2. Persistence Unit, Persistence Context, and Entity Manager
    3. Schema Generation
    4. Create, Read, Update, and Delete Entities
    5. Entity Listeners
    6. Stored Procedures
    7. Validating the Entities
    8. Transactions and Locking
    9. Caching
  18. 14. Java Message Service
    1. Sending a Message
    2. Receiving a Message Synchronously
    3. Receiving a Message Asynchronously
    4. Quality of Service
    5. Temporary Destinations
  19. 15. Batch Processing
    1. Chunk-Oriented Processing
      1. Custom Checkpointing
      2. Exception Handling
    2. Batchlet Processing
    3. Listeners
    4. Job Sequence
      1. Flow
      2. Split
      3. Decision
    5. Partitioning the Job
  20. 16. Build an End-to-End Application
    1. Introduction
      1. Software Requirements
    2. Problem Statement
      1. Lab Flow
    3. Walkthrough of a Sample Application
    4. Show Booking (JavaServer Faces)
    5. Chat Room (Java API for WebSocket)
    6. View and Delete Movies (Java API for RESTful Web Services)
    7. Add Movie (Java API for JSON Processing)
    8. Ticket Sales (Batch Applications for the Java Platform)
    9. Movie Points (Java Message Service 2)
    10. Conclusion
    11. Troubleshooting
    12. Completed Solution
  21. A. Further Reading
    1. Web Technology Specifications
    2. Enterprise Technology Specifications
    3. Web Service Technologies
    4. Management and Security Technologies
  22. Index
  23. About the Author
  24. Colophon
  25. Copyright

Product information

  • Title: Java EE 7 Essentials
  • Author(s): Arun Gupta
  • Release date: August 2013
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449370602