Publishing settings for WebSphere Application Server traditional

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

About this task

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.
Important: Applicable to WebSphere Application Server traditional

Run server with resources on Server

The run server with resources on Server publishing option 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 WebSphere Application Server. 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 WebSphere Application Server.

The 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 by using the administrative console. However, 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 that are 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 by 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 by 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 you are running a local WebSphere Application Server and not available when you are running a remote server.

The run server with resources within the workspace setting is useful when you are 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.

This publishing option should publish faster when an application contains a single root, as opposed to containing multiple roots, because the server expects the structure of an application to have only a single root. As a result, the workbench might require more processing time to publish an application with multiple roots. To determine whether the structure of your application contains a single or multiple roots, use the Project Structure Validator. For details, see Creating and configuring Java™ EE projects using wizards topic.

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 by 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, where \directory\profile\ is the directory of your profile for the WebSphere Application Server.
Important: When you are using the Run server with resources within the workspace option, you can view only your deployment descriptor file by using the administrative console. In addition, you cannot edit application-level configurations by using the administrative console, including Java EE configurations, enhanced EAR settings, policy set attachments, bindings, and other settings. For example, an enhanced EAR setting that is not available for editing in the administrative console is the class-loader option PARENT_LAST. You are limited to editing your application-level configurations in the workbench.

If you want to switch publishing settings to run server with resources on Server, you need to remove the application from the server by 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 by using the Add and Remove Projects wizard.

CAUTION:
When you are using Run server with resources within the workspace publishing option, the server can lose track of your application under the following scenarios:
  • If you delete your 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.
  • If you delete an application from the workspace without removing it from the server, the server no longer can find your application. As a result, you might encounter errors when you are starting the server because the server tries to start the missing application from the workspace. You can try to manually remove the remaining application files from the server by using the administrative console or the wsadmin command-line tool.
Minimize application files copied to the server
An extra 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 publishing option is available only when you are running a local WebSphere Application Server and the application runs from the workspace, and not available when you are running a remote server. It is designed to optimize the publishing-time on the server by reducing the files that are 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.
Important: The same restrictions for viewing and editing application-level configurations in the administrative console that is described in the Important section under the Run server with resources within the workspace option applies to this publishing option. An extra restriction for the Minimize application files copied to the server publishing option is that some configuration options appear missing in the administrative console, which is designed to prevent modifications by using the console and instead to use the workbench for editing the application-level configurations.

If you want to be able to view your application's deployment descriptors in the administrative console, you need to remove the application from the server by 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 by using the Add and Remove Projects wizard.

Automatically start applications after publishing

Select the Automatically start applications after publishing check box if you want the workbench to make an automatic attempt to start the application after it is published to the server. By default this check box is enabled.

You can clear this check box if you want to manually start the application after it is published to the server. When this check box is cleared, the initial state of the published application should be Stopped. You can manually start the application by going into the Servers view, expand the server, right-click the application, and select Start.

If this check box is cleared, the application for running the Universal Test Client remains started on the server.

To configure the publishing settings for a WebSphere Application Server:

Procedure

  1. In the Servers view, double-click your WebSphere Application Server to open the server editor.
  2. Click the Overview tab.
  3. Expand the Publishing settings for WebSphere Application Server section.
  4. Use the radio buttons to select either:
    • 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 can select the Minimize application files copied to the server check box. When you are running a local WebSphere Application Server, this option is enabled by default.
  6. Optional: If you want the workbench to make an automatic attempt to start the application after it is published to the server, select the Automatically start applications after publishing check box.
  7. Save and close the editor.