Publishing settings for a WAS

Publishing involves copying files (application, resource files, and deployment descriptor files) to the correct location for the server to find and use them. You have the option whether you want to publish your application on the server or run your application within the development environment without copying the application into the directories of the server.

Note: You can use the workbench to publish or remove applications to any WebSphere® Application Server that it supports. Although it is possible to deploy applications into production directly from your development environment, this is not a recommended practice. Access control should be enforced on production servers, and applications should deploy through controlled and repeatable processes.

Run server with resources on Server

The Run server with resources on Server publishing option installs and copies the full application and its server-specific configuration from the workbench into the directories of the server. To use this publishing option, the server can be either a remote or local WAS. The default location where an application gets copied into the server is

\

directory\profile\installedApps\cellName directory, where

\

directory\profile is the directory of your profile for the WAS.

Advantage of selecting the Run server with resources on Server setting is you are running your application from the directories of your server and you can edit advanced application-level settings using the WebSphere Administrative Console. However, when you select to add your application to the server using the Add and Remove Projects wizard, this publishing option might take a longer time to complete than the Run server with resources within the workspace publishing option, as it involves more files copied to the server.

If you want to switch publishing settings to Run server with resources within the workspace, you need to remove the application from the server using the Add and Remove Projects wizard, select the Run server with resources within the workspace radio button, and add the application back onto the server using the Add and Remove Projects wizard. Run server with resources within the workspace

The Run server with resources within the workspace publishing option requests the server to run your application from the workspace. This publishing option is available only when running a local WAS and not available when running a remote server.

The Run server with resources within the workspace setting is useful when developing and testing your application as it is designed to operate faster than the Run server with resources on Server publishing option as fewer files are involved when copied over to the server.

If you enable the Run server with resources within the workspace setting and clear the Minimize application files copied to the server publishing option, when you select to add your application to the server using the Add and Remove Projects wizard, the application does not get copied into the directory of the server. For example, the application files do not get copied into the installedApps directory of the server. However, your application does get copied into your server configuration directory:

\

directory\profile\config\cells\cellName\applications directory, where

\

directory\profile\ is the directory of your profile for the WAS. As a result, you can only view your deployment descriptor file using the WebSphere Administrative Console. In addition, you cannot edit application-level settings using the WebSphere Administrative Console, including enhanced EAR settings, policy set attachments, bindings, and other settings.

If you want to switch publishing settings to Run server with resources on Server, you need to remove the application from the server using the Add and Remove Projects wizard, select the Run server with resources on Server radio button, and add the application back onto the server using the Add and Remove Projects wizard.

CAUTION:

If you use the "Run server with resources within the workspace" publishing option and you delete the workspace, the server no longer can find your application. As a result, if you did not put your application under source control management and the workspace is deleted, you can lose your application from your file system. Minimize application files copied to the server

An additional publishing option becomes available when the Run server with resources within the workspace option is selected, which is the Minimize application files copied to the server option. This option is designed to optimize the publishing-time on the server by reducing the files copied to the server. In addition to the application files not getting copied into the installedApps directory of the server, the application also does not get copied into your server configuration directory. As a result, when configuring your application you cannot use the WebSphere Administrative Console to edit Java™ EE deployment descriptors or configuration files specific to the WAS, for example enhanced EAR settings, policy set attachments, bindings, and other settings. You are limited to editing your deployment descriptors and application-level settings within the workbench. This publishing option is available only when running a local WAS and the application runs from the workspace, and not available when running a remote server.

If you want to be able to view your application's deployment descriptors in the WebSphere Administrative Console, you need to remove the application from the server using the Add and Remove Projects wizard, disable the

Minimize application files copied to the server publishing setting by clearing this check box and enable only the Run server with resources on Server radio button, and then add the application back onto the server using the Add and Remove Projects wizard.

Restrictions

To configure the publishing settings for a WAS:

  1. In the Servers view, double-click your WAS to open the server editor.

  2. Click the

    Overview tab.

  3. Expand the

    Publishing section.

  4. Use the radio buttons to select either the following:

    • Run server with resources within the workspace

    • Run server with resource on server

  5. (Optional) If you selected the Run server with resources within the workspace radio button, you have the option to select the

    Minimize application files copied to the server check box. When running a local WAS v6.1 or later, this option is enabled by default. If you are running a local WAS v6.0.x, this option is clear by default.

  6. Save and close the editor.

 

Related concepts

Servers view

Defining deployment configurations for enterprise applications targeting a WAS

Defining WebSphere extensions and bindings for enterprise applications

Managing qualities of service for Web services and clients using policy sets

 

Related tasks

Creating a WAS

 

Related reference

Publishing fails with duplicate class error

Related information

WAS maintenance releases