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
Web Module Deployment Guidelines
EJB Module Deployment Guidelines
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
Deploying a stand-alone connector module allows multiple deployed Java EE applications to share the connector module. A resource adapter configuration is automatically created for the connector module.
The following topics are addressed here:
As an alternative to Step 3 through Step 6, you can define application-scoped resources in the glassfish-resources.xml deployment descriptor. For more information, see Application-Scoped Resources.
Use the create-connector-connection-pool subcommand. For procedures, see To Create a Connector Connection Pool in Oracle GlassFish Server 3.1 Administration Guide.
Use the create-resource-adapter-config subcommand. For procedures, see To Create Configuration Information for a Resource Adapter in Oracle GlassFish Server 3.1 Administration Guide. If needed, you can override the default configuration properties of a resource adapter.
This step associates a connector resource with a JNDI name.
Use the create-resource-adapter-config subcommand. For procedures, see To Create Configuration Information for a Resource Adapter in Oracle GlassFish Server 3.1 Administration Guide. If needed, you can override the default configuration properties of a resource adapter.
Use the create-admin-object subcommand. For procedures, see To Create an Administered Object in Oracle GlassFish Server 3.1 Administration Guide.
Redeployment of a connector module maintains all connector connection pools, connector resources, and administered objects defined for the previously deployed connector module. You do not need to reconfigure any of these resources.
However, you should redeploy any dependent modules. A dependent module uses or refers to a connector resource of the redeployed connector module. Redeployment of a connector module results in the shared class loader reloading the new classes. Other modules that refer to the old resource adapter classes must be redeployed to gain access to the new classes. For more information about class loaders, see Chapter 2, Class Loaders, in Oracle GlassFish Server 3.1 Application Development Guide.
During connector module redeployment, the server log provides a warning indicating that all dependent applications should be redeployed. Client applications or application components using the connector module’s resources may throw class cast exceptions if dependent applications are not redeployed after connector module redeployment.
To disable automatic redeployment, set the --force option to false. In this case, if the connector module has already been deployed, GlassFish Server provides an error message.
A connector module can be deployed as a Java EE component in a Java EE application. Such connectors are only visible to components residing in the same Java EE application. Deploy this application as you would any other Java EE application.
You can create new connector connection pools and connector resources for a connector module embedded within a Java EE application by prefixing the connector name with app-name#. For example, if an application appX.ear has jdbcra.rar embedded within it, the connector connection pools and connector resources refer to the connector module as appX#jdbcra.
An embedded connector module cannot be undeployed using the name app-name#connector-name. To undeploy the connector module, you must undeploy the application in which it is embedded.
The association between the physical JNDI name for the connector module in GlassFish Server and the logical JNDI name used in the application component is specified in the GlassFish Server–specific XML descriptor glassfish-ejb-jar.xml.