If I set a MessageListener object for a MessageConsumer, and then call receive() on that consumer, what will happen? Will the provider give the message to receive(), or will it continue to be blocked while the message is processed by the MessageListener object?
If I set a MessageListener object for a MessageConsumer , and then call receive()
Share
You will get an exception, as a Session must be in either asynchronous or synchronous modes. From 4.4.6 of the JMS specification