[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - queue-message-redistribution minor change

gaohoward do-not-reply at jboss.com
Fri Apr 24 01:42:23 EDT 2009


I got NullPointerException when run all examples together. The problem lies between
line 146 -- line 151:
         
         for (int i = 0; i < numMessages; i += 2)
         {
            message0 = (TextMessage)consumer0.receive(5000); //--> possible got null message due to time delay over 5 sec.

            System.out.println("Got message: " + message0.getText() + " from node 0"); //--> NPE           
         }

So I will change the receive(5000) to receive().


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226450#4226450

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226450



More information about the jboss-dev-forums mailing list