Part I Development Tasks and Tools
1. Setting Up a Development Environment
Installing and Preparing the Server for Development
Part II Developing Applications and Application Components
6. Using the Java Persistence API
7. Developing Web Applications
8. Using Enterprise JavaBeans Technology
9. Using Container-Managed Persistence
12. Developing Lifecycle Listeners
13. Developing OSGi-enabled Java EE Applications
Part III Using Services and APIs
14. Using the JDBC API for Database Access
15. Using the Transaction Service
16. Using the Java Naming and Directory Interface
Sample applications that you can examine and deploy to the GlassFish Server are available. If you installed the GlassFish Server as part of installing the Java EE 6 SDK bundle from Java EE 6 Downloads, the samples may already be installed. You can download these samples separately from the Code Samples page if you installed the GlassFish Server without them initially.
Most GlassFish Server samples have the following directory structure:
The docs directory contains instructions for how to use the sample.
The src/java directory under each component contains source code for the sample.
The src/conf directory under each component contains the deployment descriptors.
With a few exceptions, sample applications follow the standard directory structure described here: http://java.sun.com/blueprints/code/projectconventions.html.
The samples-install-dir/bp-project/main.xml file defines properties common to all sample applications and implements targets needed to compile, assemble, deploy, and undeploy sample applications. In most sample applications, the build.xml file imports main.xml.
In addition to the Java EE 6 sample applications, samples are also available at GlassFish Samples and at as-install/glassfish/samples/.