-
1. Re: browsing messages in queue
chinnu76 Sep 6, 2005 11:31 AM (in response to tomerbd2)Try this code it will work:
public void browseQ() throws JMSException {
QueueConnection queueConnection = null;
QueueSession queueSession = null;
QueueBrowser queueBrowser=null;
queueConnection = QueueConnectionFactory.getInstance().getQueueConnection(channelName, hostName, queueManagerName);
queueConnection.start();
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue responseQueue = QueueFactory.getInstance().getResponseQueue(queueSession, responseQueueName);
queueBrowser=queueSession.createBrowser(responseQueue);
Enumeration enumer=queueBrowser.getEnumeration();
while (enumer.hasMoreElements())
System.out.print(enumer.nextElement()+" ");
} -
2. Re: browsing messages in queue
tomerbd2 Sep 6, 2005 1:04 PM (in response to tomerbd2)Hi
What is this QueueFactory is it from jacorb.jar ? (in that jar there was such a class with no getInstance() method...)
Thanks -
3. Re: browsing messages in queue
tomerbd2 Sep 19, 2005 7:30 AM (in response to tomerbd2)If i cancel / remove my queue receiver then i can see the messages in queuebrowser. My question is regarding the following scenario:
1. I have a queue sender and a receiver
2. I configure my sender to send more messages than the receiver can accept at any point of time
3. I see that the JMS_MESSAGES table is getting filled with more and more messages more than the receiver can process
4. I dont see any messages in the queueBrowser... Why is that?
(Note that if i cancel the receiver work totally - which is an MDB then i do see the messages in the queuebrowser) -
4. Re: browsing messages in queue
tomerbd2 Sep 20, 2005 3:12 AM (in response to tomerbd2)ok its because there are parellal mdb receivers.