1. Overview of Sun GlassFish Enterprise Server v3 Application Deployment
Deploying Applications and Modules
To Deploy an 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 Standalone Connector Module
Redeploying a Standalone 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
A. The asadmin Deployment Subcommands
B. Enterprise Server Deployment Descriptor Files
The following guidelines apply to deploying a web module in Enterprise 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.
Data Source. If a web application accesses a DataSource that is not specified in a resource-ref in sun-web.xml, or there is no sun-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 keepSessions deployment property was set to true. See Example 2-7. During a server shutdown, all HTTP sessions of a web application will be persisted to the file specified by the session-manager property with name sessionFilenamein the web application's sun-web.xml deployment descriptor. To prevent HTTP sessions from being persisted during a server shutdown, specify the sessionFilename property with an empty value, as follows:
<sun-web-app> <session-config> <session-manager> <manager-properties> <property name="sessionFilename" value="" /> </manager-properties> </session-manager> </session-config> </sun-web-app>
The default location where HTTP sessions will be persisted during a server shutdown is given as domain-dir/generated/jsp/module-name/module-name_SESSIONS.ser
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. The Enterprise Server Ant tasks sun-appserv-deploy and sun-appserv-jspc also allow you to precompile JSP files. For more information, see Chapter 3, Using Ant with Enterprise Server, in Sun GlassFish Enterprise Server v3 Application Development Guide.
You can keep the generated source for JSP files by adding the keepgenerated flag to the jsp-config element in sun-web.xml. For example:
<sun-web-app> ... <jsp-config> <property name=keepgenerated value=true /> </jsp-config> </sun-web-app>
If you include this property when you deploy the WAR file, the generated source is kept in domain-dir/generated/jsp/module-name.
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: