public class JMSTransportListener extends AbstractTransportListener
The JMS Transport listener
This is a transport listener which uses Spring JMS to fetch messages from a JMS destination into the ESB
See relevant Spring documentation from DefaultMessageListenerContainer
ConfigurationElement.State
logger, metrics, properties, serverName, transportName
Constructor and Description |
---|
JMSTransportListener()
Default constructor - JMS 1.1
|
JMSTransportListener(boolean jms102)
Create JMS listener for JMS 1.0.2b API
|
Modifier and Type | Method and Description |
---|---|
void |
setAcceptMessagesWhileStopping(boolean acceptMessagesWhileStopping)
Set whether to accept received messages while the listener container is in the process
of stopping.
|
void |
setCacheLevel(int cacheLevel)
Set cache level as a number (See setCacheLevelName)
|
void |
setCacheLevelName(java.lang.String constantName)
The cache level for JMS resources: none, connection, session, consumer or auto.
|
void |
setConcurrentConsumers(int concurrentConsumers)
The number of concurrent sessions/consumers to start for each listener.
|
void |
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
Set the ConnectionFactory to use for obtaining JMS Connections
|
void |
setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
Set the DestinationResolver that is to be used to resolve Destination references for this
accessor.
|
void |
setExceptionListener(javax.jms.ExceptionListener exceptionListener)
Set the JMS ExceptionListener to notify in case of a JMSException thrown by the registered
message listener or the invocation infrastructure.
|
void |
setIdleTaskExecutionLimit(int idleTaskExecutionLimit)
Specify the limit for idle executions of a receive task, not having received any message
within its execution.
|
void |
setMaxConcurrentConsumers(int maxConcurrentConsumers)
The maximum concurrent consumers per listener
|
void |
setMaxMessagesPerTask(int maxMessagesPerTask)
Specify the maximum number of messages to process in one task.
|
void |
setMessageSelector(java.lang.String messageSelector)
Set a message selector to select messages to pick up
|
void |
setPubSubDomain(boolean pubSubDomain)
Set if Pub-Sub (Topic) or Point-to-Point (Queue)
|
void |
setPubSubNoLocal(boolean pubSubNoLocal)
Set whether to inhibit the delivery of messages published by its own connection.
|
void |
setReceiveTimeout(long receiveTimeout)
Set the timeout to use for receive calls, in milliseconds.
|
void |
setRecoveryInterval(long recoveryInterval)
Specify the interval between recovery attempts, in milliseconds.
|
void |
setSessionAcknowledgeMode(int sessionAcknowledgeMode)
Set the JMS acknowledgement mode that is used when creating a JMS Session to send a message.
|
void |
setSessionAcknowledgeModeName(java.lang.String constantName)
Set the JMS acknowledgement mode by the name of the corresponding constant in the
JMS Session interface
|
void |
setSessionTransacted(boolean sessionTransacted)
Set the transaction mode that is used when creating a JMS Session
|
void |
setSubscriptionDurable(boolean subscriptionDurable)
Set whether to make the subscription durable.
|
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Set the Spring PlatformTransactionManager to use
|
void |
setTransactionTimeout(int transactionTimeout)
Specify the transaction timeout to use for transactional wrapping, in seconds.
|
getAccessURLs, getDetails, init, resetStatistics, setProperties, toBasicView, toDetailedView, toDetailedViewExt
equals, getDeploymentUnit, getDerivedName, getId, getState, getStreamCount, getTimerStreamMax, getTimerStreamMean, getTimerStreamMin, getTimerStreamPer, hashCode, init, isDebugOn, isStarted, maintenanceShutdown, markAsOutdated, pause, resetCounter, resetTimer, resolveMetricsStreams, resume, setBeanName, setConfig, setDebugOn, setDerivedName, setId, setMetricsEngine, setState, start, stop, throwIllegalStateException, undeploy
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
retire
public JMSTransportListener(boolean jms102)
jms102
- whether jms api 1.0.2b is usedpublic JMSTransportListener()
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
- the Spring PlatformTransactionManagerpublic void setCacheLevel(int cacheLevel)
cacheLevel
- 0 - CACHE_NONE, 1 - CACHE_CONNECTION, 2 - CACHE_SESSION,
3 - CACHE_CONSUMER, 4 - CACHE_AUTOpublic void setCacheLevelName(java.lang.String constantName) throws java.lang.IllegalArgumentException
constantName
- one of CACHE_NONE, CACHE_CONNECTION, CACHE_SESSION, CACHE_CONSUMER
or CACHE_AUTOjava.lang.IllegalArgumentException
- on an illegal cache keypublic void setConcurrentConsumers(int concurrentConsumers)
concurrentConsumers
- number of concurrent sessions/consumers to start for
each listener taskpublic void setMaxConcurrentConsumers(int maxConcurrentConsumers)
maxConcurrentConsumers
- maximum concurrent consumerspublic void setMaxMessagesPerTask(int maxMessagesPerTask)
maxMessagesPerTask
- maximum number of messages per taskpublic void setIdleTaskExecutionLimit(int idleTaskExecutionLimit)
idleTaskExecutionLimit
- the limit for idle execution of a receive taskpublic void setRecoveryInterval(long recoveryInterval)
recoveryInterval
- the interval between recovery attemptspublic void setMessageSelector(java.lang.String messageSelector)
messageSelector
- the selector to be usedpublic void setPubSubDomain(boolean pubSubDomain)
pubSubDomain
- whether topic or queuepublic void setPubSubNoLocal(boolean pubSubNoLocal)
pubSubNoLocal
- whether the pub-sup for messages published by its own connectionpublic void setSubscriptionDurable(boolean subscriptionDurable)
subscriptionDurable
- whether the subscriptions are durablepublic void setReceiveTimeout(long receiveTimeout)
receiveTimeout
- the receiving timeoutpublic void setSessionTransacted(boolean sessionTransacted)
sessionTransacted
- whether the transactions are enabledpublic void setSessionAcknowledgeMode(int sessionAcknowledgeMode)
sessionAcknowledgeMode
- the JMS acknowledgement modepublic void setSessionAcknowledgeModeName(java.lang.String constantName)
e.g. "CLIENT_ACKNOWLEDGE".
constantName
- the acknowledgement mode namepublic void setTransactionTimeout(int transactionTimeout)
transactionTimeout
- the transaction timeout in secondspublic void setAcceptMessagesWhileStopping(boolean acceptMessagesWhileStopping)
acceptMessagesWhileStopping
- whether to accept messages while stoppingpublic void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
connectionFactory
- the connection factory implementation providing JMS connectionspublic void setDestinationResolver(org.springframework.jms.support.destination.DestinationResolver destinationResolver)
destinationResolver
- the resolver for resolving JMS destinationspublic void setExceptionListener(javax.jms.ExceptionListener exceptionListener)
exceptionListener
- the listener to notify for errors