Intel and Intel Xeon are trademarks or registered trademarks of IntelCorporation. All SPARC trademarks are used under license and aretrademarks or registered trademarks of SPARC International, Inc. AMD,Opteron, the AMD logo, and the AMD Opteron logo are trademarks orregistered trademarks of Advanced Micro Devices. UNIX is a registeredtrademark of The Open Group.
This documentation is part of the Java Enterprise Edition contributionto the Eclipse Foundation and is not intended for use in relation toJava Enterprise Edition or Orace GlassFish. The documentation is in theprocess of being revised to reflect the new Jakarta EE branding.Additional changes will be made as requirements and procedures evolvefor Jakarta EE. Where applicable, references to Jakarta EE or JavaEnterprise Edition should be considered references to Jakarta EE.
Eclipse GlassFish 7 is developed through the GlassFish projectopen-source community at -ee4j/glassfish.The GlassFish project provides a structured process for developing theEclipse GlassFish platform that makes the new features of the Jakarta EEplatform available faster, while maintaining the most important featureof Jakarta EE: compatibility. It enables Java developers to access theEclipse GlassFish source code and to contribute to the development of theEclipse GlassFish.
The Eclipse GlassFish documentation set describes deployment planning andsystem installation. For an introduction to Eclipse GlassFish, refer tothe books in the order in which they are listed in the following table.
Your First Cup: An Introduction to the Jakarta EE Platform.For beginning Jakarta EE programmers, this short tutorial explains the entireprocess for developing a simple enterprise application.The sample application is a web application that consists of a component that isbased on the Enterprise JavaBeans specification, a JAX-RS web service,and a JavaServer Faces component for the web front end.
The Jakarta EE Samples project is a collection of sample applications thatdemonstrate a broad range of Jakarta EE technologies. The Jakarta EE Samplesare bundled with the Jakarta EE Software Development Kit (SDK) and are alsoavailable from the repository( -ee4j/glassfish-samples).
Eclipse GlassFish 7 provides an environment fordeveloping and deploying Java applications and web services. Eclipse GlassFish applications include Java Platform, Enterprise Edition (Jakarta EEplatform) standard features as well as features specific to Eclipse GlassFish. This guide explains the tools and processes used for deployingapplications and modules in the Eclipse GlassFish environment. OnlyEclipse GlassFish features are described in detail in this document.
Information and instructions on deploying from the command line areprovided in this document. Information and instructions foraccomplishing the deployment tasks by using the Administration Consoleare contained in the Administration Console online help.
Assembly, also known as packaging, is the process of combining discretecomponents of an application or module into a single unit that can beinstalled on an application server. The Eclipse GlassFish assemblyprocess conforms to the customary Jakarta EE specifications. The onlydifference is that when you assemble applications or modules inEclipse GlassFish, you can include optional Eclipse GlassFish deploymentdescriptors that enhance functionality.
Deployment is the process of installing an application or module onEclipse GlassFish, optionally specifying location-specific information,such as a list of local users that can access the application, or thename of the local database. Eclipse GlassFish deployment tools expand thearchive file into an open directory structure that is ready for users.Eclipse GlassFish deployment tools are described in AboutDeployment Tools.
Dynamic Reloading. Redeploys the application by creating or modifyinga special .reload file in the applications repository. Forinstructions, see To ReloadChanges to Applications or Modules Dynamically.
A deployment plan, which deploys a portable archive along with adeployment plan containing Eclipse GlassFish deployment descriptors, canapply to any of these deployment techniques. For instructions, seeTo Deploy an Application or Moduleby Using a Deployment Plan.
Some deployment methods that are used effectively in a developmentenvironment should not be used in production. In addition, whenever areload is done, the sessions that are in transit become invalid, whichmight not be a concern for development, but can be a serious matter inproduction. The client must restart the session, another negative in aproduction environment.
For production environments, any upgrade should be performed as arolling upgrade, which upgrades applications and modules withoutinterruption in service. For more information, seeUpgrading Applications Without Loss of Availability inEclipse GlassFish High Availability AdministrationGuide.
A deployment descriptor is an XML file that describes how a Jakarta EEapplication or module should be deployed. Each deployment descriptor XMLfile has a corresponding Document Type Definition (DTD) file or schema(XSD) file, which defines the elements, data, and attributes that thedeployment descriptor file can contain. The deployment descriptordirects a deployment tool to deploy a module or application withspecific container options, and also describes specific configurationrequirements that you must resolve.
Because the information in a deployment descriptor is declarative, itcan be changed without requiring modifications to source code. Duringdeployment, Eclipse GlassFish reads the information in the deploymentdescriptor and deploys the application or module as directed.
Jakarta EE Standard Descriptors.Jakarta EE standard deployment descriptors are describedin the Jakarta EE specification. You can find thespecification at about the XML schemas that define Jakarta EE standarddeployment descriptors is available at
The Jakarta EE specification permits the use of alternate top-levelstandard deployment descriptors that reside outside of the applicationarchive using the alt-dd mechanism (alternate module-level deploymentdescriptors were permitted prior to Jakarta EE 7). Alternate deploymentdescriptors are described in the Jakarta EE specification. You can findthe specification at Alternatedeployment descriptors override the top-level deployment descriptorspackaged in an application archive. For example, for EAR files, analternate deployment descriptor overrides application.xml. Forstandalone modules, an alternate deployment descriptor overrides thetop-level module descriptor, such as web.xml.
Eclipse GlassFish Descriptors. Eclipse GlassFish provides optionaldeployment descriptors for configuring features that are specific toEclipse GlassFish. For example, when you assemble an EJB module, youannotate or create two Eclipse GlassFish deployment descriptor files withthese names: ejb-jar.xml and glassfish-ejb-jar.xml. If the EJBcomponent is an entity bean with container-managed persistence (CMP),you can also create a .dbschema file and a sun-cmp-mapping.xml file.For complete descriptions of these files and their elements, seeEclipse GlassFish Deployment Descriptor Filesand Elements of the Eclipse GlassFishDeployment Descriptors.
Eclipse GlassFish also permits the use of alternate top-level Eclipse GlassFish runtime deployment descriptors that reside outside of anapplication archive. Alternate Eclipse GlassFish deployment descriptorsoverride the top-level deployment descriptors packaged in the archive.For example, for EAR files, an alternate Eclipse GlassFish deploymentdescriptor overrides glassfish-application.xml. For standalonemodules, an alternate Eclipse GlassFish deployment descriptor overridesthe top-level module descriptor, such as glassfish-web.xml. The nameof the Eclipse GlassFish alternate deployment descriptor file must beginwith glassfish-. Alternate deployment descriptors do not apply tosun-*.xml deployment descriptors.
An annotation, also called metadata, enables a declarative style ofprogramming. You can specify information within a class file by usingannotations. When the application or module is deployed, the informationcan either be used or overridden by the deployment descriptor. Eclipse GlassFish supports annotation according to the following specifications:
Jakarta EE applications or modules can be packaged with full Jakarta EEcompliant standard and runtime deployment descriptors. If the standarddeployment descriptors have specified the metadata-complete attribute,annotations in the application or module are ignored.
Jakarta EE applications or modules can be fully annotated with metadatadefined by the listed specifications. Annotation eliminates the need forJakarta EE standard deployment descriptors. In most cases, the Eclipse GlassFish deployment descriptors are also not needed.
Jakarta EE applications or modules can be partially annotated with somedeployment information in standard deployment descriptors. In case ofconflicts, deployment descriptor values supersede the annotatedmetadata, and a warning message is logged.
An application is a logical collection of one or more modules joined byapplication annotations or deployment descriptors. You assemblecomponents into JAR, WAR, or RAR files, then combine these files and,optionally, deployment descriptors into an Enterprise archive (EAR) filewhich is deployed.
A module is a collection of one or more Jakarta EE components that run inthe same container type, such as a web container or EJB container. Themodule uses annotations or deployment descriptors of that containertype. You can deploy a module alone or as part of an application.
Web Module. A web module, also known as a web application, is acollection of servlets, EJBs, HTML pages, classes, and other resourcesthat you can bundle and deploy to several Jakarta EE application servers. Aweb application archive (WAR) file is the standard format for assemblingweb applications. A WAR file can consist of the following items:servlets, JavaServer Pages (JSP) files, JSP tag libraries, utilityclasses, static pages, client-side applets, beans, bean classes,enterprise bean classes, plus annotations or web deployment descriptors(web.xml and glassfish-web.xml).
b1e95dc632