Class ActiveMQConnectionSupport

java.lang.Object
org.apache.activemq.ra.ActiveMQConnectionSupport
Direct Known Subclasses:
ActiveMQManagedConnectionFactory, ActiveMQResourceAdapter

public class ActiveMQConnectionSupport extends Object
Abstract base class providing support for creating physical connections to an ActiveMQ instance.
  • 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 information
      activationSpec -
      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

      protected void setInfo(ActiveMQConnectionRequestInfo connectionRequestInfo)
      Sets the connection request information as a whole.
      Parameters:
      connectionRequestInfo - the connection request information
    • notEqual

      protected boolean notEqual(Object o1, Object o2)
    • emptyToNull

      protected String emptyToNull(String value)
    • defaultValue

      protected String defaultValue(String value, String defaultValue)
    • getClientid

      public String getClientid()
      Returns:
      client id
    • setClientid

      public void setClientid(String clientid)
      Parameters:
      clientid -
    • getPassword

      public String getPassword()
      Returns:
      password
    • setPassword

      public void setPassword(String password)
      Parameters:
      password -
    • getServerUrl

      public String getServerUrl()
      Returns:
      server URL
    • setServerUrl

      public void setServerUrl(String url)
      Parameters:
      url -
    • getTrustStore

      public String getTrustStore()
    • setTrustStore

      public void setTrustStore(String trustStore)
    • getTrustStorePassword

      public String getTrustStorePassword()
    • setTrustStorePassword

      public void setTrustStorePassword(String trustStorePassword)
    • getKeyStore

      public String getKeyStore()
    • setKeyStore

      public void setKeyStore(String keyStore)
    • getKeyStorePassword

      public String getKeyStorePassword()
    • setKeyStorePassword

      public void setKeyStorePassword(String keyStorePassword)
    • getKeyStoreKeyPassword

      public String getKeyStoreKeyPassword()
    • setKeyStoreKeyPassword

      public void setKeyStoreKeyPassword(String keyStoreKeyPassword)
    • getUserName

      public String getUserName()
      Returns:
      user name
    • setUserName

      public void setUserName(String userid)
      Parameters:
      userid -
    • getDurableTopicPrefetch

      public Integer getDurableTopicPrefetch()
      Returns:
      durable topic prefetch
    • setOptimizeDurableTopicPrefetch

      public void setOptimizeDurableTopicPrefetch(Integer optimizeDurableTopicPrefetch)
      Parameters:
      optimizeDurableTopicPrefetch -
    • getOptimizeDurableTopicPrefetch

      public Integer getOptimizeDurableTopicPrefetch()
      Returns:
      durable topic prefetch
    • setDurableTopicPrefetch

      public void setDurableTopicPrefetch(Integer durableTopicPrefetch)
      Parameters:
      durableTopicPrefetch -
    • getInitialRedeliveryDelay

      public Long getInitialRedeliveryDelay()
      Returns:
      initial redelivery delay
    • setInitialRedeliveryDelay

      public void setInitialRedeliveryDelay(Long value)
      Parameters:
      value -
    • getMaximumRedeliveryDelay

      public Long getMaximumRedeliveryDelay()
      Returns:
      initial redelivery delay
    • setMaximumRedeliveryDelay

      public void setMaximumRedeliveryDelay(Long value)
      Parameters:
      value -
    • getInputStreamPrefetch

      @Deprecated public Integer getInputStreamPrefetch()
      Deprecated.
      Returns:
      input stream prefetch
    • getMaximumRedeliveries

      public Integer getMaximumRedeliveries()
      Returns:
      maximum redeliveries
    • setMaximumRedeliveries

      public void setMaximumRedeliveries(Integer value)
      Parameters:
      value -
    • getQueueBrowserPrefetch

      public Integer getQueueBrowserPrefetch()
      Returns:
      queue browser prefetch
    • setQueueBrowserPrefetch

      public void setQueueBrowserPrefetch(Integer queueBrowserPrefetch)
      Parameters:
      queueBrowserPrefetch -
    • getQueuePrefetch

      public Integer getQueuePrefetch()
      Returns:
      queue prefetch
    • setQueuePrefetch

      public void setQueuePrefetch(Integer queuePrefetch)
      Parameters:
      queuePrefetch -
    • getRedeliveryBackOffMultiplier

      public Double getRedeliveryBackOffMultiplier()
      Returns:
      redelivery backoff multiplier
    • setRedeliveryBackOffMultiplier

      public void setRedeliveryBackOffMultiplier(Double value)
      Parameters:
      value -
    • getRedeliveryUseExponentialBackOff

      public Boolean getRedeliveryUseExponentialBackOff()
      Returns:
      redelivery use exponential backoff
    • setRedeliveryUseExponentialBackOff

      public void setRedeliveryUseExponentialBackOff(Boolean value)
      Parameters:
      value -
    • getTopicPrefetch

      public Integer getTopicPrefetch()
      Returns:
      topic prefetch
    • setTopicPrefetch

      public void setTopicPrefetch(Integer topicPrefetch)
      Parameters:
      topicPrefetch -
    • setAllPrefetchValues

      public void setAllPrefetchValues(Integer i)
      Parameters:
      i -
    • isUseInboundSessionEnabled

      public boolean isUseInboundSessionEnabled()
      Returns:
      use inbound session enabled
    • getUseInboundSession

      public Boolean getUseInboundSession()
      Returns:
      use inbound session
    • setUseInboundSession

      public void setUseInboundSession(Boolean useInboundSession)
      Parameters:
      useInboundSession -
    • isUseSessionArgs

      public boolean isUseSessionArgs()
    • getUseSessionArgs

      public Boolean getUseSessionArgs()
    • setUseSessionArgs

      public void setUseSessionArgs(Boolean useSessionArgs)
      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 -