public class

JmsActivationSpecConfig

extends Object
java.lang.Object
   ↳ org.springframework.jms.listener.endpoint.JmsActivationSpecConfig

Class Overview

Common configuration object for activating a JMS message endpoint. Gets converted into a provider-specific JCA 1.5 ActivationSpec object for activating the endpoint.

Typically used in combination with JmsMessageEndpointManager, but not tied to it.

See Also

Summary

Public Constructors
JmsActivationSpecConfig()
Public Methods
int getAcknowledgeMode()
Return the JMS acknowledgement mode to use.
String getClientId()
String getDestinationName()
String getDurableSubscriptionName()
int getMaxConcurrency()
Return the maximum number of consumers/sessions to use.
String getMessageSelector()
int getPrefetchSize()
Return the maximum number of messages to load into a session.
boolean isPubSubDomain()
boolean isSubscriptionDurable()
void setAcknowledgeMode(int acknowledgeMode)
Set the JMS acknowledgement mode to use.
void setAcknowledgeModeName(String constantName)
Set the JMS acknowledgement mode by the name of the corresponding constant in the JMS Session interface, e.g.
void setClientId(String clientId)
void setConcurrency(String concurrency)
Specify concurrency limits via a "lower-upper" String, e.g.
void setDestinationName(String destinationName)
void setDurableSubscriptionName(String durableSubscriptionName)
void setMaxConcurrency(int maxConcurrency)
Specify the maximum number of consumers/sessions to use, effectively controlling the number of concurrent invocations on the target listener.
void setMessageSelector(String messageSelector)
void setPrefetchSize(int prefetchSize)
Specify the maximum number of messages to load into a session (a kind of batch size).
void setPubSubDomain(boolean pubSubDomain)
void setSubscriptionDurable(boolean subscriptionDurable)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JmsActivationSpecConfig ()

Public Methods

public int getAcknowledgeMode ()

Return the JMS acknowledgement mode to use.

public String getClientId ()

public String getDestinationName ()

public String getDurableSubscriptionName ()

public int getMaxConcurrency ()

Return the maximum number of consumers/sessions to use.

public String getMessageSelector ()

public int getPrefetchSize ()

Return the maximum number of messages to load into a session.

public boolean isPubSubDomain ()

public boolean isSubscriptionDurable ()

public void setAcknowledgeMode (int acknowledgeMode)

Set the JMS acknowledgement mode to use.

See Also
  • javax.jms.Session#AUTO_ACKNOWLEDGE
  • javax.jms.Session#CLIENT_ACKNOWLEDGE
  • javax.jms.Session#DUPS_OK_ACKNOWLEDGE
  • javax.jms.Session#SESSION_TRANSACTED

public void setAcknowledgeModeName (String constantName)

Set the JMS acknowledgement mode by the name of the corresponding constant in the JMS Session interface, e.g. "CLIENT_ACKNOWLEDGE".

Note that JCA resource adapters generally only support auto and dups-ok (see Spring's StandardJmsActivationSpecFactory). ActiveMQ also supports "SESSION_TRANSACTED" in the form of RA-managed transactions (automatically translated by Spring's DefaultJmsActivationSpecFactory.

Parameters
constantName the name of the Session acknowledge mode constant
See Also

public void setClientId (String clientId)

public void setConcurrency (String concurrency)

Specify concurrency limits via a "lower-upper" String, e.g. "5-10", or a simple upper limit String, e.g. "10".

JCA listener containers will always scale from zero to the given upper limit. A specified lower limit will effectively be ignored.

This property is primarily supported for configuration compatibility with DefaultMessageListenerContainer. For this activation config, generally use setMaxConcurrency(int) instead.

public void setDestinationName (String destinationName)

public void setDurableSubscriptionName (String durableSubscriptionName)

public void setMaxConcurrency (int maxConcurrency)

Specify the maximum number of consumers/sessions to use, effectively controlling the number of concurrent invocations on the target listener.

public void setMessageSelector (String messageSelector)

public void setPrefetchSize (int prefetchSize)

Specify the maximum number of messages to load into a session (a kind of batch size).

public void setPubSubDomain (boolean pubSubDomain)

public void setSubscriptionDurable (boolean subscriptionDurable)