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
Web Module Deployment Guidelines
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
You can modify the configuration of a web application or a module by modifying the deployment descriptors and then repackaging and redeploying the application.
The instructions in this section enable you to change the configuration of a deployed application without the need to modify the application's deployment descriptors and repackage and redeploy the application. If the application or module entry is unset, its value reverts to the value, if any, that is set in the application's deployment descriptor.
The following topics are addressed here:
Use the set-web-context-param subcommand in remote mode to change the configuration of a deployed application without the need to modify the application's deployment descriptors and repackage and redeploy the application. By using this subcommand, you are either adding a new parameter that did not appear in the original web module's descriptor, or overriding the descriptor's setting of the parameter.
If the --ignoreDescriptorItem option is set to true, then the server ignores any setting for that context parameter in the descriptor, which means you do not need to specify an overriding value on the set-web-context-param subcommand. The server behaves as if the descriptor had never contained a setting for that context parameter.
This subcommand sets a servlet context-initialization parameter of one of the following items:
A deployed web application
A web module in a deployed Java Platform, Enterprise Edition (Java EE) application
Before You Begin
The application must already be deployed. Otherwise, an error occurs.
Remote commands require a running server.
Information about the options for the subcommand is included in this help page.
Example 2-20 Setting a Servlet Context-Initialization Parameter for a Web Application
This example sets the servlet context-initialization parameter javax.faces.STATE_SAVING_METHOD of the web application basic-ezcomp to client.
asadmin> set-web-context-param --name=javax.faces.STATE_SAVING_METHOD --description="The location where the application?s state is preserved" --value=client basic-ezcomp Command set-web-context-param executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help set-web-context-param at the command line.
Use the unset-web-context-param subcommand in remote mode to unset an environment entry for a deployed web application or module that has been set by using the set-web-env-entry subcommand. There is no need to modify the application's deployment descriptors and repackage and redeploy the application.
This subcommand unsets an environment entry for one of the following items:
A deployed web application
A web module in a deployed Java Platform, Enterprise Edition (Java EE) application
When an entry is unset, its value reverts to the value, if any, that is set in the application's deployment descriptor. This subcommand cannot be used to change the value of an environment entry that is set in an application's deployment descriptor. Instead, use the set-web-context-param(1) subcommand for this purpose.
Before You Begin
The application must already be deployed, and the entry must have previously been set by using the set-web-env-entry subcommand. Otherwise, an error occurs.
Remote commands require a running server.
Information about the options for the subcommand is included in this help page.
Example 2-21 Unsetting a Servlet Context-Initialization Parameter for a Web Application
This example unsets the servlet context-initialization parameter javax.faces.STATE_SAVING_METHOD of the web application basic-ezcomp.
asadmin> unset-web-context-param --name=javax.faces.STATE_SAVING_METHOD basic-ezcomp Command unset-web-context-param executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help unset-web-context-param at the command line.
Use the list-web-context-param subcommand in remote mode to list the parameters that have previously been set by using the set-web-context-param(1) subcommand. The subcommand does not list parameters that are set only in the application's deployment descriptor. For each parameter, the following information is displayed:
The name of the parameter
The value to which the parameter is set
The value of the --ignoreDescriptorItem option of the set-web-context-param subcommand that was specified when the parameter was set
The description of the parameter or null if no description was specified when the parameter was set
Remote commands require a running server.
Example 2-22 Listing Servlet Context-Initialization Parameters for a Web Application
This example lists all servlet context-initialization parameters of the web application basic-ezcomp that have been set by using the set-web-context-param subcommand. Because no description was specified when the javax.faces.PROJECT_STAGE parameter was set, null is displayed instead of a description for this parameter.
asadmin> list-web-context-param basic-ezcomp javax.faces.STATE_SAVING_METHOD = client ignoreDescriptorItem=false //The location where the application?s state is preserved javax.faces.PROJECT_STAGE = null ignoreDescriptorItem=true //null Command list-web-context-param executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help list-web-context-param at the command line.
An application uses the values of environment entries to customize its behavior or presentation. Use the set-web-env-entry subcommand in remote mode to change the configuration of a deployed application without the need to modify the application's deployment descriptors and repackage and redeploy the application. By using this subcommand, you are either adding a new parameter that did not appear in the original web module's descriptor, or overriding the descriptor's setting of the parameter.
If you the --ignoreDescriptorItem option is set to true, then the server ignores any setting for that environment entry in the descriptor, which means you do not need to specify an overriding value on the set-web-env-entry subcommand. The server behaves as if the descriptor had never contained a setting for that environment entry.
This subcommand sets an environment entry for one of the following items:
A deployed web application
A web module in a deployed Java Platform, Enterprise Edition (Java EE) application
Before You Begin
The application must already be deployed. Otherwise, an error occurs.
Remote commands require a running server.
Information about the options for the subcommand is included in this help page.
Example 2-23 Setting an Environment Entry for a Web Application
This example sets the environment entry Hello User of the application hello to techscribe. The Java type of this entry is java.lang.String.
asadmin> set-web-env-entry --name="Hello User" --type=java.lang.String --value=techscribe --description="User authentication for Hello appplication" hello Command set-web-env-entry executed successfully
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help set-web-env-entry at the command line.
Use the unset-web-env-entry subcommand in remote mode to unset an environment entry for a deployed web application or module.
Remote commands require a running server.
Information about the options for the subcommand is included in this help page.
Example 2-24 Unsetting an Environment Entry for a Web Application
This example unsets the environment entry Hello User of the web application hello.
asadmin> unset-web-env-entry --name="Hello User" hello Command unset-web-env-entry executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help unset-web-env-entry at the command line.
Use the list-web-env-entry subcommand to list environment entries for a deployed web application or module. For each entry, the following information is displayed:
The name of the entry
The Java type of the entry
The value to which the entry is set
The description of the entry or null if no description was specified when the entry was set
The value of the --ignoreDescriptorItem option of the set-web-env-entry subcommand that was specified when the entry was set
Remote commands require a running server.
Example 2-25 Listing Environment Entries for a Web Application
This example lists all environment entries that have been set for the web application hello by using the set-web-env-entry subcommand.
asadmin> list-web-env-entry hello Hello User (java.lang.String) = techscribe ignoreDescriptorItem=false //User authentication for Hello appplication Hello Port (java.lang.Integer) = null ignoreDescriptorItem=true //null Command list-web-env-entry executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typing asadmin help list-web-env-entry at the command line.