This illustration shows the use case Two Ways to Specify a Message Listener of the class Session in the JMS Operational Interface.

NOTE: Of the two ways to specify a message listener, this is the alternative referred to as "b."

The method used is setMessageListener, at the session.

To specify a Message Listener, you must specify a Message Listener.