You are previewing Java EE 7 First Look.
O'Reilly logo
Java EE 7 First Look

Book Description

Discover the new features of Java EE 7 and learn to put them together to build a large-scale application

  • Explore changes brought in by the Java EE 7 platform

  • Master the new specifications that have been added in Java EE to develop applications without any hassle

  • Quick guide on the new features introduced in Java EE7

In Detail

For several years, the development of robust, scalable, and secured applications was a headache for software companies. They had to use proprietary solutions with non-standard methods. With Java EE, many of these solutions have been standardized, simplified, adapted to the needs of the developer, and made freely available to the community. Thus, it is now possible to develop truly robust, secure, and scalable applications at a lower cost using tools such as: Eclipse, NetBeans, and GlassFish.

Java EE 7 First Look is a practical guide which, through the creation of an online pre-registration website, will introduce you to the novelties of Java EE 7 and give you ideas for utilizing them.

Giving you an insight on new features introduced in Java EE 7, this book begins with the objectives of Java EE 7 and then covers the new specifications added in Java EE 7. Next, you will move on to the improvements made in APIs and EJBs and how to work with them. You will also learn how to ensure that the quality of data is maintained that has been manipulated by your application and gives you the opportunity to put a small part of AOP (Aspect Oriented Programming) in action.

Finally, the book will give you some ideas to realize n-tier applications using the Java EE platform and will also provide some guidance for the integration of your Java EE application to heterogeneous systems with which your application will interact.

After reading Java EE 7 First Look, you'll have a good idea about the changes brought in by Java EE 7, as well as how to make the best use of these to build a large-scale application.

Table of Contents

  1. Java EE 7 First Look
    1. Table of Contents
    2. Java EE 7 First Look
    3. Credits
    4. About the Author
    5. About the Reviewers
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. What's New in Java EE 7
      1. A brief history of Java EE
      2. The main goals of Java EE 7
        1. Productivity
        2. HTML5 support
      3. Novelties of Java EE 7
      4. Summary
    9. 2. New Specifications
      1. Concurrency Utilities for Java EE 1.0
        1. Why concurrency?
          1. Benefits of concurrency
          2. Risks of concurrency
        2. Concurrency and Java EE
        3. Java EE Concurrency API
      2. Batch Applications for Java Platform 1.0
        1. What is batch processing?
        2. Why a dedicated API for batch processing?
        3. Understanding the Batch API
          1. JobRepository
          2. Job
          3. Step
          4. Chunk
          5. Batchlet
        4. The batch.xml configuration file
        5. JobOperator
      3. Java API for JSON Processing 1.0
        1. What is JSON?
          1. Object
          2. Array
            1. Value
          3. Why JSON?
          4. Java API for JSON processing
            1. The streaming API
            2. The object model API
      4. Java API for WebSocket 1.0
        1. What is WebSocket?
        2. Why WebSocket?
        3. The WebSocket API
          1. Server endpoint
          2. Client endpoint
      5. Summary
    10. 3. The Presentation Layer
      1. Servlet 3.1
        1. What is a Servlet?
          1. A login page with a Servlet
          2. Latest improvements of Servlet 3.1 in action
          3. Non blocking I/O API
          4. Protocol upgrade processing
      2. Expression Language 3.0
        1. What is Expression Language?
        2. The latest improvements of EL 3.0 in action
          1. API for standalone environments
          2. Lambda expressions
          3. Collection object support
            1. Collection object construction
            2. Collection operations
            3. String concatenation operator (+=)
            4. Assignment operator (=)
            5. Semi-colon operator (;)
            6. Static fields and methods
      3. JavaServer Faces 2.2
        1. What is JavaServer Faces?
        2. An identification page with JSF
        3. The latest improvements of JSF 2.2 in action
          1. HTML5-friendly markup
            1. Pass-through attributes
            2. Pass-through elements
          2. Resource Library Contracts
          3. Faces Flow
          4. Stateless views
      4. Summary
    11. 4. The Java Persistence API
      1. Java Persistence API 2.1
        1. JPA (Java Persistence API)
        2. JPA in action
        3. The latest improvements of JPA 2.1 in action
          1. Persistence context synchronization
          2. Entity
          3. New annotations
          4. Entity graphs
            1. Static or named entity graphs
            2. Dynamic entity graphs
          5. JPQL
            1. Support for stored procedures
            2. New reserved identifiers
            3. Support for creating named queries at runtime
          6. The Criteria API
            1. Support for bulk update/delete
            2. Support for new reserved identifiers
          7. DDL generation
      2. Java Transaction API 1.2
        1. The Java Transaction API
        2. JTA in action
        3. Innovations introduced by JTA 1.2
      3. Summary
    12. 5. The Business Layer
      1. Enterprise JavaBeans 3.2
        1. Pruning some features
        2. The latest improvements in EJB 3.2
          1. Session bean enhancement
          2. EJB Lite improvements
          3. Changes made to the TimerService API
          4. Harmonizing with JMS's novelties
          5. Other improvements
      2. Putting it all together
        1. Presenting the project
        2. Use Case Diagram (UCD)
        3. Class diagram
        4. Component diagram
      3. Summary
    13. 6. Communicating with External Systems
      1. JavaMail
        1. Sending e-mails in Java
          1. Sending an e-mail via the SMTP protocol
        2. The latest improvements in action
          1. The added annotations
          2. The added methods
          3. The changing of some access modifiers
      2. Java EE Connector Architecture (JCA)
        1. What is JCA?
        2. JCA in action
        3. Latest improvements
      3. Java Message Service (JMS)
        1. When to use JMS
        2. The latest improvements in action
          1. New features
            1. Sending messages asynchronously
            2. Delivery delay
            3. Handling of the JMSXDeliveryCount message property
            4. Simplification of the API
      4. Java API for RESTful Web Services
        1. When to use Web Services
        2. JAX-RS in action
        3. The latest improvements in action
          1. The Client API
          2. Asynchronous processing
          3. Filters and entity interceptors
            1. Filters
            2. Entity interceptors
      5. Summary
    14. 7. Annotations and CDI
      1. Common annotations for the Java platform
        1. The goal of this specification
        2. Building your own annotation
        3. Latest improvements in action
        4. The new annotation
      2. Contexts and Dependency Injection
        1. What is CDI ?
          1. Example 1 – instantiation of a POJO
          2. Example 2 – accessing an EJB from a JSF page
          3. Example 3 – setting a bean with a specific scope for simple operations
          4. Example 4 – use of objects usually created by a factory
        2. Latest improvements in action
          1. Avoiding CDI processing on a bean
          2. Accessing the non contexual instance of a bean
          3. Accessing the current CDI container
          4. Destroying CDI bean instances explicitly
      3. Summary
    15. 8. Validators and Interceptors
      1. Bean Validation
        1. Validating your data
        2. Building a custom constraint
        3. Creating a constraint annotation
        4. Implementing a validator
        5. Latest improvements in action
          1. Openness
          2. Support for dependency injection and CDI integration
          3. Support for method and constructor validation
          4. Support for group conversion
          5. Support message interpolation using expression language
      2. Interceptors
        1. Intercepting some processes
          1. Defining interceptors in the target class
          2. Defining interceptors in an interceptor class
        2. Latest improvements in action
          1. Intercept constructor invocation
          2. Associating an interceptor with a class using interceptor binding
            1. Creation of interceptor binding types
            2. Declaring interceptor binding
            3. Binding an interceptor by using interceptor binding type
          3. Defining the execution order of interceptors
      3. Summary
    16. 9. Security
      1. JASPIC 1.1
        1. Secure access to forms
          1. Implementing an authentication module
            1. Implementing the ServerAuthModule interface
            2. Installing and configuring the authentication module
            3. Binding the authentication module to a web application
            4. Creating a realm
            5. Security configuration
      2. The latest improvements in action
        1. Integrating the authenticate, login, and logout methods called
        2. Standardizing access to the application context identifier
        3. Support for forward and include mechanisms
      3. Summary
    17. Index