Reputation: 42957
I am studying how Spring framework handle JMS and I have the following doubt related this question founded on my study material.
Consider the following JMS configuration defined into a Spring application:
<jms:listener-container connetionFactory="connectionFactory">
<jms:listener-destination="order.queue" ref="orderListener" method="order" />
</jms:listener-container>
What exactly does this configuration?
Now I know that a JMS connection is tipically obtained from a factory, so I think that it is configuring the factory that give me my JMS connection (is it right?)
But what exactly specify this line?:
<jms:listener-destination="order.queue" ref="orderListener" method="order" />
Tnx
Upvotes: 0
Views: 274
Reputation:
That would be a Message-driven Bean-like in the plain Java EE world. Have a look here. By the way, the attribute is destination="queue.name"
; there is no such a thing like <jms:listener-destination="order.queue"...
ref
points to a MessageListener
or Spring SessionAwareMessageListener
, this attribute may be omitted (this is why the latter two must implements the onMessage
method, and by convention this will be called)Upvotes: 1