All Examples This Package JMS Examples
Class examples.jms.queue.QueueBrowse
examples.jms.queue.QueueBrowse
- public class QueueBrowse
This example shows how to establish a connection to a JMS
queue and browse (but not dequeue) the queued messages. 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 browse, but not remove, messages
in the queue.
- Author:
- Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
-
JMS_FACTORY
-
-
JNDI_FACTORY
-
-
QUEUE
-
-
QueueBrowse()
-
-
close()
- Close JMS objects.
-
displayQueue()
- Display the current contents of the queue.
-
init(Context, String)
- Create all the necessary objects for receiving
messages from a JMS queue.
-
main(String[])
-
JNDI_FACTORY
public static final String JNDI_FACTORY
JMS_FACTORY
public static final String JMS_FACTORY
QUEUE
public static final String QUEUE
QueueBrowse
public QueueBrowse()
init
public void init(Context ctx,
String queueName) throws NamingException, JMSException
- Create all the necessary objects for receiving
messages from a JMS queue.
displayQueue
public void displayQueue() throws JMSException
- Display the current contents of the queue.
close
public void close() throws JMSException
- Close JMS objects.
main
public static void main(String args[]) throws Exception
All Examples This Package JMS Examples