For asynchronous JMS consumers, the standard way of designing the consumer is:
1.Create a MessageConsumer
2.Create a MessageListener & implement onMessage()
3.Register the listener with the consumer
Now, in some examples on the net, the MessageListener class is implemented as a Runnable. Is this a good practice? there are 2 scenarios which I am thinking of:
1. Standalone MessageConsumer
2.MessageConsumer running inside a J2EE server.
Any help is greatly appreciated.