Class ActiveMQConnectionFactory

    • Constructor Detail

      • ActiveMQConnectionFactory

        public ActiveMQConnectionFactory​(java.lang.String brokerURL)
      • ActiveMQConnectionFactory

        public ActiveMQConnectionFactory​(java.lang.String url,
                                         java.lang.String user,
                                         java.lang.String password)
        For compatibility and users used to this kind of constructor
      • ActiveMQConnectionFactory

        public ActiveMQConnectionFactory​(ServerLocator serverLocator)
      • ActiveMQConnectionFactory

        public ActiveMQConnectionFactory​(boolean ha,
                                         TransportConfiguration... initialConnectors)
    • Method Detail

      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • toURI

        public java.net.URI toURI()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getProtocolManagerFactoryStr

        public java.lang.String getProtocolManagerFactoryStr()
      • setProtocolManagerFactoryStr

        public void setProtocolManagerFactoryStr​(java.lang.String protocolManagerFactoryStr)
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • setBrokerURL

        public void setBrokerURL​(java.lang.String brokerURL)
                          throws javax.jms.JMSException
        Warning: This method will not clear any previous properties. Say, you set the user on a first call. Now you just change the brokerURI on a second call without passing the user. The previous filled user will be already set, and nothing will clear it out. Also: you cannot use this method after the connection factory is made readOnly. Which happens after you create a first connection.
        Throws:
        javax.jms.JMSException
      • createConnection

        public javax.jms.Connection createConnection()
                                              throws javax.jms.JMSException
        Specified by:
        createConnection in interface javax.jms.ConnectionFactory
        Throws:
        javax.jms.JMSException
      • createConnection

        public javax.jms.Connection createConnection​(java.lang.String username,
                                                     java.lang.String password)
                                              throws javax.jms.JMSException
        Specified by:
        createConnection in interface javax.jms.ConnectionFactory
        Throws:
        javax.jms.JMSException
      • createContext

        public javax.jms.JMSContext createContext()
        Specified by:
        createContext in interface javax.jms.ConnectionFactory
      • createContext

        public javax.jms.JMSContext createContext​(int sessionMode)
        Specified by:
        createContext in interface javax.jms.ConnectionFactory
      • createContext

        public javax.jms.JMSContext createContext​(java.lang.String userName,
                                                  java.lang.String password)
        Specified by:
        createContext in interface javax.jms.ConnectionFactory
      • createContext

        public javax.jms.JMSContext createContext​(java.lang.String userName,
                                                  java.lang.String password,
                                                  int sessionMode)
        Specified by:
        createContext in interface javax.jms.ConnectionFactory
      • createQueueConnection

        public javax.jms.QueueConnection createQueueConnection()
                                                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createQueueConnection

        public javax.jms.QueueConnection createQueueConnection​(java.lang.String username,
                                                               java.lang.String password)
                                                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createTopicConnection

        public javax.jms.TopicConnection createTopicConnection()
                                                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createTopicConnection

        public javax.jms.TopicConnection createTopicConnection​(java.lang.String username,
                                                               java.lang.String password)
                                                        throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createXAConnection

        public javax.jms.XAConnection createXAConnection()
                                                  throws javax.jms.JMSException
        Specified by:
        createXAConnection in interface javax.jms.XAConnectionFactory
        Throws:
        javax.jms.JMSException
      • createXAConnection

        public javax.jms.XAConnection createXAConnection​(java.lang.String username,
                                                         java.lang.String password)
                                                  throws javax.jms.JMSException
        Specified by:
        createXAConnection in interface javax.jms.XAConnectionFactory
        Throws:
        javax.jms.JMSException
      • createXAContext

        public javax.jms.XAJMSContext createXAContext()
        Specified by:
        createXAContext in interface javax.jms.XAConnectionFactory
      • createXAContext

        public javax.jms.XAJMSContext createXAContext​(java.lang.String userName,
                                                      java.lang.String password)
        Specified by:
        createXAContext in interface javax.jms.XAConnectionFactory
      • createXAQueueConnection

        public javax.jms.XAQueueConnection createXAQueueConnection()
                                                            throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createXAQueueConnection

        public javax.jms.XAQueueConnection createXAQueueConnection​(java.lang.String username,
                                                                   java.lang.String password)
                                                            throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createXATopicConnection

        public javax.jms.XATopicConnection createXATopicConnection()
                                                            throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • createXATopicConnection

        public javax.jms.XATopicConnection createXATopicConnection​(java.lang.String username,
                                                                   java.lang.String password)
                                                            throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • buildFromProperties

        protected void buildFromProperties​(java.util.Properties props)
        Description copied from class: JNDIStorable
        Set the properties that will represent the instance in JNDI
        Specified by:
        buildFromProperties in class JNDIStorable
        Parameters:
        props - The properties to use when building the new isntance.
      • populateProperties

        protected void populateProperties​(java.util.Properties props)
        Description copied from class: JNDIStorable
        Initialize the instance from properties stored in JNDI
        Specified by:
        populateProperties in class JNDIStorable
        Parameters:
        props - The properties to use when initializing the new instance.
      • isHA

        public boolean isHA()
      • getConnectionLoadBalancingPolicyClassName

        public java.lang.String getConnectionLoadBalancingPolicyClassName()
      • setConnectionLoadBalancingPolicyClassName

        public void setConnectionLoadBalancingPolicyClassName​(java.lang.String connectionLoadBalancingPolicyClassName)
      • getClientID

        public java.lang.String getClientID()
      • setClientID

        public void setClientID​(java.lang.String clientID)
      • isEnableSharedClientID

        public boolean isEnableSharedClientID()
      • setEnableSharedClientID

        public void setEnableSharedClientID​(boolean enableSharedClientID)
      • getDupsOKBatchSize

        public int getDupsOKBatchSize()
      • setDupsOKBatchSize

        public void setDupsOKBatchSize​(int dupsOKBatchSize)
      • getTransactionBatchSize

        public int getTransactionBatchSize()
      • setTransactionBatchSize

        public void setTransactionBatchSize​(int transactionBatchSize)
      • isCacheDestinations

        public boolean isCacheDestinations()
      • setCacheDestinations

        public void setCacheDestinations​(boolean cacheDestinations)
      • isEnable1xPrefixes

        public boolean isEnable1xPrefixes()
      • setEnable1xPrefixes

        public void setEnable1xPrefixes​(boolean enable1xPrefixes)
      • getClientFailureCheckPeriod

        public long getClientFailureCheckPeriod()
      • setClientFailureCheckPeriod

        public void setClientFailureCheckPeriod​(long clientFailureCheckPeriod)
      • getConnectionTTL

        public long getConnectionTTL()
      • setConnectionTTL

        public void setConnectionTTL​(long connectionTTL)
      • getCallTimeout

        public long getCallTimeout()
      • setCallTimeout

        public void setCallTimeout​(long callTimeout)
      • getCallFailoverTimeout

        public long getCallFailoverTimeout()
      • setCallFailoverTimeout

        public void setCallFailoverTimeout​(long callTimeout)
      • setUseTopologyForLoadBalancing

        public void setUseTopologyForLoadBalancing​(boolean useTopologyForLoadBalancing)
      • isUseTopologyForLoadBalancing

        public boolean isUseTopologyForLoadBalancing()
      • getConsumerWindowSize

        public int getConsumerWindowSize()
      • setConsumerWindowSize

        public void setConsumerWindowSize​(int consumerWindowSize)
      • getConsumerMaxRate

        public int getConsumerMaxRate()
      • setConsumerMaxRate

        public void setConsumerMaxRate​(int consumerMaxRate)
      • getConfirmationWindowSize

        public int getConfirmationWindowSize()
      • setConfirmationWindowSize

        public void setConfirmationWindowSize​(int confirmationWindowSize)
      • getProducerMaxRate

        public int getProducerMaxRate()
      • setProducerMaxRate

        public void setProducerMaxRate​(int producerMaxRate)
      • getProducerWindowSize

        public int getProducerWindowSize()
      • setProducerWindowSize

        public void setProducerWindowSize​(int producerWindowSize)
      • setCacheLargeMessagesClient

        public void setCacheLargeMessagesClient​(boolean cacheLargeMessagesClient)
        Parameters:
        cacheLargeMessagesClient -
      • isCacheLargeMessagesClient

        public boolean isCacheLargeMessagesClient()
      • getMinLargeMessageSize

        public int getMinLargeMessageSize()
      • setMinLargeMessageSize

        public void setMinLargeMessageSize​(int minLargeMessageSize)
      • isBlockOnAcknowledge

        public boolean isBlockOnAcknowledge()
      • setBlockOnAcknowledge

        public void setBlockOnAcknowledge​(boolean blockOnAcknowledge)
      • isBlockOnNonDurableSend

        public boolean isBlockOnNonDurableSend()
      • setBlockOnNonDurableSend

        public void setBlockOnNonDurableSend​(boolean blockOnNonDurableSend)
      • isBlockOnDurableSend

        public boolean isBlockOnDurableSend()
      • setBlockOnDurableSend

        public void setBlockOnDurableSend​(boolean blockOnDurableSend)
      • isAutoGroup

        public boolean isAutoGroup()
      • setAutoGroup

        public void setAutoGroup​(boolean autoGroup)
      • isPreAcknowledge

        public boolean isPreAcknowledge()
      • setPreAcknowledge

        public void setPreAcknowledge​(boolean preAcknowledge)
      • getRetryInterval

        public long getRetryInterval()
      • setRetryInterval

        public void setRetryInterval​(long retryInterval)
      • getMaxRetryInterval

        public long getMaxRetryInterval()
      • setMaxRetryInterval

        public void setMaxRetryInterval​(long retryInterval)
      • getRetryIntervalMultiplier

        public double getRetryIntervalMultiplier()
      • setRetryIntervalMultiplier

        public void setRetryIntervalMultiplier​(double retryIntervalMultiplier)
      • getReconnectAttempts

        public int getReconnectAttempts()
      • setReconnectAttempts

        public void setReconnectAttempts​(int reconnectAttempts)
      • setInitialConnectAttempts

        public void setInitialConnectAttempts​(int reconnectAttempts)
      • getInitialConnectAttempts

        public int getInitialConnectAttempts()
      • isFailoverOnInitialConnection

        @Deprecated
        public boolean isFailoverOnInitialConnection()
        Deprecated.
      • setFailoverOnInitialConnection

        @Deprecated
        public void setFailoverOnInitialConnection​(boolean failover)
        Deprecated.
      • isUseGlobalPools

        public boolean isUseGlobalPools()
      • setUseGlobalPools

        public void setUseGlobalPools​(boolean useGlobalPools)
      • getScheduledThreadPoolMaxSize

        public int getScheduledThreadPoolMaxSize()
      • setScheduledThreadPoolMaxSize

        public void setScheduledThreadPoolMaxSize​(int scheduledThreadPoolMaxSize)
      • getThreadPoolMaxSize

        public int getThreadPoolMaxSize()
      • setThreadPoolMaxSize

        public void setThreadPoolMaxSize​(int threadPoolMaxSize)
      • getInitialMessagePacketSize

        public int getInitialMessagePacketSize()
      • setInitialMessagePacketSize

        public void setInitialMessagePacketSize​(int size)
      • isIgnoreJTA

        public boolean isIgnoreJTA()
      • setIgnoreJTA

        public void setIgnoreJTA​(boolean ignoreJTA)
      • setIncomingInterceptorList

        public void setIncomingInterceptorList​(java.lang.String interceptorList)
        Parameters:
        interceptorList - a comma separated string of incoming interceptor class names to be used. Each interceptor needs a default Constructor to be used with this method.
      • getIncomingInterceptorList

        public java.lang.String getIncomingInterceptorList()
      • setOutgoingInterceptorList

        public void setOutgoingInterceptorList​(java.lang.String interceptorList)
        Parameters:
        interceptorList - a comma separated string of incoming interceptor class names to be used. Each interceptor needs a default Constructor to be used with this method.
      • getOutgoingInterceptorList

        public java.lang.String getOutgoingInterceptorList()
      • getUser

        public java.lang.String getUser()
      • getPassword

        public java.lang.String getPassword()
      • setGroupID

        public void setGroupID​(java.lang.String groupID)
      • getGroupID

        public java.lang.String getGroupID()
      • isCompressLargeMessage

        public boolean isCompressLargeMessage()
      • setCompressLargeMessage

        public void setCompressLargeMessage​(boolean avoidLargeMessages)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getFactoryType

        public int getFactoryType()
      • createConnectionInternal

        protected ActiveMQConnection createConnectionInternal​(java.lang.String username,
                                                              java.lang.String password,
                                                              boolean isXA,
                                                              int type)
                                                       throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • makeReadOnly

        protected void makeReadOnly()