Default JmsListenerContainerFactory lookup
Prior to this commit, the default JmsListenerContainerFactory to use must be explicitly set. Since having a single container factory is a fairly common use case, we look up the default one automatically using the bean name "jmsListenerContainerFactory". It is still possible to provide an explicit default but since it refers more to "the" container factory to use, the parameter has been renamed to "containerFactory" which is shorter and more explicit. The lookup strategy is lazy: if all endpoints are providing an explicit container factory and no container factory with the "jmsListenerContainerFactory" bean name exists, no exception will be thrown. Issue : SPR-11706
This commit is contained in:
@@ -43,13 +43,15 @@
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="default-container-factory" type="xsd:string" use="optional">
|
||||
<xsd:attribute name="container-factory" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Specifies the default org.springframework.jms.config.JmsListenerContainerFactory instance to
|
||||
Specifies the org.springframework.jms.config.JmsListenerContainerFactory instance to
|
||||
use to create the container for a jms listener endpoint that does not define a specific
|
||||
factory. This permits in practice to omit the "containerFactory" attribute of the JmsListener
|
||||
annotation. If not provided, each endpoint must define the container factory to use.
|
||||
annotation. This attribute is not required as each endpoint may define the factory to use and,
|
||||
as a convenience, the JmsListenerContainerFactory with name 'jmsListenerContainerFactory' is
|
||||
looked up by default.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
|
||||
Reference in New Issue
Block a user