Class ActiveMQResourceAdapter

  • All Implemented Interfaces:
    Serializable, javax.resource.spi.ResourceAdapter

    public class ActiveMQResourceAdapter
    extends Object
    implements javax.resource.spi.ResourceAdapter, Serializable
    The resource adapter for ActiveMQ
    See Also:
    Serialized Form
    • Field Detail

      • PRODUCT_NAME

        public static final String PRODUCT_NAME
        The Name of the product that this resource adapter represents.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ActiveMQResourceAdapter

        public ActiveMQResourceAdapter()
        Constructor
    • Method Detail

      • getTSR

        public javax.transaction.TransactionSynchronizationRegistry getTSR()
      • endpointActivation

        public void endpointActivation​(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                                       javax.resource.spi.ActivationSpec spec)
                                throws javax.resource.ResourceException
        Endpoint activation
        Specified by:
        endpointActivation in interface javax.resource.spi.ResourceAdapter
        Parameters:
        endpointFactory - The endpoint factory
        spec - The activation spec
        Throws:
        javax.resource.ResourceException - Thrown if an error occurs
      • endpointDeactivation

        public void endpointDeactivation​(javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                                         javax.resource.spi.ActivationSpec spec)
        Endpoint deactivation
        Specified by:
        endpointDeactivation in interface javax.resource.spi.ResourceAdapter
        Parameters:
        endpointFactory - The endpoint factory
        spec - The activation spec
      • getXAResources

        public XAResource[] getXAResources​(javax.resource.spi.ActivationSpec[] specs)
                                    throws javax.resource.ResourceException
        Get XA resources
        Specified by:
        getXAResources in interface javax.resource.spi.ResourceAdapter
        Parameters:
        specs - The activation specs
        Returns:
        The XA resources
        Throws:
        javax.resource.ResourceException - Thrown if an error occurs or unsupported
      • start

        public void start​(javax.resource.spi.BootstrapContext ctx)
                   throws javax.resource.spi.ResourceAdapterInternalException
        Start
        Specified by:
        start in interface javax.resource.spi.ResourceAdapter
        Parameters:
        ctx - The bootstrap context
        Throws:
        javax.resource.spi.ResourceAdapterInternalException - Thrown if an error occurs
      • stop

        public void stop()
        Stop
        Specified by:
        stop in interface javax.resource.spi.ResourceAdapter
      • setUseAutoRecovery

        public void setUseAutoRecovery​(Boolean useAutoRecovery)
      • isUseAutoRecovery

        public Boolean isUseAutoRecovery()
      • isUseMaskedPassword

        public Boolean isUseMaskedPassword()
      • setUseMaskedPassword

        public void setUseMaskedPassword​(Boolean useMaskedPassword)
      • setPasswordCodec

        public void setPasswordCodec​(String passwordCodec)
      • getPasswordCodec

        public String getPasswordCodec()
      • setConnectorClassName

        public void setConnectorClassName​(String connectorClassName)
      • getConnectorClassName

        public String getConnectorClassName()
      • getConnectionParameters

        public String getConnectionParameters()
      • setConnectionParameters

        public void setConnectionParameters​(String config)
      • setHA

        public void setHA​(Boolean ha)
      • getEntries

        public String getEntries()
      • getJndiName

        public String getJndiName()
      • setEntries

        public void setEntries​(String entries)
      • getDiscoveryAddress

        public String getDiscoveryAddress()
        Get the discovery group name
        Returns:
        The value
      • setJgroupsFile

        public void setJgroupsFile​(String jgroupsFile)
      • getJgroupsFile

        public String getJgroupsFile()
      • getJgroupsChannelName

        public String getJgroupsChannelName()
      • setJgroupsChannelName

        public void setJgroupsChannelName​(String jgroupsChannelName)
      • setDiscoveryAddress

        public void setDiscoveryAddress​(String dgn)
        Set the discovery group name
        Parameters:
        dgn - The value
      • getDiscoveryPort

        public Integer getDiscoveryPort()
        Get the discovery group port
        Returns:
        The value
      • setDiscoveryLocalBindAddress

        public void setDiscoveryLocalBindAddress​(String discoveryLocalBindAddress)
        set the discovery local bind address
        Parameters:
        discoveryLocalBindAddress - the address value
      • getDiscoveryLocalBindAddress

        public String getDiscoveryLocalBindAddress()
        get the discovery local bind address
        Returns:
        the address value
      • setDiscoveryPort

        public void setDiscoveryPort​(Integer dgp)
        Set the discovery group port
        Parameters:
        dgp - The value
      • getDiscoveryRefreshTimeout

        public Long getDiscoveryRefreshTimeout()
        Get discovery refresh timeout
        Returns:
        The value
      • setDiscoveryRefreshTimeout

        public void setDiscoveryRefreshTimeout​(Long discoveryRefreshTimeout)
        Set discovery refresh timeout
        Parameters:
        discoveryRefreshTimeout - The value
      • getDiscoveryInitialWaitTimeout

        public Long getDiscoveryInitialWaitTimeout()
        Get discovery initial wait timeout
        Returns:
        The value
      • setDiscoveryInitialWaitTimeout

        public void setDiscoveryInitialWaitTimeout​(Long discoveryInitialWaitTimeout)
        Set discovery initial wait timeout
        Parameters:
        discoveryInitialWaitTimeout - The value
      • getClientFailureCheckPeriod

        public Long getClientFailureCheckPeriod()
        Get client failure check period
        Returns:
        The value
      • setClientFailureCheckPeriod

        public void setClientFailureCheckPeriod​(Long clientFailureCheckPeriod)
        Set client failure check period
        Parameters:
        clientFailureCheckPeriod - The value
      • getConnectionTTL

        public Long getConnectionTTL()
        Get connection TTL
        Returns:
        The value
      • setConnectionTTL

        public void setConnectionTTL​(Long connectionTTL)
        Set connection TTL
        Parameters:
        connectionTTL - The value
      • isCacheLargeMessagesClient

        public Boolean isCacheLargeMessagesClient()
        Get cacheLargeMessagesClient
        Returns:
        The value
      • setCacheLargeMessagesClient

        public void setCacheLargeMessagesClient​(Boolean cacheLargeMessagesClient)
        Set cacheLargeMessagesClient
        Parameters:
        cacheLargeMessagesClient - The value
      • isCompressLargeMessage

        public Boolean isCompressLargeMessage()
        Get compressLargeMessage
        Returns:
        The value
      • setFailoverOnInitialConnection

        @Deprecated
        public void setFailoverOnInitialConnection​(Boolean failoverOnInitialConnection)
        Deprecated.
        Set failoverOnInitialConnection
        Parameters:
        failoverOnInitialConnection - The value
      • isFailoverOnInitialConnection

        @Deprecated
        public Boolean isFailoverOnInitialConnection()
        Deprecated.
        Get isFailoverOnInitialConnection
        Returns:
        The value
      • setCacheDestinations

        public void setCacheDestinations​(Boolean cacheDestinations)
        Set cacheDestinations
        Parameters:
        cacheDestinations - The value
      • isCacheDestinations

        public Boolean isCacheDestinations()
        Get isCacheDestinations
        Returns:
        The value
      • setEnable1xPrefixes

        public void setEnable1xPrefixes​(Boolean enable1xPrefixes)
        Set enable1xPrefixes
        Parameters:
        enable1xPrefixes - The value
      • isEnable1xPrefixes

        public Boolean isEnable1xPrefixes()
        Get isCacheDestinations
        Returns:
        The value
      • setCompressLargeMessage

        public void setCompressLargeMessage​(Boolean compressLargeMessage)
        Set compressLargeMessage
        Parameters:
        compressLargeMessage - The value
      • getCompressionLevel

        public Integer getCompressionLevel()
        Get compressionLevel
        Returns:
        The value
      • setCompressionLevel

        public void setCompressionLevel​(Integer compressionLevel)
        Sets what compressionLevel to use when compressing messages Value must be -1 (default) or 0-9
        Parameters:
        compressionLevel - The value
      • getCallTimeout

        public Long getCallTimeout()
        Get call timeout
        Returns:
        The value
      • setCallTimeout

        public void setCallTimeout​(Long callTimeout)
        Set call timeout
        Parameters:
        callTimeout - The value
      • getCallFailoverTimeout

        public Long getCallFailoverTimeout()
        Get call failover timeout
        Returns:
        The value
      • setCallFailoverTimeout

        public void setCallFailoverTimeout​(Long callFailoverTimeout)
        Set call failover timeout
        Parameters:
        callFailoverTimeout - The value
      • getDupsOKBatchSize

        public Integer getDupsOKBatchSize()
        Get dups ok batch size
        Returns:
        The value
      • setDupsOKBatchSize

        public void setDupsOKBatchSize​(Integer dupsOKBatchSize)
        Set dups ok batch size
        Parameters:
        dupsOKBatchSize - The value
      • getTransactionBatchSize

        public Integer getTransactionBatchSize()
        Get transaction batch size
        Returns:
        The value
      • setTransactionBatchSize

        public void setTransactionBatchSize​(Integer transactionBatchSize)
        Set transaction batch size
        Parameters:
        transactionBatchSize - The value
      • getConsumerWindowSize

        public Integer getConsumerWindowSize()
        Get consumer window size
        Returns:
        The value
      • setConsumerWindowSize

        public void setConsumerWindowSize​(Integer consumerWindowSize)
        Set consumer window size
        Parameters:
        consumerWindowSize - The value
      • getConsumerMaxRate

        public Integer getConsumerMaxRate()
        Get consumer max rate
        Returns:
        The value
      • setConsumerMaxRate

        public void setConsumerMaxRate​(Integer consumerMaxRate)
        Set consumer max rate
        Parameters:
        consumerMaxRate - The value
      • getConfirmationWindowSize

        public Integer getConfirmationWindowSize()
        Get confirmation window size
        Returns:
        The value
      • setConfirmationWindowSize

        public void setConfirmationWindowSize​(Integer confirmationWindowSize)
        Set confirmation window size
        Parameters:
        confirmationWindowSize - The value
      • getProducerMaxRate

        public Integer getProducerMaxRate()
        Get producer max rate
        Returns:
        The value
      • setProducerMaxRate

        public void setProducerMaxRate​(Integer producerMaxRate)
        Set producer max rate
        Parameters:
        producerMaxRate - The value
      • setUseTopologyForLoadBalancing

        public void setUseTopologyForLoadBalancing​(Boolean useTopologyForLoadBalancing)
      • getUseTopologyForLoadBalancing

        public Boolean getUseTopologyForLoadBalancing()
      • isUseTopologyForLoadBalancing

        public Boolean isUseTopologyForLoadBalancing()
      • getProducerWindowSize

        public Integer getProducerWindowSize()
        Get producer window size
        Returns:
        The value
      • setProducerWindowSize

        public void setProducerWindowSize​(Integer producerWindowSize)
        Set producer window size
        Parameters:
        producerWindowSize - The value
      • getProtocolManagerFactoryStr

        public String getProtocolManagerFactoryStr()
      • setProtocolManagerFactoryStr

        public void setProtocolManagerFactoryStr​(String protocolManagerFactoryStr)
      • getDeserializationBlackList

        @Deprecated(forRemoval=true)
        public String getDeserializationBlackList()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • setDeserializationBlackList

        @Deprecated(forRemoval=true)
        public void setDeserializationBlackList​(String deserializationDenyList)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getDeserializationWhiteList

        @Deprecated(forRemoval=true)
        public String getDeserializationWhiteList()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • setDeserializationWhiteList

        @Deprecated(forRemoval=true)
        public void setDeserializationWhiteList​(String deserializationAllowList)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getDeserializationDenyList

        public String getDeserializationDenyList()
      • setDeserializationDenyList

        public void setDeserializationDenyList​(String deserializationDenyList)
      • getDeserializationAllowList

        public String getDeserializationAllowList()
      • setDeserializationAllowList

        public void setDeserializationAllowList​(String deserializationAllowList)
      • getMinLargeMessageSize

        public Integer getMinLargeMessageSize()
        Get min large message size
        Returns:
        The value
      • setMinLargeMessageSize

        public void setMinLargeMessageSize​(Integer minLargeMessageSize)
        Set min large message size
        Parameters:
        minLargeMessageSize - The value
      • getBlockOnAcknowledge

        public Boolean getBlockOnAcknowledge()
        Get block on acknowledge
        Returns:
        The value
      • setBlockOnAcknowledge

        public void setBlockOnAcknowledge​(Boolean blockOnAcknowledge)
        Set block on acknowledge
        Parameters:
        blockOnAcknowledge - The value
      • getBlockOnNonDurableSend

        public Boolean getBlockOnNonDurableSend()
        Get block on non durable send
        Returns:
        The value
      • setBlockOnNonDurableSend

        public void setBlockOnNonDurableSend​(Boolean blockOnNonDurableSend)
        Set block on non durable send
        Parameters:
        blockOnNonDurableSend - The value
      • getBlockOnDurableSend

        public Boolean getBlockOnDurableSend()
        Get block on durable send
        Returns:
        The value
      • setBlockOnDurableSend

        public void setBlockOnDurableSend​(Boolean blockOnDurableSend)
        Set block on durable send
        Parameters:
        blockOnDurableSend - The value
      • getAutoGroup

        public Boolean getAutoGroup()
        Get auto group
        Returns:
        The value
      • setAutoGroup

        public void setAutoGroup​(Boolean autoGroup)
        Set auto group
        Parameters:
        autoGroup - The value
      • getPreAcknowledge

        public Boolean getPreAcknowledge()
        Get pre acknowledge
        Returns:
        The value
      • setPreAcknowledge

        public void setPreAcknowledge​(Boolean preAcknowledge)
        Set pre acknowledge
        Parameters:
        preAcknowledge - The value
      • getInitialConnectAttempts

        public Integer getInitialConnectAttempts()
        Get number of initial connect attempts
        Returns:
        The value
      • setInitialConnectAttempts

        public void setInitialConnectAttempts​(Integer initialConnectAttempts)
        Set number of initial connect attempts
        Parameters:
        initialConnectAttempts - The value
      • getInitialMessagePacketSize

        public Integer getInitialMessagePacketSize()
        Get initial message packet size
        Returns:
        The value
      • setInitialMessagePacketSize

        public void setInitialMessagePacketSize​(Integer initialMessagePacketSize)
        Set initial message packet size
        Parameters:
        initialMessagePacketSize - The value
      • getRetryInterval

        public Long getRetryInterval()
        Get retry interval
        Returns:
        The value
      • setRetryInterval

        public void setRetryInterval​(Long retryInterval)
        Set retry interval
        Parameters:
        retryInterval - The value
      • getRetryIntervalMultiplier

        public Double getRetryIntervalMultiplier()
        Get retry interval multiplier
        Returns:
        The value
      • setRetryIntervalMultiplier

        public void setRetryIntervalMultiplier​(Double retryIntervalMultiplier)
        Set retry interval multiplier
        Parameters:
        retryIntervalMultiplier - The value
      • getMaxRetryInterval

        public Long getMaxRetryInterval()
        Get maximum time for retry interval
        Returns:
        The value
      • setMaxRetryInterval

        public void setMaxRetryInterval​(Long maxRetryInterval)
        Set maximum time for retry interval
        Parameters:
        maxRetryInterval - The value
      • getReconnectAttempts

        public Integer getReconnectAttempts()
        Get number of reconnect attempts
        Returns:
        The value
      • setReconnectAttempts

        public void setReconnectAttempts​(Integer reconnectAttempts)
        Set number of reconnect attempts
        Parameters:
        reconnectAttempts - The value
      • getConnectionLoadBalancingPolicyClassName

        public String getConnectionLoadBalancingPolicyClassName()
      • setConnectionLoadBalancingPolicyClassName

        public void setConnectionLoadBalancingPolicyClassName​(String connectionLoadBalancingPolicyClassName)
      • getScheduledThreadPoolMaxSize

        public Integer getScheduledThreadPoolMaxSize()
      • setScheduledThreadPoolMaxSize

        public void setScheduledThreadPoolMaxSize​(Integer scheduledThreadPoolMaxSize)
      • getThreadPoolMaxSize

        public Integer getThreadPoolMaxSize()
      • setThreadPoolMaxSize

        public void setThreadPoolMaxSize​(Integer threadPoolMaxSize)
      • getUseGlobalPools

        public Boolean getUseGlobalPools()
      • setUseGlobalPools

        public void setUseGlobalPools​(Boolean useGlobalPools)
      • getUserName

        public String getUserName()
        Get the user name
        Returns:
        The value
      • setUserName

        public void setUserName​(String userName)
        Set the user name
        Parameters:
        userName - The value
      • getPassword

        public String getPassword()
        Get the password
        Returns:
        The value
      • setPassword

        public void setPassword​(String password)
        Set the password
        Parameters:
        password - The value
      • isUseJNDI

        public boolean isUseJNDI()
        Returns:
        the useJNDI
      • setUseJNDI

        public void setUseJNDI​(Boolean value)
        Parameters:
        value - the useJNDI to set
      • getJndiParams

        public String getJndiParams()
        Returns:
        return the jndi params to use
      • setJndiParams

        public void setJndiParams​(String jndiParams)
      • getParsedJndiParams

        public Hashtable<?,​?> getParsedJndiParams()
      • getClientID

        public String getClientID()
        Get the client ID
        Returns:
        The value
      • setClientID

        public void setClientID​(String clientID)
        Set the client ID
        Parameters:
        clientID - The client id
      • getGroupID

        public String getGroupID()
        Get the group ID
        Returns:
        The value
      • setGroupID

        public void setGroupID​(String groupID)
        Set the group ID
        Parameters:
        groupID - The group id
      • getUseLocalTx

        public Boolean getUseLocalTx()
        Get the use XA flag
        Returns:
        The value
      • setUseLocalTx

        public void setUseLocalTx​(Boolean localTx)
        Set the use XA flag
        Parameters:
        localTx - The value
      • getSetupAttempts

        public int getSetupAttempts()
      • setSetupAttempts

        public void setSetupAttempts​(Integer setupAttempts)
      • getSetupInterval

        public long getSetupInterval()
      • setSetupInterval

        public void setSetupInterval​(Long interval)
      • equals

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Object
        Parameters:
        obj - Object with which to compare
        Returns:
        True if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Return the hash code for the object
        Overrides:
        hashCode in class Object
        Returns:
        The hash code
      • getWorkManager

        public javax.resource.spi.work.WorkManager getWorkManager()
        Get the work manager
        Returns:
        The manager
      • getProperties

        public ActiveMQRAProperties getProperties()
        Get the resource adapter properties
        Returns:
        The properties
      • getDefaultActiveMQConnectionFactory

        public org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory getDefaultActiveMQConnectionFactory()
                                                                                                             throws javax.resource.ResourceException
        Throws:
        javax.resource.ResourceException
      • getConnectionFactory

        public org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory getConnectionFactory​(ConnectionFactoryProperties overrideProperties)
      • newConnectionFactory

        public org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory newConnectionFactory​(ConnectionFactoryProperties overrideProperties)
      • createRecoveryActiveMQConnectionFactory

        public org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory createRecoveryActiveMQConnectionFactory​(ConnectionFactoryProperties overrideProperties)
      • getCodec

        public String getCodec()
      • isIgnoreJTA

        public Boolean isIgnoreJTA()
      • setIgnoreJTA

        public void setIgnoreJTA​(Boolean ignoreJTA)