类 DefaultJmsActivationSpecFactory
- java.lang.Object
- org.springframework.jms.listener.endpoint.StandardJmsActivationSpecFactory
- org.springframework.jms.listener.endpoint.DefaultJmsActivationSpecFactory
- 所有已实现的接口:
JmsActivationSpecFactory
public class DefaultJmsActivationSpecFactory extends StandardJmsActivationSpecFactory
Default implementation of theJmsActivationSpecFactory
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!
- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller
- 另请参阅:
StandardJmsActivationSpecFactory.setActivationSpecClass(java.lang.Class<?>)
构造器概要
构造器 构造器 说明 DefaultJmsActivationSpecFactory()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
applyAcknowledgeMode(BeanWrapper bw, int ackMode)
This implementation mapsSESSION_TRANSACTED
onto an ActivationSpec property named "useRAManagedTransaction", if available (following ActiveMQ's naming conventions).protected Class<?>
determineActivationSpecClass(ResourceAdapter adapter)
This implementation guesses the ActivationSpec class name from the provider's class name: e.g.protected void
populateActivationSpecProperties(BeanWrapper bw, JmsActivationSpecConfig config)
This implementation supports Spring's extended "maxConcurrency" and "prefetchSize" settings through detecting corresponding ActivationSpec properties: "maxSessions"/"maxNumberOfWorks" and "maxMessagesPerSessions"/"maxMessages", respectively (following ActiveMQ's and JORAM's naming conventions).从类继承的方法 org.springframework.jms.listener.endpoint.StandardJmsActivationSpecFactory
createActivationSpec, getDestinationResolver, setActivationSpecClass, setDefaultProperties, setDestinationResolver
构造器详细资料
DefaultJmsActivationSpecFactory
public DefaultJmsActivationSpecFactory()
方法详细资料
determineActivationSpecClass
protected Class<?> determineActivationSpecClass(ResourceAdapter adapter)
This implementation guesses the ActivationSpec class name from the provider's class name: e.g. "ActiveMQResourceAdapter" -> "ActiveMQActivationSpec" in the same package, or a class named "ActivationSpecImpl" in the same package as the ResourceAdapter class.- 覆盖:
determineActivationSpecClass
在类中StandardJmsActivationSpecFactory
- 参数:
adapter
- the ResourceAdapter to check- 返回:
- the corresponding ActivationSpec class, or
null
if not determinable - 另请参阅:
StandardJmsActivationSpecFactory.setActivationSpecClass(java.lang.Class<?>)
populateActivationSpecProperties
protected void populateActivationSpecProperties(BeanWrapper bw, JmsActivationSpecConfig config)
This implementation supports Spring's extended "maxConcurrency" and "prefetchSize" settings through detecting corresponding ActivationSpec properties: "maxSessions"/"maxNumberOfWorks" and "maxMessagesPerSessions"/"maxMessages", respectively (following ActiveMQ's and JORAM's naming conventions).- 覆盖:
populateActivationSpecProperties
在类中StandardJmsActivationSpecFactory
- 参数:
bw
- the BeanWrapper wrapping the ActivationSpec objectconfig
- the configured object holding common JMS settings
applyAcknowledgeMode
protected void applyAcknowledgeMode(BeanWrapper bw, int ackMode)
This implementation mapsSESSION_TRANSACTED
onto an ActivationSpec property named "useRAManagedTransaction", if available (following ActiveMQ's naming conventions).- 覆盖:
applyAcknowledgeMode
在类中StandardJmsActivationSpecFactory
- 参数:
bw
- the BeanWrapper wrapping the ActivationSpec objectackMode
- the configured acknowledge mode (according to the constants inSession
- 另请参阅:
Session.AUTO_ACKNOWLEDGE
,Session.DUPS_OK_ACKNOWLEDGE
,Session.CLIENT_ACKNOWLEDGE
,Session.SESSION_TRANSACTED