Java EE 6 Tutorial, Volume I Documentation Plan

The Java EE6 Tutorial, Volume I will consist of nine parts:

  • Part I, Introduction
  • Part II, Web Tier
  • Part III, Web Services
  • Part IV, Enterprise Beans
  • Part V, Contexts and Dependency Injection for the Java EE Platform
  • Part VI, Persistence
  • Part VII, Security
  • Part VIII, Java EE Supporting Technologies
  • Part IX, Case Study

See also the plan for Volume II.

The NetBeans Requirements page lists Java EE 6 features that we would like to see NetBeans IDE support for the Java EE 6 Tutorial and First Cup.

Content Outline

Part I, Introduction

  • Overview (Eric) - Describe profile-based architecture and new platform features
  • Using the Tutorial Examples (Eric) - Describe software requirements, setup, and configuration required to run the tutorial examples, including GlassFish, Ant, NetBeans IDE, and database (Java SE-provided and MySQL 5.1)

Part II, Web Tier

  • Intro to Web Tier (Eric) - Defines a web application, explains web tier infrastructure, introduces components that make up a web application, and provides information basic to all web applications, including creating, building, deploying, and testing from Ant script and command line. Shows how to create a basic web application using NetBeans IDE (possible link to NB docs).
  • Servlet 3.0 and Comet (Eric) - Update and describe new features including Web framework pluggability, ease of development (EOD) (by means of annotations, no configuration web apps, and generics), support for asynchronous communications and Comet, security (ability to log in/log out, self registration), better alignment with RESTful web services and JSF 2.0, etc.
  • JavaServer Faces 2.0 (Devika) - Update and describe new features including Ease of development features such as Zero configuration and Component Aggregation, Ajax awareness, Bookmarkable JSF pages, adoption features such as accessibility via RESTful web services
  • Facelets (Devika & Jennifer) - Overview of Facelets technology, creating Facelets applications, example Facelets code''
  • JavaServer Pages (Eric) - Rename and refresh basic bookstore examples; move more advanced examples to Volume II; update expression language (EL), as needed
  • JSTL (Eric) - Update as needed

Part III, Web Services

  • Intro to Web Services (Debbie) - Defines what web services are, introduces the technologies, and when you'd use each. Link to NetBeans tutorials that describe creating web services.
  • JAX-WS (Ian) - Creating SOAP/WSDL web services using JAX-WS
  • JAX-RS (Debbie) - Creating RESTful web services using JAX-RS and its reference implementation, Jersey. Link to NetBeans tutorials for creating from scratch.

Part IV, Enterprise Beans (Ian)

  • Enterprise Beans - Overview of different types of EJBs and their uses. Major sections:
    • What Is an Enterprise Bean?
    • What Is a Session Bean?
    • What Is a Message Driven Bean?
    • Accessing Enterprise Beans from Clients
    • Packaging Enterprise Beans
    • Naming Conventions for Enterprise Beans
    • The Lifecycles of Enterprise Beans
    • Handling Exceptions
  • Getting Started with Enterprise Beans - Steps to create and deploy a simple local, no-interface stateless session bean. Major sections:
    • Creating the Enterprise Bean
    • Creating the converter Web Client
    • Deploying and Running converter
    • Modifying the Application
  • Running the Enterprise Bean Examples - Explanation of and steps to deploy and run stateful session beans, singleton beans, enterprise beans that use timers (manual and automatic), and remote enterprise beans. Major sections:
    • The cart Stateful Session Bean Example
    • A Singleton Session Bean Example
    • Using the Timer Service

Part V, Contexts and Dependency Injection for the Java EE Platform (Kim)

  • Introduction to Contexts and Dependency Injection for the Java EE Platform - Description of new technology for state management and dependency injection for Java EE components
  • Running the Basic Contexts and Dependency Injection Example - Tasks for running basic Contexts and Dependency Injection example

Part VI, Persistence (Ian)

  • Introduction to Persistence - Combination of the introductory persistence chapter and the chapter on persistence in the web tier
    • Writing Type-Safe Queries with the Criteria API - new section on the JPA 2.0 Criteria API, with examples.
    • Updated section on collections, including Map collections
    • Updated section on mixed-use of field/property access, including @Access annotation
    • New section on orphan removal
  • Running the Persistence Examples - Add persistence examples and describe how to run them
  • The Java Persistence API Query Language - Update this chapter as needed

Part VII, Security (Debbie)

(Outline for Vol 2 (advanced topics) can be viewed here.)

  • Introduction to Java EE Security - Basic introduction to basic security for web applications and enterprise applications. Introduces security concepts.
  • Introduction to Annotations Used in Security - List and briefly describe and give an example for each of the annotations to be discussed in future chapters
  • Securing Web Apps and Web Svcs - Description of using security annotations with web applications and deployment descriptors only when the same functionality cannot be accomplished with annotations.
  • Securing Java EE Apps - Description of the annotations and the deployment descriptors (only when same functionality cannot be accomplished using annotations) used to secure enterprise apps. D
  • Running the Basic Security Examples - Demonstrate adding basic security to some of the other examples provided in the book. Hope to demonstrate securing each of the technologies introduced in the book, but may group some similar technologies into one example.

Part VIII, Java EE Supporting Technologies

  • Introduction to Java EE Supporting Technologies (Ian or Chinmayee) - Brief introductions to transactions, resources, connectors, and JMS.
  • Transactions in Web Components (Ian) - Overview of JTA and examples, including information on user-managed transaction demarkation.
  • Resource Connections (Chinmayee) - Explanation of resources, JNDI naming, etc.

Part IX, Case Study

  • Duke's Conference Application (deferred until FCS) - Describe multi-technology web example and provide steps for running it

Building the IPS Package

Follow these steps to create the Java EE 6 Tutorial IPS package.

Convert the Book to HTML and PDF

  1. Use the Solbook tools to convert the tutorial sources to HTML and PDF.
  2. Copy the HTML and PDF to the javaeetutorial/doc directory of the javaeetutorial Subversion repository.
  3. Commit the changes to javaeetutorial/doc.

Modify the IPS Package Configuration Files

  1. In your updated javaeetutorial Subversion workspace, open javaeetutorial/bundle/build.properties in a text editor.
  2. Increment the pkg.version.release property. For example: pkg.version.release=5
  3. Set the pkg.version.build.major and pkg.version.build.minor properties to 1.
  4. Each time you rebuild the IPS package, increment pkg.version.build.minor.
  5. Ensure the pkg.description property is accurate for this release, then save build.properties.
  6. Ensure javaeetutorial/bundle/license.txt has the correct license and copyright year.

Create the Package in the Test Repository

  1. In a terminal navigate to javaeetutorial/bundle.
  2. Create the package by entering the following command:
ant package

Test the Package

  1. Start the Update Center application.
  2. Click New Image.
  3. Enter Test under Image Name, set Image Directory to a new, empty directory on your system, then click Add under Software Sources.
  4. Enter Test under Publisher Name, http://eflat.sfbay:60000 under Repository URL, and click OK.
  5. Click OK to create the new Test image, and then expand Test under Application Images.
  6. Select Available Add-Ons, check Java EE 6 Tutorial in the Component list, and click Install.
  7. Click Accept when the license is displayed.
  8. Navigate to the Image Directory, then to glassfish/docs/javaee-tutorial. Check that the HTML, PDF, and examples are correct.
  9. Once you've checked the package is correct, let Snjezana in release engineering know that the javaee-tutorial package in the eflat.sfbay:60000 repository is ready to be moved to the external repository. Be sure to include the package version, visible in the Update Center in the Test image.