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
In a product installation, 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 8.0 server or cluster (target) or to a Version 7.0 target
that is enabled for the Feature Pack for SCA.
Download the
helloworld-ws-asynch.jar SCA
sample file from a product download site:
- Go to
the Samples, Version 8.0 information
center.
- On the Downloads tab, click FTP or HTTP in
the Service Component Architecture section.
- In the authentication window, click OK.
- In the SCA.zip compressed file, go to the SCA/installableApps directory
and download the helloworld-ws-asynch.jar file.
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.
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 supports SCA composites, 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 the SCA/installableApps directory
of the downloadable SCA samples.
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 supports SCA composites.
If an asset composition
unit uses an Enterprise JavaBeans (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 that supports SCA composites 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.