open class DefaultJmsActivationSpecFactory : StandardJmsActivationSpecFactory
Default implementation of the JmsActivationSpecFactory interface. Supports the standard JMS properties as defined by the JCA 1.5 specification, as well as Spring's extended "maxConcurrency" and "prefetchSize" settings through autodetection of well-known vendor-specific provider properties.
An ActivationSpec factory is effectively dependent on the concrete JMS provider, e.g. on ActiveMQ. This default implementation simply guesses the ActivationSpec class name from the provider's class name ("ActiveMQResourceAdapter" -> "ActiveMQActivationSpec" in the same package, or "ActivationSpecImpl" in the same package as the ResourceAdapter class), and populates the ActivationSpec properties as suggested by the JCA 1.5 specification (Appendix B). Specify the 'activationSpecClass' property explicitly if these default naming rules do not apply.
Note: ActiveMQ, JORAM and WebSphere are supported in terms of extended settings (through the detection of their bean property naming conventions). The default ActivationSpec class detection rules may apply to other JMS providers as well.
Thanks to Agim Emruli and Laurie Chan for pointing out WebSphere MQ settings and contributing corresponding tests!
Author
Juergen Hoeller
Since
2.5
See Also
#setActivationSpecClass
DefaultJmsActivationSpecFactory()
Default implementation of the JmsActivationSpecFactory interface. Supports the standard JMS properties as defined by the JCA 1.5 specification, as well as Spring's extended "maxConcurrency" and "prefetchSize" settings through autodetection of well-known vendor-specific provider properties. An ActivationSpec factory is effectively dependent on the concrete JMS provider, e.g. on ActiveMQ. This default implementation simply guesses the ActivationSpec class name from the provider's class name ("ActiveMQResourceAdapter" -> "ActiveMQActivationSpec" in the same package, or "ActivationSpecImpl" in the same package as the ResourceAdapter class), and populates the ActivationSpec properties as suggested by the JCA 1.5 specification (Appendix B). Specify the 'activationSpecClass' property explicitly if these default naming rules do not apply. Note: ActiveMQ, JORAM and WebSphere are supported in terms of extended settings (through the detection of their bean property naming conventions). The default ActivationSpec class detection rules may apply to other JMS providers as well. Thanks to Agim Emruli and Laurie Chan for pointing out WebSphere MQ settings and contributing corresponding tests! |
open fun createActivationSpec(adapter: ResourceAdapter, config: JmsActivationSpecConfig): ActivationSpec |
|
open fun getDestinationResolver(): DestinationResolver
Return the DestinationResolver to use for resolving destinations names. |
|
open fun setActivationSpecClass(activationSpecClass: Class<*>): Unit
Specify the fully-qualified ActivationSpec class name for the target provider (e.g. "org.apache.activemq.ra.ActiveMQActivationSpec"). |
|
open fun setDefaultProperties(defaultProperties: MutableMap<String, String>): Unit
Specify custom default properties, with String keys and String values. Applied to each ActivationSpec object before it gets populated with listener-specific settings. Allows for configuring vendor-specific properties beyond the Spring-defined settings in JmsActivationSpecConfig. |
|
open fun setDestinationResolver(destinationResolver: DestinationResolver): Unit
Set the DestinationResolver to use for resolving destination names into the JCA 1.5 ActivationSpec "destination" property. If not specified, destination names will simply be passed in as Strings. If specified, destination names will be resolved into Destination objects first. Note that a DestinationResolver for use with this factory must be able to work without an active JMS Session: e.g. org.springframework.jms.support.destination.JndiDestinationResolver or org.springframework.jms.support.destination.BeanFactoryDestinationResolver but not org.springframework.jms.support.destination.DynamicDestinationResolver. |