Package org.apache.activemq.ra
Class ActiveMQConnectionSupport
java.lang.Object
org.apache.activemq.ra.ActiveMQConnectionSupport
- Direct Known Subclasses:
ActiveMQManagedConnectionFactory,ActiveMQResourceAdapter
Abstract base class providing support for creating physical connections to an
ActiveMQ instance.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.activemq.ActiveMQConnectionFactorycreateConnectionFactory(ActiveMQConnectionRequestInfo connectionRequestInfo, MessageActivationSpec activationSpec) Creates a factory for obtaining physical connections to an Active MQ broker.protected StringdefaultValue(String value, String defaultValue) protected StringemptyToNull(String value) getInfo()Gets the connection request information.Deprecated.booleanbooleanorg.apache.activemq.ActiveMQConnectionmakeConnection(ActiveMQConnectionRequestInfo connectionRequestInfo) Creates a new physical connection to an Active MQ broker identified by given connection request information.org.apache.activemq.ActiveMQConnectionmakeConnection(ActiveMQConnectionRequestInfo connectionRequestInfo, org.apache.activemq.ActiveMQConnectionFactory connectionFactory) Creates a new physical connection to an Active MQ broker using a given connection factory and credentials supplied in connection request information.protected booleanvoidvoidsetClientid(String clientid) voidsetDurableTopicPrefetch(Integer durableTopicPrefetch) protected voidsetInfo(ActiveMQConnectionRequestInfo connectionRequestInfo) Sets the connection request information as a whole.voidsetInitialRedeliveryDelay(Long value) voidsetKeyStore(String keyStore) voidsetKeyStoreKeyPassword(String keyStoreKeyPassword) voidsetKeyStorePassword(String keyStorePassword) voidsetMaximumRedeliveries(Integer value) voidsetMaximumRedeliveryDelay(Long value) voidsetOptimizeDurableTopicPrefetch(Integer optimizeDurableTopicPrefetch) voidsetPassword(String password) voidsetQueueBrowserPrefetch(Integer queueBrowserPrefetch) voidsetQueuePrefetch(Integer queuePrefetch) voidvoidvoidsetServerUrl(String url) voidsetTopicPrefetch(Integer topicPrefetch) voidsetTrustStore(String trustStore) voidsetTrustStorePassword(String trustStorePassword) voidsetUseInboundSession(Boolean useInboundSession) voidsetUserName(String userid) voidsetUseSessionArgs(Boolean useSessionArgs) if true, calls to managed connection factory.connection.createSession will respect the passed in args.
-
Field Details
-
log
protected org.slf4j.Logger log
-
-
Constructor Details
-
ActiveMQConnectionSupport
public ActiveMQConnectionSupport()
-
-
Method Details
-
createConnectionFactory
protected org.apache.activemq.ActiveMQConnectionFactory createConnectionFactory(ActiveMQConnectionRequestInfo connectionRequestInfo, MessageActivationSpec activationSpec) Creates a factory for obtaining physical connections to an Active MQ broker. The factory is configured with the given configuration information.- Parameters:
connectionRequestInfo- the configuration request informationactivationSpec-- Returns:
- the connection factory
- Throws:
IllegalArgumentException- if the server URL given in the configuration information is not a valid URL
-
makeConnection
public org.apache.activemq.ActiveMQConnection makeConnection(ActiveMQConnectionRequestInfo connectionRequestInfo) throws jakarta.jms.JMSException Creates a new physical connection to an Active MQ broker identified by given connection request information.- Parameters:
connectionRequestInfo- the connection request information identifying the broker and any required connection parameters, e.g. username/password- Returns:
- the physical connection
- Throws:
jakarta.jms.JMSException- if the connection could not be established
-
makeConnection
public org.apache.activemq.ActiveMQConnection makeConnection(ActiveMQConnectionRequestInfo connectionRequestInfo, org.apache.activemq.ActiveMQConnectionFactory connectionFactory) throws jakarta.jms.JMSException Creates a new physical connection to an Active MQ broker using a given connection factory and credentials supplied in connection request information.- Parameters:
connectionRequestInfo- the connection request information containing the credentials to use for the connection request- Returns:
- the physical connection
- Throws:
jakarta.jms.JMSException- if the connection could not be established
-
getInfo
Gets the connection request information.- Returns:
- the connection request information
-
setInfo
Sets the connection request information as a whole.- Parameters:
connectionRequestInfo- the connection request information
-
notEqual
-
emptyToNull
-
defaultValue
-
getClientid
- Returns:
- client id
-
setClientid
- Parameters:
clientid-
-
getPassword
- Returns:
- password
-
setPassword
- Parameters:
password-
-
getServerUrl
- Returns:
- server URL
-
setServerUrl
- Parameters:
url-
-
getTrustStore
-
setTrustStore
-
getTrustStorePassword
-
setTrustStorePassword
-
getKeyStore
-
setKeyStore
-
getKeyStorePassword
-
setKeyStorePassword
-
getKeyStoreKeyPassword
-
setKeyStoreKeyPassword
-
getUserName
- Returns:
- user name
-
setUserName
- Parameters:
userid-
-
getDurableTopicPrefetch
- Returns:
- durable topic prefetch
-
setOptimizeDurableTopicPrefetch
- Parameters:
optimizeDurableTopicPrefetch-
-
getOptimizeDurableTopicPrefetch
- Returns:
- durable topic prefetch
-
setDurableTopicPrefetch
- Parameters:
durableTopicPrefetch-
-
getInitialRedeliveryDelay
- Returns:
- initial redelivery delay
-
setInitialRedeliveryDelay
- Parameters:
value-
-
getMaximumRedeliveryDelay
- Returns:
- initial redelivery delay
-
setMaximumRedeliveryDelay
- Parameters:
value-
-
getInputStreamPrefetch
Deprecated.- Returns:
- input stream prefetch
-
getMaximumRedeliveries
- Returns:
- maximum redeliveries
-
setMaximumRedeliveries
- Parameters:
value-
-
getQueueBrowserPrefetch
- Returns:
- queue browser prefetch
-
setQueueBrowserPrefetch
- Parameters:
queueBrowserPrefetch-
-
getQueuePrefetch
- Returns:
- queue prefetch
-
setQueuePrefetch
- Parameters:
queuePrefetch-
-
getRedeliveryBackOffMultiplier
- Returns:
- redelivery backoff multiplier
-
setRedeliveryBackOffMultiplier
- Parameters:
value-
-
getRedeliveryUseExponentialBackOff
- Returns:
- redelivery use exponential backoff
-
setRedeliveryUseExponentialBackOff
- Parameters:
value-
-
getTopicPrefetch
- Returns:
- topic prefetch
-
setTopicPrefetch
- Parameters:
topicPrefetch-
-
setAllPrefetchValues
- Parameters:
i-
-
isUseInboundSessionEnabled
public boolean isUseInboundSessionEnabled()- Returns:
- use inbound session enabled
-
getUseInboundSession
- Returns:
- use inbound session
-
setUseInboundSession
- Parameters:
useInboundSession-
-
isUseSessionArgs
public boolean isUseSessionArgs() -
getUseSessionArgs
-
setUseSessionArgs
if true, calls to managed connection factory.connection.createSession will respect the passed in args. When false (default) the args are ignored b/c the container will do transaction demarcation via xa or local transaction rar contracts. This option is useful when a managed connection is used in plain jms mode and a jms transacted session session is required.- Parameters:
useSessionArgs-
-