FileDocCategorySizeDatePackage
MyMessageHandler.javaAPI DocExample573Mon Nov 24 09:52:42 GMT 2003com.oreilly.patterns.chapter11

MyMessageHandler

public class MyMessageHandler extends Object implements javax.jms.MessageListener

Fields Summary
Constructors Summary
Methods Summary
public voidonMessage(javax.jms.Message message)

          TextMessage msg = (TextMessage)message;
          try { 
            System.out.println("Message Received:" + msg.getText()); 
          } catch (JMSException e) {
            System.out.println(e.getMessage());
          }