OASIS JMS Binding Sample

Table of Contents

Overview

Affiliates Icon

These Samples show the OASIS Service Component Architecture (SCA) Java™ Message Service (JMS) binding support. The JMS binding is a protocol binding that provides the ability to integrate SCA with JMS.

The Reference binding enables SCA components to send requests to a JMS provider.

The Service binding enables SCA components to receive messages from a JMS provider, thus exposing an SCA service to any JMS client or SCA reference with a JMS binding.

These Samples show how to invoke a SCA component service using a JMS client. The non-SCA, JMS client packaged within the jms-client.jar file invokes the POJO HelloService SCA service by simply sending a JMS message to the JMS message provider.

HelloServiceComponent is a simple POJO component that receives the JMS message through JMS service binding, executes the POJO component method, and returns the result back to the caller as a response message.

In the TwoWay Sample, the POJO has a single two-way method that returns a value.

In the TwoWay-OneWay Sample, the two-way method performs the additional step of invoking LoggingService over a one-way method to log the message to the server SystemOut file.

In the TwoWay-OneWay-Callback Sample, the one-way method performs the additional step of making a callback to the HelloServiceComponent POJO.

These Samples are similar but you can install together without conflicts.

Architectural Diagram

About Dynamic Resource Creation

Many resources are required to use JMS. These include queues, connection factories, activation specifications, a service bus, and queue destinations. To simplify administration and development, the SCA runtime will optionally create all the resources for you. For the JMS samples, you have the choice of dynamic or explicit resource creation.

One of the samples, TwoWay-DRC, only supports dynamic resource creation. The sample code is identical to TwoWay sample but the SCDL (in defaultDRC.composite) is configured to only provide the minimum necessary information. This example shows that the SCA runtime will choose default names when they are not specified in the SCDL.

Automated install / uninstall: If you are using the automated install and uninstall routines and would like to use dynamic resource creation only sample (TwoWay-DRC), run the commands:

<WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant install.drc
<WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant uninstall.drc

In addition to the usual:

<WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant install
<WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant uninstall

Sample Artifacts

  • jms-twoway-service.jar - This file contains an SCA component HelloServiceComponent with a two-way method. The HelloServiceComponent component exposes its service through the JMS binding.
  • jms-twoway-service-drc.jar - This file contains the same services as jms-twoway-service.jar, but the scdl is designed so that resources will be create dynamically using default names.
  • jms-twoway-oneway-service.jar - This file contains an SCA component HelloServiceComponent with a two-way method, that invokes a LoggingService over a one-way method. These components expose their services through the JMS binding.
  • jms-callback-service.jar - This file contains an SCA component HelloServiceComponent with a two-way method, that invokes a LoggingService over a one-way method. This executes a callback on the calling object. These components expose their services through the JMS binding.
  • jms-client.jar - This is a pure JMS client application. This client runs from the command line to test each of the samples separately.

Prerequisites

  • You must install WebSphere Application Server and the Feature Pack for SCA to run these Samples.
  • You must also create an SCA profile. Only a single server is needed; if your profile has more, choose one server to use throughout these procedures.
  • Make note of the node name and server name of the profile. These values are needed to edit and run the JMS resource creation and deletion scripts. You specify these during profile creation. If you are unsure, use one of the following methods to find out:
    1. Option 1: Use the administrative console:
      Note: WAS needs to be running in order to access the administrative console.
      1. In a Web browser running on the same machine as the Application Server, navigate to http://localhost:9060/admin, and login to the administrative console with your user ID and password.
      2. Click Servers > Server Types > WebSphere application servers.
      3. The table will list your server and its node name. Note these values.

        If you have multiple servers or even multiple nodes listed, decide on one to use throughout these procedures.

    2. Option 2: Check profile creation logs:
      1. Open the file <WAS_HOME>\profiles\<PROFILE_NAME>\logs\AboutThisProfile.txt in an editor.

        Example command:

        notepad C:\WebSphere\AppServer\profiles\AppSrv01\logs\AboutThisProfile.txt
      2. Look for the line containing the node name.

        Example content:

        Node name: localhostNode01
  • Make note of the bootstrap port of the server that is needed to run the JMS client. By default it is 2809, but this value might vary with your configuration. If you are unsure, there are a few ways to find out the value of the bootstrap port.
    1. Option 1: Use the administrative console:
      1. In a Web browser running on the same machine as the Application Server, navigate to http://localhost:9060/admin, and login to the administrative console with your user ID and password.
      2. Click Servers > Server Types > WebSphere application servers, click your server name, and click Ports under Communications.
      3. The BOOTSTRAP_ADDRESS row in the table displays the current port value.
    2. Option 2: Check server startup logs:
      1. Open the file: <WAS_HOME>\profiles\<PROFILE_NAME>\logs\<SERVER_NAME>\SystemOut.log

        Example command:

        notepad C:\WebSphere\AppServer\profiles\AppSrv01\logs\server1\SystemOut.log
      2. Search for the string bootstrap port in the most recent startup messages.

        Example log:

        NameServerImp A   NMSV0018I: Name server available on bootstrap port 2809.
  • The JMS samples are located in <SCA_SAMPLE_HOME>/jms

  • If you are using non-default ports you'll need to take note of the SIB endpoint port.

    1. Navigate to the admin console in a web browser and log in.
    2. From the left menu navigate to Servers > Server Types > WebSphere application servers.
    3. Select the link for your server (e.g. server1).
    4. From the right menu, navigate to Communications > Ports.
    5. Take note of the port for SIB_ENDPOINT_ADDRESS
  • NOTE: This document will reference the location that these samples have been extracted to as <SCA_SAMPLE_HOME>.

Limitations

There are no design limitations specific to this sample.

Build

Build Icon

Compile and build the installable artifacts using the provided ANT build script.

  1. Open a command window and go to the <SCA_SAMPLE_HOME>\jms directory.
    cd <SCA_SAMPLE_HOME>\jms
  2. Edit the thinClient properties file; for example: <SCA_SAMPLE_HOME>\jms\thinClient\src\main\resources\jms.properties
    1. Change the value of BOOTSTRAP_PORT to the value previously determined in prerequisite step 4.

      Example properties file:

      INITIAL_CONTEXT_FACTORY=com.ibm.websphere.naming.WsnInitialContextFactory
      TIMEOUT=10000
      JMS_HOST=localhost
      BOOTSTRAP_PORT=2809

      It is assumed that you are running the thinClient on the same machine as the Application Server, in which case, leave the value of JMS_HOST as localhost.

  3. Enter the following command to build the artifacts: <WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant

    For example: C:\WebSphere\AppServer\profiles\AppSrv01\bin\ws_ant
  4. Verify that the build completes without error and the following artifacts are created in the following directories:

    • <SCA_SAMPLE_HOME>\jms\TwoWay\target\jms-twoway-service.jar
    • <SCA_SAMPLE_HOME>\jms\TwoWay\target\jms-twoway-service-drc.jar
    • <SCA_SAMPLE_HOME>\jms\TwoWay-OneWay\target\jms-twoway-oneway-service.jar
    • <SCA_SAMPLE_HOME>\jms\TwoWay-OneWay-Callback\target\jms-callback-service.jar
    • <SCA_SAMPLE_HOME>\jms\thinClient\target\jms-client.jar

Start the Server

  1. Open a command window and enter the following command:

    cd <WAS_HOME>\profiles\<PROFILE_NAME>\bin

    For example:

    cd C:\WebSphere\AppServer\profiles\AppSrv01\bin
  2. Enter the startServer command.

    For example:

    startServer server1

Create JMS Resources

Choose just one of the following options to create the JMS Resources needed by the samples:

  1. Option 1: Let the Feature Pack's Dynamic Resource Creation (DRC) capability create all the resources for you. See the info-center for an extensive description of DRC. If you choose this option, skip to the Install section.
  2. Option 2: Use the provided resources.py script to create resources for all the samples at once.
  3. Option 3: Follow the steps in the Create resources manually section below to create resources manually using the admin console.

Using the included resources.py script

  1. Edit the resources.py file at <SCA_SAMPLE_HOME>\jms\resources.py to contain the correct node name and server name values as determined in prerequisite steps.

    If you are using non-default ports make sure that providerEndpointPort is the same as the SIB endpoint port you noted in the prerequisites.

    If your client and server are not co-located, make sure that your providerEndpointHost is the fully qualified hostname of your server.

    Example script excerpt:

    # User defined variables, edit these as needed to match your application server profile
    nodeName = "localhostNode01"
    serverName = "server1"
    providerEndpointPort = "7276"
    providerEndpointHost = "localhost"
  2. From the <SCA_SAMPLE_HOME>\jms directory, run following command:

    <WAS_HOME>\profiles\<PROFILE_NAME>\bin\wsadmin -f resources.py -lang jython
    IMPORTANT: The server must be started for the script to run. The script only needs to be run once, and will fail if attempting to create a resource that already exists.
  3. Example command:

    cd <SCA_SAMPLE_HOME>\jms
    C:\WebSphere\AppServer\profiles\AppSrv01\bin\wsadmin -f resources.py -lang jython

    If you have security enabled in your server, you must also supply wsadmin with a user name and password, either interactively or via command line parameters -username and -password.

    C:\WebSphere\AppServer\profiles\AppSrv01\bin\wsadmin -f resources.py -lang jython -username admin -password adminpwd
  4. Restart the application server. This is required to start the messaging engine.

  5. Proceed to the Install section, step 2.

Create resources manually

  1. In a Web browser, navigate to http://localhost:9060/admin and login to the administrative console with your user ID and password.
  2. Create a Service Integration Bus
    1. Click Service integration > Buses.
    2. Click New to create a new bus.
    3. Leave the Bus security box unchecked. The Samples demonstrate only basic use of the binding without security enabled. Enabling security will cause the Samples to fail.
    4. Enter a name for the bus; for example: SCA.sample.bus.
    5. Click Next until the end and then click Finish.
    6. Click Save.
  3. Add server as a bus member.
    1. Click Service integration > Buses.
    2. Select the bus name you created in step 4; for example: SCA.sample.bus.
    3. Click Bus members under the topology section.
    4. Click Add.
    5. Select Server and choose a server from the drop-down list.
    6. Click Next on each panel until you get to the Summary page. Click Finish to accept all default values.

      Steps 6-12 are specific to the TwoWay Sample. If you only want to run TwoWay-OneWay or TwoWay-OneWay-Callback Sample, refer to step 14 for the correct resource names.
  4. Create queue destination in Service Integration Bus for requests.
    1. Click Service integration > Buses.
    2. Select the bus name you created; for example: SCA.sample.bus.
    3. Click Destinations under the Destination Resources section.
    4. Click New. Select the destination type as Queue. Click Next.
    5. In the Identifier field, enter SCA_TwoWaySample_Request. Click Next.
    6. Select the bus member you added in step 5; for example: localhostNode01:server1.
    7. Click Next and Finish.
    8. Click Save.
  5. Create queue destination in Service Integration Bus for responses.
    1. Click Service integration > Buses.
    2. Select the bus name you previously created; for example: SCA.sample.bus.
    3. Click Destinations under the Destination Resources section.
    4. Click on New. Select the destination type as Queue. Click Next.
    5. In the Identifier field, enter SCA_TwoWaySample_Response. Click Next.
    6. Select the bus member you added in step 5; for example: localhostNode01:server1.
    7. Click Next and Finish.
    8. Click Save.
  6. Create a JMS connection factory
    1. Click Resources > JMS > Connection factories.
    2. Select a scope from the drop-down list. For example: Node=localhostNode01, Server=server1. Click New.
    3. Select Default messaging provider and click OK.
    4. In the Name field, enter SCA_TwoWaySample_CF.
    5. In the JNDI name field, enter jms/SCA_TwoWaySample_CF.
    6. In Bus name, select the bus created in step 5; for example: SCA.sample.bus.
    7. If you are using non-default ports or a server and client in different locations fill in the Provider endpoints field with your server hostname and SIB endpoint port in the form hostname:port:BootstrapBasicMessaging (e.g. Merlin:7276:BootstrapBasicMessaging).
    8. Click OK and click Save to save your changes.
  7. Create a JMS request queue
    1. Click Resources > JMS > Queues.
    2. Select a scope from the drop-down list; for example: Node=localhostNode01, Server=server1. Click New.
    3. Select Default messaging provider and click OK.
    4. In the Name field, enter SCA_TwoWaySample_Request.
    5. In the JNDI name field, enter jms/SCA_TwoWaySample_Request.
    6. In Bus name, select the bus created in step 4; for example: SCA.sample.bus.
    7. In Queue name, select the Service Integration Bus queue name you previously created, SCA_TwoWaySample_Request.
    8. Click OK and click Save to save your changes.
  8. Create a JMS response queue
    1. Click Resources > JMS > Queues.
    2. Select a scope from the drop-down list; for example: Node=localhostNode01, Server=server1 to use the same scope. Click New.
    3. Select Default messaging provider and click OK.
    4. In the Name field, enter SCA_TwoWaySample_Response and in the JNDI name field, enter jms/SCA_TwoWaySample_Response.
    5. In Bus name, select the bus created in step 4; for example: SCA.sample.bus.
    6. In Queue name, select the Service Integration Bus queue name, SCA_TwoWaySample_Response.
    7. Click OK and click Save to save your changes.
  9. Create an activation specification
    1. Click Resources > JMS > Activation specifications.
    2. Select a scope from the drop-down list; for example: Node=localhostNode01, Server=server1 to use the same scope. Click New.
    3. Select Default messaging provider and click OK.
    4. In the Name field, enter SCA_TwoWaySample_AS.
    5. In the JNDI name field, enter jms/SCA_TwoWaySample_AS.
    6. In Destination type, select Queue.
    7. In the Destination JNDI name field, enter jms/SCA_TwoWaySample_Request.
    8. In Bus name, select the bus you created; for example: SCA.sample.bus
    9. Click Apply and click Save to save your changes.
  10. Restart the application server. This is required to start the messaging engine.
  11. For the remaining Samples, repeat the set of previous steps starting with step 6. You only need to create the service integration bus and member one time. Remember to restart the application server after you complete the steps.
    1. TwoWay-OneWay needs the following resources:
      • Service integration bus queue destination SCA_TwoWay-OneWaySample_Request as in step 6.
      • Service integration bus queue destination SCA_TwoWay-OneWaySample_Response as in step 6.
      • Service integration bus queue destination SCA_TwoWay-OneWaySample_Log_Request as in step 6.
      • Connection factory SCA_TwoWay-OneWaySample_CF, JNDI name jms/SCA_TwoWay-OneWaySample_CF as in step 8.
      • Request queue SCA_TwoWay-OneWaySample_Request, JNDI name jms/SCA_TwoWay-OneWaySample_Request as in step 10.
      • Response queue SCA_TwoWay-OneWaySample_Response, JNDI name jms/SCA_TwoWay-OneWaySample_Response as in step 10.
      • Logging request queue SCA_TwoWay-OneWaySample_Log_Request, JNDI name jms/SCA_TwoWay-OneWaySample_Log_Request as in step 10.
      • Activation specification SCA_TwoWay-OneWaySample_AS, JNDI name jms/SCA_TwoWay-OneWaySample_AS, destination JNDI jms/SCA_TwoWay-OneWaySample_Request as in step 12.
      • Activation specification SCA_TwoWay-OneWaySample_Log_AS, JNDI name jms/SCA_TwoWay-OneWaySample_Log_AS, destination JNDI jms/SCA_TwoWay-OneWaySample_Log_Request as in step 12.
    2. TwoWay-OneWay-Callback needs the following resources:
      • Service integration bus queue destination SCA_CallbackSample_Request as in step 6.
      • Service integration bus queue destination SCA_CallbackSample_Response as in step 6.
      • Service integration bus queue destination SCA_CallbackSample_Log_Request as in step 6.
      • Service integration bus queue destination SCA_CallbackSample_Log_Callback as in step 6.
      • Connection factory SCA_CallbackSample_CF, JNDI name jms/SCA_CallbackSample_CF as in step 8.
      • Request queue SCA_CallbackSample_Request, JNDI name jms/SCA_CallbackSample_Request as in step 10.
      • Response queue SCA_CallbackSample_Response, JNDI name jms/SCA_CallbackSample_Response as in step 10.
      • Logging request queue SCA_CallbackSample_Log_Request, JNDI name jms/SCA_CallbackSample_Log_Request as in step 10.
      • Logging callback queue SCA_CallbackSample_Log_Callback, JNDI name jms/SCA_CallbackSample_Log_Callback as in step 10.
      • Activation specification SCA_CallbackSample_AS, JNDI name jms/SCA_CallbackSample_AS, destination JNDI jms/SCA_CallbackSample_Request as in step 12.
      • Activation specification SCA_CallbackSample_Log_AS, JNDI name jms/SCA_CallbackSample_Log_AS, destination JNDI jms/SCA_CallbackSample_Log_Request as in step 12.
      • Activation specification SCA_CallbackSample_Log_Callback_AS, JNDI name jms/SCA_CallbackSample_Log_Callback_AS, destination JNDI jms/SCA_CallbackSample_Log_Callback as in step 12.

Install

Install Icon <

Automated install: To quickly and easily install this sample and bypass the manual steps following, you can use the automated install. Run the following command from the JMS sample directory:

<WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant install
<WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant start

NOTE: If the default port number for SOAP is not 8880 for your application server profile, please update the SOAP port number value in <SCA_SAMPLE_HOME>\common\manage-app.xml to match your profile.

Manual install

  1. Start the WebSphere Application Server.
    1. Open a command window and enter the following command:

      cd <WAS_HOME>\profiles\<PROFILE_NAME>\bin

      Example command:

      cd C:\WebSphere\AppServer\profiles\AppSrv01\bin
    2. Issue the startServer command

      startServer server1
  2. Use the administrative console to import the jms-twoway-service.jar file.
    1. In a Web browser on the same machine as the Application Server, navigate to http://localhost:9060/admin and login to the administrative console with your user ID and password.
    2. Click Applications > Application Types > Assets.
    3. Click the Import button. Browse to the <SCA_SAMPLE_HOME>\jms\target directory and select the jms-twoway-service.jar file. Click Next using all the default settings until you reach the summary page and click Finish.
    4. Click Save.
  3. Use the administrative console to create the Business-level Applications to run the SCA composites.
    1. Click Applications > Application Types > Business-level Applications and click on New.
    2. Enter TwoWay for the name field and click Apply.
    3. Click Save.
    4. Click Applications > Application Types >Business-level Applications > TwoWay.
    5. Under Deployed Assets, click on Add and select Add Asset. Select jms-twoway-service.jar and click Continue.
    6. Click Next until the last panel and then click Finish.
    7. Click Save.
    8. Click Applications > Application Types > Business-level Applications. Select the TwoWay checkbox and click on Start.
  4. For the remaining Samples, repeat the previous steps 2 and 3, but substitute the BLA and JAR file names corresponding to each Sample.
    1. TwoWay-drc: jms-twoway-service-drc.jar
    2. TwoWay-OneWay: jms-twoway-oneway-service.jar
    3. TwoWay-OneWay-Callback: jms-callback-service.jar

Running

Run Icon
  1. Open a command window.
  2. Go to the JMS client directory <SCA_SAMPLE_HOME>\jms\thinClient.

  3. Run the following command: <WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant.sh <sample-to-run>

    Where sample-to-run is one of:

    runTwoWay
    runDRC
    runTwoWay-OneWay
    runTwoWay-OneWay-Callback

    For example:

    C:\WebSphere\AppServer\bin\ws_ant.sh runTwoWay-OneWay
    
    • (optional) You can use Java to run the thinClient JAR file directly, and specify the Sample name as a command line parameter.

      You must add the following WebSphere Application Server thin clients to the classpath manually:

      • <WAS_HOME>/runtimes/com.ibm.ws.sib.client.thin.jms_8.5.0.jar
      • <WAS_HOME>/runtimes/com.ibm.ws.ejb.thinclient_8.5.0.jar.

      Example optional command (in thinClient/target directory):

      java -cp jms-client.jar:/opt/IBM/WebSphere/AppServer/runtimes/com.ibm.ws.sib.client.thin.jms_8.5.0.jar:/opt/IBM/WebSphere/AppServer/runtimes/com.ibm.ws.ejb.thinclient_8.5.0.jar soa.sca.samples.jms.HelloJMS <sample-to-run>

      Valid sample-to-run values are listed above. Invalid arguments will result in the client failing as it accesses non-existent queues.

  4. The following illustrates example results:

    [java] HelloJMS - start
    [java] Running against sample TwoWay-OneWay
    [java] Setting up
    [java] Loaded system properties
    [java] Loaded properties from jms.properties:
    [java]   INITIAL_CONTEXT_FACTORY = com.ibm.websphere.naming.WsnInitialContextFactory
    [java]   TIMEOUT = 10000
    [java]   BOOTSTRAP_PORT = 2809
    [java]   JMS_HOST = localhost
    [java]   PROVIDER_URL = iiop://localhost:2809/
    [java] Added jms.properties to system properties
    [java] Created new JMSProducer with icf "com.ibm.websphere.naming.WsnInitialContextFactory" and connection factory "jms/SCA_TwoWay-OneWaySample_CF"
    [java] Created new JMSConsumer with icf "com.ibm.websphere.naming.WsnInitialContextFactory" and connection factory "jms/SCA_TwoWay-OneWaySample_CF"
    [java] testGreetings creating object message...
    [java] Producer getting new initial context using: com.ibm.websphere.naming.WsnInitialContextFactory, provider url: iiop://localhost:2809
    [java]   got new initial context
    [java] Producer looking up connection factory...
    [java]   got connection factory
    [java] Producer creating connection...
    [java]   connection created
    [java] Producer starting connection...
    [java]   connection started
    [java] Producer creating new session...
    [java]   session created
    [java] Producer creating object message...
    [java]   got object message
    [java] testGreetings setting message props...
    [java] testGreetings sending message...
    [java] Producer looking up destination...
    [java]   found destination
    [java] testGreetings waiting 5 seconds for response...
    [java] testGreetings receiving message...
    [java] Consumer getting new initial context using: com.ibm.websphere.naming.WsnInitialContextFactory, provider url: iiop://localhost:2809
    [java]   got new initial context
    [java] Consumer looking up connection factory...
    [java]   got connection factory
    [java] Consumer creating connection...
    [java]   connection created
    [java] Consumer starting connection...
    [java]   connection started
    [java] Consumer creating new session...
    [java]   session created
    [java] Consumer lookup in destination...
    [java]   found destination
    [java] Consumer receiving message...
    [java]   received message
    [java] testGreetings checking response...
    [java] Message content is a String: "TwoWay-OneWay Hello testGreetings: jms/SCA_TwoWay-OneWaySample_Request; check server SystemOut for logging messages"
    [java]     ** SUCCESS **
    [java] Producer closing connection...
    [java] Consumer closing connection...
    [java] HelloJMS - end
    
    BUILD SUCCESSFUL

    The previous output shows every step the client takes to send a message to the request queue for the Sample and receive a response message back. By receiving the ** SUCCESS ** result this indicates that the sample worked and a response was received. If there was a problem, instead a "no response message received" result is provided or a stack trace. If this occurs, first try restarting the server, and verify in the administrative console that the BLAs are installed and started, and that the resources are created properly. Simply trying to run the Sample again might also work, if the problem is a timing issue due to server load or slow performance.

Uninstall

Uninstall Icon

Automated uninstall: To quickly and easily uninstall this sample and bypass the manual steps following, you can use the automated uninstall. Run the following command from the JMS sample directory:

<WAS_HOME>\profiles\<PROFILE_NAME>\bin\ws_ant uninstall

Manual uninstall

  1. When you are finished with the Samples, you can remove the JMS resources by running the resourcescleanup.py script. (Run the removeDynamicRes.py script if you choose to use dynamically created resources). These scripts return your environment to its pre-sample state. They can also be used if you are having trouble getting manually created resources to work, so you can start over and run the resource creation script instead.

    You must still remove the Sample applications (BLA's) manually.

    These script remove the service integration bus (SCA.sample.bus for manual or resource.py created resources, or DefaultSCABus if DRC was used.) Any messages remaining on queues will also be deleted

    1. Edit the resourcescleanup.py file at <SCA_SAMPLE_HOME>\jms\resourcescleanup.py to contain the correct node name and server name values as determined in prerequisite step 3.

      Example script excerpt:

      # User defined values, change to match your application server installation
      nodeName = "localhostNode01"
      serverName = "server1"
    2. Open a command window and enter the following command:

      cd <WAS_HOME>\profiles\<PROFILE_NAME>\bin

      For example:

      cd C:\WebSphere\AppServer\profiles\AppSrv01\bin
    3. Enter the startServer command.

      For example:

      startServer server1
    4. Run the resourcescleanup.py script.

      Example command:

      cd <SCA_SAMPLE_HOME>\jms
      C:\WebSphere\AppServer\profiles\AppSrv01\bin\wsadmin -f resourcescleanup.py

      If you have security enabled in your server, you will also need to supply wsadmin with a user name and password, either interactively or using the command line parameters -username and -password.

      Example command:

      C:\WebSphere\AppServer\profiles\AppSrv01\bin\wsadmin -f resourcescleanup.py -username admin -password adminpwd

Uninstall BLAs

  1. From the left navigation panel of the Administrative console, expand Applications then Application Types and select Business-level Applications. You should see three JMS related BLAs on this page, TwoWay, TwoWay-OneWay, and TwoWay-OneWay-Callback. Click on TwoWay. Under Deployed assets check all the non Shared Library assets and click delete. These assets are usually marked as "asset" under the Type column.
  2. After the non shared library assets are removed, select all the shared library assets that are left under Deployed assets and delete them. Once all the assets are removed, click on the Save link at the top of the screen.
  3. Expand Applications then Application Types and select Business-level Applications. Select TwoWay and click on delete and then click the Save link at the top of the screen.
  4. Expand Applications then Application Types and select Business-level Applications and repeat the above steps with the TwoWay-OneWay and TwoWay-OneWay-Callback.

User's Guide

Please see the run section which describes how to use the sample. This sample does not have extensive useage scenarios. It is intended as a series of technology samples which expose typical JMS binding useage.