com.bea.wlpi.client.util
Class JMSTest

java.lang.Object
  |
  +--com.bea.wlpi.client.util.JMSTest

public class JMSTest
extends java.lang.Object
implements javax.jms.MessageListener

A JMS test utility that can publish or subscribe to a JMS topic. Useful when developing and testing workflow triggers and integration with external systems using JMS.

Author:
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.

Method Summary
static void main(java.lang.String[] args)
          Main entry point when executed as a standalone application.
 void onMessage(javax.jms.Message msg)
          Implements the javax.jms.MessageListener interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
Main entry point when executed as a standalone application. The utility uses the default WebLogic JNDI initial context factory weblogic.jndi.WLInitialContextFactory and JMS topic connection factory javax.jms.TopicConnectionFactory.

Parameters:
args - Command-line arguments, interpreted as follows:
args[0] "publish" or "subscribe".
args[1] JNDI name for JMS topic to which to connect.
args[2] URL of application server hosting JMS. Optional: defaults to "t3://localhost:7001".

onMessage

public void onMessage(javax.jms.Message msg)
Implements the javax.jms.MessageListener interface. The method prints all header field values, followed by the message body.
Specified by:
onMessage in interface javax.jms.MessageListener

Parameters:
msg - JMS message received.