- GlassFish 4.0 (Java EE 7 release) - Deployment One Pager
- 1. Introduction
- 1.1. Project/Component Working Name:
- 1.2. Name(s) and e-mail address of Document Author(s)/Supplier:
- 1.3. Date of This Document:
- 2. Project Summary
- 3. Problem Summary
- 4. Technical Description:
- 4.1. Details:
- 4.2. Bug/RFE Number(s):
- 4.3. In Scope:
- 4.4. Out of Scope:
- 4.5. Interfaces:
- 4.6. Doc Impact:
- 4.7. Admin/Config Impact:
- 4.8. HA Impact:
- 4.9. I18N/L10N Impact:
- 4.10. Packaging, Delivery & Upgrade:
- 4.11. Security Impact:
- 4.12. Compatibility Impact
- 4.13. Dependencies:
- 4.14. Testing Impact:
- 5. Reference Documents:
- 6. Schedule:
GlassFish 4.0 (Java EE 7 release) Deployment
Hong Zhang : email@example.com
Gerald Ingalls: GeraldIngalls@java.net
Some of the features described in this one pager are already covered in other one pagers. The main purpose of the document is to group all relevant contents for GlassFish 4.0 (Java EE 7 release) in one document and share with open source community.
- Java EE 7 Requirements
- Deployment Order
Late requirements from Java EE 7 spec could result in delay for the delivery of the functionality.
Address Java EE 7 spec requirements, most of the deployment requirements come from the Java EE 7 platform spec.
Specify a deployment order at application deployment time, and the applications will be loaded based on that order during server start up.
Make GlassFish 4.0 Java EE 7 compliant and provide ease of use developer features.
In most cases, the Java EE 7 specifications define the exact requirements and expected behavior and we will not duplicate here. One requirement that will be covered in this section is the external alternate deployment descriptor requirement.
The Java EE 7 platform specification specifies that user could specify an alternate deployment descriptor external to the application package:
Any Java EE product must be able to accept a Java EE application delivered as a .ear file or a stand-alone Java EE module delivered as a .jar, .war, or .rar file (as appropriate to its type), together with an optional alternate deployment descriptor external to the application or standalone Java EE module."
But the spec does not specify how the external deployment descriptor could be specified as it's specific to each server product. In GlassFish, an optional altdd option is added to the CLI deploy command to specify alternate deployment descriptor externally:
The specified alternate deployment descriptor will override the one packaged inside the application archive if exists.
In addition to support what is specified in the Java EE 7 platform spec, a product extension is also implemented to support the external alternate vendor specific deployment descriptor. An optional runtimealtdd option is added to the CLI deploy command to specify alternate vendor specific deployment descriptor externally:
The specified alternate vendor specific deployment descriptor will override the one packaged inside the application archive if exists.
This support is for GlassFish deployment descriptors (glassfish-.xml) only and not for the deprecated Sun deployment descriptors (sun-.xml), and the file name of the alternate GlassFish deployment descriptors needs to be prefixed with "glassfish-".
User could specify a deployment order number during initial deployment of the application, and that number will be used to determine the loading order of the application during server start up. This could be useful when user has applications which have inter-dependencies among them, and user wants to make sure the applications are loaded in certain order during server start up.
An optional deploymentorder option is added to the CLI deploy command for the user to specify the deployment order number. Application with a lower deployment order number will be loaded before the application with a higher deployment order number. The default value for the deployment order is 100.
In the following example, application foo is deployed with a deployment order 102, and application bar is deployed with a deployment order 110, application foo will be loaded before application bar during server (re)start up.
The deployment order number can be configured post deployment (though users usually would plan the deployment order of the applications before the initial deployments) through the asadmin set command:
This will cause the application foo to be loaded after the application bar in the next server (re)start up.
User could check for the current assigned number of the deployment order through the get command:
Support deployment order of user applications
Support deployment order of resources
- Interface: CLI deploy command
- Comment: add altdd and runtimealtdd options for supporting external deployment descriptor, add deploymentorder option for supporting deployment order
Update man pages for the new/modified CLI commands
Application Deployment Guide/Developer Guide for new features
Additional options altdd, runtimealtdd, deploymentorder to the deploy command.
GUI should provide equivalent functionality as CLI (allow user to input additional options).
Changes will be made to existing deployment modules.
No compatibility impact. The new options of the CLI commands are all optional.
Java EE 7 specifications
Unit tests/functional tests will be added to cover the new features
- Initially integrated: EEMS3
- Feature complete: EEMS4
- At production quality level: EEMS6
- Initially integrated: EEMS2
- Feature complete: EEMS3
- At production quality level: EEMS6