You can add many different types of artifacts to business-level
applications. For example, you can add applications or modules, Java™ archives (JAR files), data in compressed
files, and other business-level applications. This example describes
how to create an empty business-level application and then add a Service
Component Architecture (SCA) JAR file to the application using the
administrative console.
Before you begin
Install the Feature Pack for SCA. Installing the feature
pack adds SCA sample files to the app_server_root/installableApps directory.
If you selected to install Samples during creation of a profile enabled
by the feature pack, the product also adds several SCA sample files
to the app_server_root/samples/SCA directory.
Also,
verify that the target server is configured. As part of configuring
the server, determine whether your application files can run on your
deployment target. You must deploy SCA composite assets of a business-level
application to a Version 7.0 server or cluster that is enabled for
the Feature Pack for SCA.
About this task
For this example, use the administrative console to create
a business-level application named HelloWorldAsync that has an SCA
JAR file, helloworld-ws-asynch.jar, as an asset.
The JAR file is available in app_server_root/installableApps.
Procedure
- Create an empty business-level application named HelloWorldAsync.
- Click .
- On the New application page, specify the name HelloWorldAsync,
optionally add a description, and then click Apply.
- On the page that is displayed, click the Save link.
The name is shown in the list of applications on the Business-level
applications page. Because the application is empty, its status is Unknown.
- Import the SCA JAR asset.
- Click in the console navigation tree.
- On the Upload asset page, specify the asset package
to import, helloworld-ws-asynch.jar, and click Next.
The JAR file is in the app_server_root/installableApps directory.
- On the Select options for importing an asset page, click Next to
accept the default values.
- On the Summary page, click Finish.
- On the Adding asset to repository page, if messages
show that the operation completed, click Manage assets.
- On the Assets page, click the Save link.
The file name displays in the list of assets.
- Add the SCA JAR asset as a composition unit of the business-level
application.
- Click .
- On the Business-level applications page, click the HelloWorldAsync application
name.
- On the business-level application settings page, click .
- On the Add page, select the helloworld-ws-asynch.jar asset
composition unit from the list of available units, and then click Continue.
- On the Set options page, click Next to
accept the default values.
- On the Map composition unit to a target page, specify
a target server that is enabled for the Feature Pack for SCA, and
then click Next.
The target server
can be an existing cluster. To map the composition unit to a cluster,
select the existing cluster from the Available list,
click Add, and then click Next.
The cluster name is shown in the Current targets list
as WebSphere:cluster=cluster_name.
- On the Define relationship with existing composition
units page, click Next to accept the default
values.
- On the Map virtual host page, click Next to
accept the default values.
- On the Summary page, click Finish.
Several messages are displayed. A message having the format Completed
res=[WebSphere:cuname=helloworldws] indicates that the addition
is successful.
During deployment of the composition unit, you
can view the Uniform Resource Identifier (URI) for composite level
service of some bindings, along with the service name and binding
type. Only the URI is editable. The product does not validate the
URI.
- If the addition is successful, click Manage
application.
- On the business-level application settings page, click Save.
The asset name and type displays in the list of deployed
assets. If you click on the asset name, the Composition unit settings
page displays, with the asset name in the SCA Composite
Components list.
- Start the HelloWorldAsync business-level application.
- Click .
- On the Business-level applications page, select the
check box beside HelloWorldAsync.
- Click Start.
When the business-level application is running, a green
arrow displays for Status. If the business-level
application does not start, ensure that the deployment target to which
the application maps is running and try starting the application again.
What to do next
Optionally examine, and possibly use in applications,
other SCA sample files in app_server_root/installableApps or app_server_root/samples/SCA.
If
the business-level application does not start, ensure that the deployment
target to which the application maps is running and try starting the
application again. If SCA composite assets do not start, ensure that
each asset is mapped to a deployment target that is enabled for the
Feature Pack for SCA.
If an asset composition unit uses an Enterprise
JavaBean (EJB) binding and does not start because it has a non-WebSphere
target of "null", delete the asset composition unit and add
it again to the business-level application. Specify a target enabled
for the Feature Pack for SCA when you add the asset to the business-level
application. You cannot change the target after deployment.
If
the SCA application uses security, the target server or cluster must
be in the global security domain.
In multiple-node environments,
synchronize the nodes after you save changes to the target before
starting the business-level application.