The following is a code snippet which works without error, but does not return any details
in the QueueBrowser, I cannot fathom out why this could be.
A number of messages get placed on the queue, and if I stick a debug breakpoint within the
onMessage process, I can see these persisted in the database, before process completion.
If I use the JMX console, the queue shows the correct number of items to be processed but
when executing the listAllMessages() method, this also returns an empty array.
Any clues as to what might be the problem or areas to look at would be appreciated.
Thanks
InitialContext ctx = PropertiesHelper.getInitialContext();
Queue queue = (Queue)ctx.lookup( "queue/calendarQueue" );
QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ctx.lookup(
"java:/JmsXA" );
QueueConnection connection = connectionFactory.createQueueConnection();
Session session = connection.createQueueSession( true, QueueSession.AUTO_ACKNOWLEDGE );
QueueBrowser queueBrowser = session.createBrowser( queue );
Enumeration queueEnumerator = queueBrowser.getEnumeration();
int number = Collections.list( queueEnumerator ).size();
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133146#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...