1. Overview of Oracle GlassFish Server 3.1 Application Deployment
Deploying Applications and Modules
To Deploy an Application or Module
To Change Targets for a Deployed Application or Module
To List Deployed Applications or Modules
To Redeploy an Application or Module
To Disable an Application or Module
To Enable an Application or Module
To Undeploy an Application or Module
To Reload Changes to Applications or Modules Dynamically
To Deploy an Application or Module Automatically
To Deploy an Application or Module by Using a Deployment Plan
To Deploy an Application or Module in a Directory Format
Modifying the Configuration of a Web Application or Module
To Set a Web Context Parameter
To Unset a Web Context Parameter
To List Web Context Parameters
To Set a Web Environment Entry
To Unset a Web Environment Entry
To List Web Environment Entries
EJB Module Deployment Guidelines
To Deploy and Configure a Stand-Alone Connector Module
Redeploying a Stand-Alone Connector Module
Deploying and Configuring an Embedded Resource Adapter
Assembling and Deploying an Application Client Module
To Assemble and Deploy an Application Client
To Prepare Another Machine for Running an Application Client
To Undeploy an Application Client
Lifecycle Module Deployment Guidelines
Web Service Deployment Guidelines
OSGi Bundle Deployment Guidelines
Transparent JDBC Connection Pool Reconfiguration
A. The asadmin Deployment Subcommands
B. GlassFish Server Deployment Descriptor Files
The following guidelines apply to deploying a web module in GlassFish Server:
Context Root. When you deploy a web module, if you do not specify a context root, the default is the name of the WAR file without the .war extension. The web module context root must be unique within the server instance.
The domain administration server (DAS) in GlassFish Server versions 2.1.1 and later supports the deployment of multiple web applications using the same web context root as long as those applications are deployed to different GlassFish Server stand-alone instances. Deploying multiple applications using the same context root within a single instance produces an error.
Data Source. If a web application accesses a DataSource that is not specified in a resource-ref in glassfish-web.xml, or there is no glassfish-web.xml file, the resource-ref-name defined in web.xml is used. A warning message is logged, recording the JNDI name that was used to look up the resource.
Virtual Servers. If you deploy a web application and do not specify any assigned virtual servers, the web application is assigned to all currently-defined virtual servers with the exception of the virtual server with ID __asadmin, which is reserved for administrative purposes. If you then create additional virtual servers and want to assign existing web applications to them, you must redeploy the web applications.
HTTP Sessions. If a web application is undeployed, all its HTTP sessions will be invalidated and removed, unless the application is being undeployed as part of a redeployment and the --keepstate deployment option was set to true. This option is not supported and ignored in a clustered environment. See Example 2-6.
For information about HTTP session persistence, see the Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide.
Load Balancing. See the Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide for information about load balancing.
JSP Precompilation. You can precompile JSP files during deployment by checking the appropriate box in the Administration Console, or by using the --precompilejsp option of the deploy subcommand.
You can keep the generated source for JSP files by adding the keepgenerated flag to the jsp-config element in glassfish-web.xml. For example:
<glassfish-web-app> ... <jsp-config> <property name=keepgenerated value=true /> </jsp-config> </glassfish-web-app>
If you include this property when you deploy the WAR file, the generated source is kept in domain-dir/generated/jsp/app-name/module-name for an application, or domain-dir/generated/jsp/module-name for an individually-deployed web module.
For more information about JSP precompilation, see jsp-config.
Web Context Parameters. You can set web context parameters after deployment. See the following sections:
Web Environment Entries. You can set web environment entries after deployment. See the following sections: