Step 5: Verify the application

After the successful deployment of the message-driven beans sample application to your WebSphere Application Server instance, place a copy of the installed EAR file in your installableApps folder, and run the application on your iSeries server.

  1. Enter the Start Qshell (STRQSH) command on an OS/400 command line.

  2. To locate the installed EAR file, enter this command:

    cd /QIBM/UserData/WebAS5/Base/mdbconfig/installedApps/hostName_mdbconfig
    

    where hostName is the host name of your iSeries server.

  3. Copy the message-driven beans sample application EAR file to your installableApps directory. Enter this command:

    cp -R MDBSamples.ear /QIBM/UserData/WebAS5/Base/mdbconfig/installableApps

The successful deployment of the EAR file must be tested to make sure that all JMS resources have been correctly set up. Perform the following steps to run the application client on the iSeries server:

  1. Enter the Start Qshell (STRQSH) command on an OS/400 command line.

  2. Enter the following command to run the application client:

    
    /QIBM/ProdData/WebAS5/Base/bin/launchClient -instance mdbconfig
    /qibm/userdata/webas5/base/mdbconfig/installableApps/MDBSamples.ear
    -CCjar=PSSampleClient.jar -CCBootstrapPort=your_bootstrap_port
    -CCsoapConnectorPort=your_soap_port -verbose -topic news -msg 
    "Message Text"
    
    

    where your_bootstrap_port is the Name Service port of your WebSphere Application Server instance, and your_soap_port is the SOAP Connector port of your WebSphere Application Server instance.

    Note: Port numbers were assigned after you created your instance. To display the port numbers assigned to your instance, see Display instance properties.

The JMS client sends the message as described above and reports the progress. The output is similar to the following:


IBM WebSphere Application Server, Release 5.0
J2EE Application Client Tool
Copyright IBM Corp., 1997-2002
WSCL0012I: Processing command line arguments.
WSCL0013I: Initializing the J2EE Application Client Environment.
Attaching Java program to /tmp/WSTMPCC61074.tmp/PSSampleClient.JAR.
WSCL0035I: Initialization of the J2EE Application Client Environment has completed.
WSCL0014I: Invoking the Application Client 
class com.ibm.websphere.samples.messaging.pubsub.JMSpsSampleClient 
Topic:news.
Sending message: 'Message Text'
Retrieving a TopicConnectionFactory from JNDI
com.ibm.ws.client.applicationclient.ClientJMSTopicConnectionFactory
Retrieving Topic from JNDI
Creating a Connection
Created a Connection
Starting the Connection
Creating a Session 
Creating a TopicPublisher
Creating a TextMessage
Publish the message to topic://Sample/JMS/news?brokerVersion=1
Message ID is ID:c1d4d840e6c1e26dd3d7c1d9f2f4f7d43d624d980000d022
Closing TopicPublisher
Closing Session
Closing Connection
End of Sample                                                      
  $