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.
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
using the WebSphere 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 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 workspaceThe 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 WebSphere Application
Server 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.
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 may require
additional 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 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 WebSphere Application Server.
Important: When you are using the
Run server with
resources within the workspace option, you can only view
your deployment descriptor file using the WebSphere Administrative Console. In addition,
you cannot edit application-level configurations using the WebSphere 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. To edit enhanced EAR settings, you
must use the
WebSphere Application Server Deployment editor available from the workbench, for more details about this
editor see the
Defining deployment
configurations for enterprise applications targeting a WebSphere Application Server topic.
For more details about editing the class-loader options within the
workbench, see the
Setting class loader policy to an enterprise application targeted
for a WebSphere Application
Server topic.
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:
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 may encounter errors when 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 using the administrative console or the wsadmin command-line tool.
Minimize application files copied to the serverAn 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 publishing option is available only when running a
local WebSphere Application
Server and the application runs from the workspace, and not available
when running a remote server. It 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.
Important: The
same restrictions for viewing and editing application-level configurations
in the WebSphere Administrative
Console described in the
Important section under the
Run server with resources within the workspace option
applies to this publishing option. An additional restriction for the
Minimize application files copied to the server publishing
option is that some configuration options appear missing in the WebSphere Administrative Console,
which is designed to prevent modifications 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 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.
Automatically start applications after publishingSelect 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: