I am using MQSeries with JMS for asynchronous messaging. I am implimenting MessageListener interface and implimenting onMessage() method. when i don't put main thread on wait(), the listener is not invoking. if i put main thread in wait() then, onMessage() method is being called and consuming msgs. But in Asynchronous messaging, we should not put main thread in wait() isn't it??
Please let me know the solution how to impliment without wait() in main() method.