Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Administration Guide

- Previous: About Deployment
- Next: Admin Console Tasks for Listing, Undeploying, and Enabling Applications

# Admin Console Tasks for Deploying Applications

- To deploy an enterprise application

- To deploy a web application

- To launch a deployed web application

- To deploy an EJB module

- To deploy an application client module

- To deploy a connector module

- To create a lifecycle module

- To deploy an application client module

## To deploy an enterprise application

An enterprise application is packaged in an EAR file, a type of archive file that contains any type of J2EE stand-alone modules, such as WAR and EJB JAR files.

1. In the tree component, expand the Applications node.

2. Select the Enterprise Applications node.

3. On the Enterprise Applications page, click Deploy.

4. On the Deployment page, specify the location of the EAR file to deploy.

   The server machine is the host that is running the application server domain administration server. The client machine is the host on which you are viewing the Admin Console through a browser.

   - If the file resides on or is accessible from the client machine, click the radio button to specify a package file to upload to the Application Server.

     Click Browse to browse to the file, or type the full path to the file.

   - If the file resides on the server machine, or to deploy an unpackaged application from an exploded directory, click the radio button to specify a package file or a directory path that must be accessible from the server.

     Type the full path name to the file or directory. Deploying from an exploded directory is for advanced developers and is not recommended for production environments.

5. Click Next to display the Deploy Enterprise Application page.

6. On the Deploy Enterprise Application page, specify the settings for the application.

   1. In the Application Name field, either retain the default name, which is the prefix of the file name, or type another name.

      The default name appears if you chose to upload a file. The application name must be unique.

   2. In the Virtual Servers field, you can replace the default `server`.

      To view the available virtual servers, in the tree component select Configuration -> HTTP Service -> Virtual Servers.

   3. To disable the application so that is unavailable after deployment, select the Disabled radio button.

      By default, an application is available as soon as it is deployed.

   4. If the application has already been deployed, select the Redeploy checkbox to redeploy it; otherwise you see an error.

      You can also choose a different application name and deploy it under a new name.

   5. To verify the structure and contents of the file before deployment, select the Verifier checkbox.

      Verification of large applications can be time-consuming. Verify the file if you suspect it is corrupt or non-portable.

   6. To precompile JSP pages, select the JSPs checkbox.

      If you do not select this checkbox, the JSP pages are compiled at runtime when they are first accessed. Because compilation is often time-consuming, in a production environment select this checkbox.

   7. Choose whether to generate RMI stubs.

      If you choose to generate RMI stubs, static RMI-IIOP stubs are generated and put into the client JAR file.

7. Click OK to deploy the application.

##### Equivalent asadmin command

`deploy`

##### See Also

- To undeploy an application or module

- To enable or disable an application or module

- To edit a deployed enterprise application

## To edit a deployed enterprise application

1. In the tree component, expand the Applications node.

2. Expand the Enterprise Applications node.

3. Select the node for the deployed application.

4. On the Enterprise Application page, change the description.

5. In Enterprise Edition, enable or disable high-availability.

   If availability is enabled for an application, it must also be enabled at all higher levels (named configuration and web container or EJB container) as well.

##### See Also

- To view module descriptors of deployed applications

- To deploy an enterprise application

- To undeploy an application or module

- To enable or disable an application or module

## To deploy a web application

A web application is packaged in a WAR file, a type of archive file that contains components such as servlets and JSP files.

1. In the tree component, expand the Applications node.

2. Select the Web Applications node.

3. On the Web Applications page, click Deploy.

4. On the Deployment page, specify the location of the WAR file to deploy.

   The server machine is the host that is running the application server domain administration server. The client machine is the host on which you are viewing the Admin Console through a browser.

   - If the file resides on or is accessible from the client machine, click the radio button to specify a package file to upload to the Application Server.

     Click Browse to browse to the file, or type the full path to the file.

   - If the file resides on the server machine, or to deploy an unpackaged application from an exploded directory, click the radio button to specify a package file or a directory path that must be accessible from the server.

     Type the full path name to the file or directory. Deploying from an exploded directory is for advanced developers and is not recommended for production environments.

5. Click Next to display the Deploy Web Application page.

6. On the Deploy Web Application page, specify the settings for the application.

   1. In the Application Name field, either retain the default name, which is the prefix of the file name, or type another name.

      The default name appears if you chose to upload a file. The application name must be unique.

   2. In the Context Root field, enter a string that identifies the Web application.

      In the URL of the Web application, the context root immediately follows the port number (`http://host:port/context-root/...`). Make sure that the context root starts with a forward slash, for example: `/hello`.

   3. In the Virtual Servers field, you can replace the default `server`.

      To view the available virtual servers, in the tree component select Configuration -> HTTP Service -> Virtual Servers.

   4. To disable the application so that is unavailable after deployment, select the Disabled radio button.

      By default, an application is available as soon as it is deployed.

   5. If the application has already been deployed, select the Redeploy checkbox to redeploy it; otherwise you see an error.

      You can also choose a different application name and deploy it under a new name.

   6. To verify the structure and contents of the file before deployment, select the Verifier checkbox.

      Verification of large applications is often time-consuming. Verify the file if you suspect it is corrupt or non-portable.

   7. To precompile JSP pages, select the JSPs checkbox.

      If you do not select this checkbox, the JSP pages are compiled at runtime when they are first accessed. Because compilation is often time-consuming, in a production environment select this checkbox.

   8. Choose whether to generate RMI stubs.

      If you choose to generate RMI stubs, static RMI-IIOP stubs are generated and put into the client JAR file.

7. Click OK to deploy the application.

##### Equivalent asadmin command

`deploy`

##### See Also

- To undeploy an application or module

- To launch a deployed web application

- To enable or disable an application or module

## To launch a deployed web application

After deploying an application, you can launch it from the Admin Console. The server and HTTP listener must be running for the application to launch.

1. In the tree component, expand the Applications node.

2. Click Web Applications.

3. Click the Launch link for the web application.

4. Click a link on the Web Application Links page to launch the application.

## To edit a deployed web application

1. In the tree component, expand the Applications node.

2. Expand the Web Applications node.

3. Select the node for the deployed application.

4. On the Web Application page, change the context root and change the description.

5. In Enterprise Edition, enable or disable high-availability.

   If availability is enabled for an application, it must also be enabled at all higher levels (named configuration and web container or EJB container) as well.

##### See Also

- To view module descriptors of deployed applications

- To launch a deployed web application

- To deploy a web application

- To undeploy an application or module

- To enable or disable an application or module

## To deploy an EJB module

An EJB module, also called an EJB JAR file, contains enterprise beans.

1. In the tree component, expand the Applications node.

2. Select the EJB Modules node.

3. On the EJB Module page, click Deploy.

4. On the Deployment page, specify the location of the JAR file to deploy.

   The server machine is the host that is running the application server domain administration server. The client machine is the host on which you are viewing the Admin Console through a browser.

   - If the file resides on or is accessible from the client machine, click the radio button to specify a package file to upload to the Application Server.

     Click Browse to browse to the file, or type the full path to the file.

   - If the file resides on the server machine, or to deploy an unpackaged application from an exploded directory, click the radio button to specify a package file or a directory path that must be accessible from the server.

     Type the full path name to the file or directory. Deploying from an exploded directory is for advanced developers and is not recommended for production environments.

5. Click Next to display the Deploy EJB Module page.

6. On the Deploy EJB Module page, specify the settings for the module.

   1. In the Application Name field, either retain the default name, which is the prefix of the file name, or type another name.

      The default name appears if you chose to upload a file. The application name must be unique.

   2. To disable the module so that is unavailable after deployment, select the Disabled radio button.

      By default, an module is available as soon as it is deployed.

   3. If the module has already been deployed, select the Redeploy checkbox to redeploy it; otherwise you see an error.

      You can also choose a different application name and deploy it under a new name.

   4. To verify the structure and contents of the file before deployment, select the Verifier checkbox.

      Verification of large applications can be time-consuming. Verify the file if you suspect it is corrupt or non-portable.

   5. Choose whether to generate RMI stubs.

      If you choose to generate RMI stubs, static RMI-IIOP stubs are generated and put into the client JAR file.

7. Click OK to deploy the module.

##### Equivalent asadmin command

`deploy`

##### See Also

- To undeploy an application or module

- To enable or disable an application or module

## To edit a deployed EJB module

1. In the tree component, expand the Applications node.

2. Expand the EJB Modules node.

3. Select the node for the deployed module.

4. On the EJB Module page, change the description.

5. In Enterprise Edition, enable or disable high-availability.

   If availability is enabled for a module, it must also be enabled at all higher levels (named configuration and web container or EJB container) as well.

##### See Also

- To view module descriptors of deployed applications

- To deploy an EJB module

- To undeploy an application or module

- To enable or disable an application or module

## To deploy a connector module

A connector, also known as a resource adapter, is packaged in a type of archive file called a RAR file.

1. In the tree component, expand the Applications node.

2. Select the Connector Modules node.

3. On the Connector Modules page, click Deploy.

4. On the Deployment page, specify the location of the RAR file to deploy.

   The server machine is the host that is running the application server domain administration server. The client machine is the host on which you are viewing the Admin Console through a browser.

   - If the file resides on or is accessible from the client machine, click the radio button to specify a package file to upload to the Application Server.

     Click Browse to browse to the file, or type the full path to the file.

   - If the file resides on the server machine, or to deploy an unpackaged module from an exploded directory, click the radio button to specify a package file or a directory path that must be accessible from the server.

     Type the full path name to the file or directory. Deploying from an exploded directory is for advanced developers and is not recommended for production environments.

5. Click Next to display the Deploy Connector Module page.

6. On the Deploy Connector Module page, specify the settings for the module.

   1. In the Application Name field, either retain the default name, which is the prefix of the file name, or type another name.

      The default name appears if you chose to upload a file. The application name must be unique.

   2. In the Thread Pool Id field, specify the thread pool for the resource adapter you are deploying.

      By default, the Application Server services work requests from all resource adapters from its default thread pool. Use this field to associate a specific user-created thread pool to service work requests from a resource adapter.

   3. To disable the module so that is unavailable after deployment, select the Disabled radio button.

      By default, a module is available as soon as it is deployed.

      When you enable or disable a connector module, you also enable or disable the connector resources and connection pools that point to the module.

   4. If the module has already been deployed, select the Redeploy checkbox to redeploy it; otherwise you see an error.

      You can also choose a different application name and deploy it under a new name.

   5. To verify the structure and contents of the file before deployment, select the Verifier checkbox.

      Verification of large applications is often time-consuming. Verify the file if you suspect it is corrupt or non-portable.

   6. If the resource adapter has additional properties specified, they are displayed.

      Use the table to modify the default values of these properties.

7. Click OK to deploy the module.

##### Equivalent asadmin command

`deploy`

##### See Also

- To undeploy an application or module

- To enable or disable an application or module

- To Set Up EIS Access

- To create a JDBC connection pool

- To create a JDBC resource

- To create a thread pool

- About Thread Pools

## To edit a deployed connector module

1. In the tree component, expand the Applications node.

2. Expand the Connector Modules node.

3. Select the node for the deployed module.

4. On the Connector Module page, choose another thread pool or change the description.

##### See Also

- To view module descriptors of deployed applications

- To deploy a connector module

- To undeploy an application or module

- To enable or disable an application or module

## To create a lifecycle module

A lifecycle module performs tasks when it is triggered by one or more events in the server lifecycle. These server events are:

- Initialization

- Startup

- Ready to service requests

- Shutdown

Lifecycle modules are not part of the J2EE specification, but are an enhancement to the Application Server.

1. In the tree component, expand the Applications node.

2. Select the Lifecycle Modules node.

3. On the Lifecycle Modules page, click New.

4. On the Create Lifecycle Module page, specify these settings:

   1. In the Name field, type a name that denotes the function of the module.

   2. In the Class Name field, type the fully qualified name of the lifecycle module’s class file.

   3. If the JAR file containing the lifecycle is in the server’s classpath, leave the Classpath field blank. Otherwise, type the fully qualified path.

      If you don’t specify the classpath, you must unpack the classes in domain-dir`/applications/lifecycle-module/`module-name. If you specify a classpath, nothing else is required.

   4. In the Load Order field, type an integer greater than 100 and less than the operating system’s `MAXINT` value.

      The integer determines the order in which lifecycle modules are loaded when the server starts up. Modules with smaller integers are loaded sooner.

   5. When you start the server, it loads lifecycle modules that are already deployed.

      By default, if a load fails, the server continues the startup operation. To prevent the server from starting up when a load fails, select the On Load Failure checkbox.

   6. To disable the module so that is unavailable after deployment, select the Disabled radio button.

      Because a lifecycle module is invoked at server startup, a disabled lifecycle module won’t cease to have an effect until the server is restarted.

5. Click OK.

##### Equivalent asadmin command

`create-lifecycle-module`

## To edit a lifecycle module

1. In the tree component, expand the Applications node.

2. Expand the Lifecycle Modules node.

3. Select the node for the lifecycle module.

4. On the Lifecycle Module page, edit the following fields:

   1. In the Class Name field, type the fully qualified name of the lifecycle module’s class file.

   2. If the JAR file containing the lifecycle is in the server’s classpath, then leave the Classpath field blank. Otherwise, type the fully qualified path.

      If you don’t specify the classpath, you must unpack the classes in domain-dir`/applications/lifecycle-module/`module-name. If you specify a classpath, nothing else is required.

   3. In the Load Order field, type an integer greater than 100 and less than the operating system’s `MAXINT` value.

      The integer determines the order in which lifecycle modules are loaded when the server starts up. Modules with smaller integers are loaded sooner.

   4. When you start the server, it loads lifecycle modules that are already deployed.

      By default, if a load fails, the server continues the startup operation. To prevent the server from starting up when a load fails, select the On Load Failure checkbox.

   5. Change the description.

   6. Define property name/value pairs by clicking Add Property.

##### See Also

- To create a lifecycle module

- To enable or disable an application or module

## To deploy an application client module

An application client module, also called a J2EE application client JAR file, contains the server-side routines for the client.

1. In the tree component, expand the Applications node.

2. Select the App Client Modules node.

3. On the Application Client Modules page, click Deploy.

4. On the Deployment page, specify the location of the JAR file to deploy.

   The server machine is the host that is running the application server domain administration server. The client machine is the host on which you are viewing the Admin Console through a browser.

   - If the file resides on or is accessible from the client machine, click the radio button to specify a package file to upload to the Application Server.

     Click Browse to browse to the file, or type the full path to the file.

   - If the file resides on the server machine, or to deploy an unpackaged module from an exploded directory, click the radio button to specify a package file or a directory path that must be accessible from the server.

     Type the full path name to the file or directory. Deploying from an exploded directory is for advanced developers and is not recommended for production environments.

5. Click Next to display the Deploy Application Client Module page.

6. On the Deploy Application Client Module page, specify the settings for the module.

   1. In the Application Name field, either retain the default name, which is the prefix of the file name, or type another name.

      The default name appears if you chose to upload a file. The application name must be unique.

   2. If the module has already been deployed, select the Redeploy checkbox to redeploy it; otherwise you see an error.

      You can also choose a different application name and deploy it under a new name.

   3. To verify the structure and contents of the file before deployment, select the Verifier checkbox.

      Verification of large applications can be time-consuming. Verify the file if you suspect it is corrupt or non-portable.

   4. Choose whether to generate RMI stubs.

      If you choose to generate RMI stubs, static RMI-IIOP stubs are generated and put into the client JAR file.

      For the client-side routines:

      - Typically, the application provider ships a JAR file containing the client-side routines.

      - The application provider gets the client-side stubs by specifying the `--retrieve` option of the `asadmin deploy` command.

7. Click OK to deploy the module.

##### Equivalent asadmin command

`deploy`

##### See Also

- To undeploy an application or module

- To enable or disable an application or module

## To edit a deployed application client module

1. In the tree component, expand the Applications node.

2. Expand the App Client Modules node.

3. Select the node for the deployed module.

4. On the Application Client Module page, modify the Description field.

##### See Also

- To view module descriptors of deployed applications

- To deploy an application client module

- To undeploy an application or module

## To specify an archive file for deployment

Click Deploy on an application or module page, to access the Deployment page. On the Deployment page, specify the location of the archive file in which the application or module is packaged.

The server machine is the host that is running the application server domain administration server. The client machine is the host on which you are viewing the Admin Console through a browser.

1. If the file resides on or is accessible from the client machine, click the radio button to specify a package file to upload to the Application Server.

   Click Browse to browse to the file, or type the full path to the file.

2. If the file resides on the server machine, or to deploy an unpackaged application from an exploded directory, click the radio button to specify a package file or a directory path that must be accessible from the server.

   Type the full path name to the file or directory. Deploying from an exploded directory is for advanced developers and is not recommended for production environments.

- Previous: About Deployment
- Next: Admin Console Tasks for Listing, Undeploying, and Enabling Applications

- © 2010, Oracle Corporation and/or its affiliates