+

Search Tips   |   Advanced Search

Example: Create an SCA business-level application with the console

We can add many different types of artifacts to business-level applications. For example, we 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 console.

In a product installation, verify that the target server is configured. As part of configuring the server, determine whether the application files can run on the deployment target. We must deploy SCA composite assets of a business-level application to a Version 8.0 or later 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:

  1. Go to the Samples, v8.5 information center.

  2. On the Downloads tab, click FTP or HTTP in the Service Component Architecture section.

  3. In the authentication window, click OK.

  4. In the SCA.zip compressed file, go to the SCA/installableApps directory and download the helloworld-ws-asynch.jar file.

For this example, use the console to create a business-level application named HelloWorldAsync that has an SCA JAR file, helloworld-ws-asynch.jar, as an asset.

  1. Create an empty business-level application named HelloWorldAsync.

    1. Click Applications > New Application > New Business Level Application.

    2. On the New application page, specify the name HelloWorldAsync, optionally add a description, and then click Apply.

    3. 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.

  2. Import the SCA JAR asset.

    1. Click Applications > New Application > New Asset in the console navigation tree.

    2. 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.

    3. On the Select options for importing an asset page, click Next to accept the default values.

    4. On the Summary page, click Finish.

    5. On the Adding asset to repository page, if messages show that the operation completed, click Manage assets.

    6. On the Assets page, click the Save link.
    The file name displays in the list of assets.

  3. Add the SCA JAR asset as a composition unit of the business-level application.

    1. Click Applications > Application Types > Business-level applications.

    2. On the Business-level applications page, click the HelloWorldAsync application name.

    3. On the business-level application settings page, click Add > Add Asset.

    4. On the Add page, select the helloworld-ws-asynch.jar asset composition unit from the list of available units, and then click Continue.

    5. On the Set options page, click Next to accept the default values.

    6. 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.

    7. On the Define relationship with existing composition units page, click Next to accept the default values.

    8. On the Map virtual host page, click Next to accept the default values.

    9. 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, we 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.

    10. If the addition is successful, click Manage application.

    11. On the business-level application settings page, click Save.
    The asset name and type displays in the list of deployed assets. If we click on the asset name, the composition unit settings page displays, with the asset name in the SCA Composite Components list.

  4. Start the HelloWorldAsync business-level application.

    1. Click Applications > Application Types > Business-level applications.

    2. On the Business-level applications page, select the check box for HelloWorldAsync.

    3. 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 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 we add the asset to the business-level application. We 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.


Related tasks

  • Example: Create an SCA business-level application
  • Import assets
  • Create clusters
  • Create SCA business-level applications with the console
    Samples, v8.5 information center