org.springframework.jms.listener.endpoint

## Class JmsActivationSpecConfig

- java.lang.Object
- - org.springframework.jms.listener.endpoint.JmsActivationSpecConfig

Direct Known Subclasses:
  DefaultJcaListenerContainerFactory

    public class JmsActivationSpecConfig
    extends Object

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.

Since:
  2.5
Author:
  Juergen Hoeller, Stephane Nicoll
See Also:
  `JmsActivationSpecFactory`, `JmsMessageEndpointManager.setActivationSpecConfig(org.springframework.jms.listener.endpoint.JmsActivationSpecConfig)`, `ResourceAdapter.endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)`

### Constructor Summary

Constructors
Constructor and Description
`JmsActivationSpecConfig()`

### Method Summary

All Methods Instance Methods Concrete 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.
`MessageConverter` `getMessageConverter()` Return the `MessageConverter` to use, if any.
`String` `getMessageSelector()`
`int` `getPrefetchSize()` Return the maximum number of messages to load into a session.
`QosSettings` `getReplyQosSettings()`
`String` `getSubscriptionName()`
`boolean` `isPubSubDomain()`
`boolean` `isReplyPubSubDomain()`
`boolean` `isSubscriptionDurable()`
`boolean` `isSubscriptionShared()`
`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` `setMessageConverter(MessageConverter messageConverter)` Set the `MessageConverter` strategy for converting JMS Messages.
`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` `setReplyPubSubDomain(boolean replyPubSubDomain)`
`void` `setReplyQosSettings(QosSettings replyQosSettings)`
`void` `setSubscriptionDurable(boolean subscriptionDurable)`
`void` `setSubscriptionName(String subscriptionName)`
`void` `setSubscriptionShared(boolean subscriptionShared)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### JmsActivationSpecConfig

    public JmsActivationSpecConfig()

### Method Detail

#### setDestinationName

    public void setDestinationName(@Nullable
                                   String destinationName)

#### getDestinationName

    @Nullable
    public String getDestinationName()

#### setPubSubDomain

    public void setPubSubDomain(boolean pubSubDomain)

#### isPubSubDomain

    public boolean isPubSubDomain()

#### setReplyPubSubDomain

    public void setReplyPubSubDomain(boolean replyPubSubDomain)

#### isReplyPubSubDomain

    public boolean isReplyPubSubDomain()

#### setReplyQosSettings

    public void setReplyQosSettings(@Nullable
                                    QosSettings replyQosSettings)

#### getReplyQosSettings

    @Nullable
    public QosSettings getReplyQosSettings()

#### setSubscriptionDurable

    public void setSubscriptionDurable(boolean subscriptionDurable)

#### isSubscriptionDurable

    public boolean isSubscriptionDurable()

#### setSubscriptionShared

    public void setSubscriptionShared(boolean subscriptionShared)

#### isSubscriptionShared

    public boolean isSubscriptionShared()

#### setSubscriptionName

    public void setSubscriptionName(@Nullable
                                    String subscriptionName)

#### getSubscriptionName

    @Nullable
    public String getSubscriptionName()

#### setDurableSubscriptionName

    public void setDurableSubscriptionName(@Nullable
                                           String durableSubscriptionName)

#### getDurableSubscriptionName

    @Nullable
    public String getDurableSubscriptionName()

#### setClientId

    public void setClientId(@Nullable
                            String clientId)

#### getClientId

    @Nullable
    public String getClientId()

#### setMessageSelector

    public void setMessageSelector(@Nullable
                                   String messageSelector)

#### getMessageSelector

    @Nullable
    public String getMessageSelector()

#### setAcknowledgeModeName

    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:
  `Session.AUTO_ACKNOWLEDGE`, `Session.CLIENT_ACKNOWLEDGE`, `Session.DUPS_OK_ACKNOWLEDGE`, `Session.SESSION_TRANSACTED`, `StandardJmsActivationSpecFactory`, `DefaultJmsActivationSpecFactory`

#### setAcknowledgeMode

    public void setAcknowledgeMode(int acknowledgeMode)

Set the JMS acknowledgement mode to use.

See Also:
  `Session.AUTO_ACKNOWLEDGE`, `Session.CLIENT_ACKNOWLEDGE`, `Session.DUPS_OK_ACKNOWLEDGE`, `Session.SESSION_TRANSACTED`

#### getAcknowledgeMode

    public int getAcknowledgeMode()

Return the JMS acknowledgement mode to use.

#### setConcurrency

    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.

#### setMaxConcurrency

    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.

#### getMaxConcurrency

    public int getMaxConcurrency()

Return the maximum number of consumers/sessions to use.

#### setPrefetchSize

    public void setPrefetchSize(int prefetchSize)

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

#### getPrefetchSize

    public int getPrefetchSize()

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

#### setMessageConverter

    public void setMessageConverter(@Nullable
                                    MessageConverter messageConverter)

Set the `MessageConverter` strategy for converting JMS Messages.

Parameters:
  `messageConverter` - the message converter to use

#### getMessageConverter

    @Nullable
    public MessageConverter getMessageConverter()

Return the `MessageConverter` to use, if any.