Łukasz Rzeszotarski
Łukasz Rzeszotarski

Reputation: 6140

Can I inject something to jms:listener-container?

Can I inject some other bean to jms listener container defined using this tag:

<jms:listener-container connection-factory="connectionFactory">...</jms:listener-container>

?

Upvotes: 0

Views: 255

Answers (1)

Gary Russell
Gary Russell

Reputation: 174729

The <jms:listener-container/> is just a configuration convenience; it is not a bean in itself, it represents a set of attributes that will be applied to the child <jms:listener/> elements. Each listener gets its own listener container bean.

You can reference some other bean in the listener...

<jms:listener-container ... >
    <jms:listener destination="someQueue" ref="foo" />
</jms:listener-container>

Upvotes: 2

Related Questions