All Examples  This Package  JMS Examples

Class examples.jms.queue.QueueReceive

examples.jms.queue.QueueReceive

public class QueueReceive
This example shows how to establish a connection to a JMS queue and receive messages from a queue. The classes in this package operate on the same JMS queue. Run the classes together to witness messages being sent and received and to browse the queue for messages. This class is used to receive and remove messages from the queue.

Author:
Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

Variable Index

 o JMS_FACTORY
 o JNDI_FACTORY
 o QUEUE

Constructor Index

 o QueueReceive()

Method Index

 o close()
Close JMS objects.
 o init(Context, String)
Create all the necessary objects for receiving messages from a JMS queue.
 o main(String[])
 o onMessage(Message)

Variables

 o JNDI_FACTORY
 public static final String JNDI_FACTORY
 o JMS_FACTORY
 public static final String JMS_FACTORY
 o QUEUE
 public static final String QUEUE

Constructors

 o QueueReceive
 public QueueReceive()

Methods

 o onMessage
 public void onMessage(Message msg)
 o init
 public void init(Context ctx,
                  String queueName) throws NamingException, JMSException
Create all the necessary objects for receiving messages from a JMS queue.

 o close
 public void close() throws JMSException
Close JMS objects.

 o main
 public static void main(String args[]) throws Exception

All Examples  This Package  JMS Examples