Class ActiveMQRAManagedConnectionFactory

  • All Implemented Interfaces:
    java.io.Serializable, javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation

    public final class ActiveMQRAManagedConnectionFactory
    extends java.lang.Object
    implements javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation
    ActiveMQ Artemis ManagedConnectionFactory
    See Also:
    Serialized Form
    • Constructor Detail

      • ActiveMQRAManagedConnectionFactory

        public ActiveMQRAManagedConnectionFactory()
        Constructor
    • Method Detail

      • createConnectionFactory

        public java.lang.Object createConnectionFactory()
                                                 throws javax.resource.ResourceException
        Creates a Connection Factory instance
        Specified by:
        createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
        Returns:
        javax.resource.cci.ConnectionFactory instance
        Throws:
        javax.resource.ResourceException - Thrown if a connection factory can't be created
      • createConnectionFactory

        public java.lang.Object createConnectionFactory​(javax.resource.spi.ConnectionManager cxManager)
                                                 throws javax.resource.ResourceException
        Creates a Connection Factory instance
        Specified by:
        createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
        Parameters:
        cxManager - The connection manager
        Returns:
        javax.resource.cci.ConnectionFactory instance
        Throws:
        javax.resource.ResourceException - Thrown if a connection factory can't be created
      • createManagedConnection

        public javax.resource.spi.ManagedConnection createManagedConnection​(javax.security.auth.Subject subject,
                                                                            javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                                                                     throws javax.resource.ResourceException
        Creates a new physical connection to the underlying EIS resource manager.
        Specified by:
        createManagedConnection in interface javax.resource.spi.ManagedConnectionFactory
        Parameters:
        subject - Caller's security information
        cxRequestInfo - Additional resource adapter specific connection request information
        Returns:
        The managed connection
        Throws:
        javax.resource.ResourceException - Thrown if a managed connection can't be created
      • getResourceRecovery

        public org.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfig getResourceRecovery()
      • matchManagedConnections

        public javax.resource.spi.ManagedConnection matchManagedConnections​(java.util.Set connectionSet,
                                                                            javax.security.auth.Subject subject,
                                                                            javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                                                                     throws javax.resource.ResourceException
        Returns a matched connection from the candidate set of connections.
        Specified by:
        matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
        Parameters:
        connectionSet - The candidate connection set
        subject - Caller's security information
        cxRequestInfo - Additional resource adapter specific connection request information
        Returns:
        The managed connection
        Throws:
        javax.resource.ResourceException - Thrown if the managed connection can not be found
      • setLogWriter

        public void setLogWriter​(java.io.PrintWriter out)
                          throws javax.resource.ResourceException
        Set the log writer -- NOT SUPPORTED
        Specified by:
        setLogWriter in interface javax.resource.spi.ManagedConnectionFactory
        Parameters:
        out - The writer
        Throws:
        javax.resource.ResourceException - Thrown if the writer can't be set
      • getLogWriter

        public java.io.PrintWriter getLogWriter()
                                         throws javax.resource.ResourceException
        Get the log writer -- NOT SUPPORTED
        Specified by:
        getLogWriter in interface javax.resource.spi.ManagedConnectionFactory
        Returns:
        The writer
        Throws:
        javax.resource.ResourceException - Thrown if the writer can't be retrieved
      • getResourceAdapter

        public javax.resource.spi.ResourceAdapter getResourceAdapter()
        Get the resource adapter
        Specified by:
        getResourceAdapter in interface javax.resource.spi.ResourceAdapterAssociation
        Returns:
        The resource adapter
      • isIgnoreJTA

        public boolean isIgnoreJTA()
      • setResourceAdapter

        public void setResourceAdapter​(javax.resource.spi.ResourceAdapter ra)
                                throws javax.resource.ResourceException
        Set the resource adapter
        This should ensure that when the RA is stopped, this MCF will be stopped as well.
        Specified by:
        setResourceAdapter in interface javax.resource.spi.ResourceAdapterAssociation
        Parameters:
        ra - The resource adapter
        Throws:
        javax.resource.ResourceException - Thrown if incorrect resource adapter
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other object is "equal to" this one.
        Specified by:
        equals in interface javax.resource.spi.ManagedConnectionFactory
        Overrides:
        equals in class java.lang.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
        Specified by:
        hashCode in interface javax.resource.spi.ManagedConnectionFactory
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code
      • getSessionDefaultType

        public java.lang.String getSessionDefaultType()
        Get the default session type
        Returns:
        The value
      • setSessionDefaultType

        public void setSessionDefaultType​(java.lang.String type)
        Set the default session type
        Parameters:
        type - either javax.jms.Topic or javax.jms.Queue
      • getConnectionParameters

        public java.lang.String getConnectionParameters()
        Returns:
        the connectionParameters
      • setConnectionParameters

        public void setConnectionParameters​(java.lang.String configuration)
      • getConnectorClassName

        public java.lang.String getConnectorClassName()
        Returns:
        the transportType
      • setConnectorClassName

        public void setConnectorClassName​(java.lang.String value)
      • getConnectionLoadBalancingPolicyClassName

        public java.lang.String getConnectionLoadBalancingPolicyClassName()
      • setConnectionLoadBalancingPolicyClassName

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

        public java.lang.String getDiscoveryAddress()
      • setDiscoveryAddress

        public void setDiscoveryAddress​(java.lang.String discoveryAddress)
      • getDiscoveryPort

        public java.lang.Integer getDiscoveryPort()
      • setDiscoveryPort

        public void setDiscoveryPort​(java.lang.Integer discoveryPort)
      • getDiscoveryRefreshTimeout

        public java.lang.Long getDiscoveryRefreshTimeout()
      • setDiscoveryRefreshTimeout

        public void setDiscoveryRefreshTimeout​(java.lang.Long discoveryRefreshTimeout)
      • getDiscoveryInitialWaitTimeout

        public java.lang.Long getDiscoveryInitialWaitTimeout()
      • setDiscoveryInitialWaitTimeout

        public void setDiscoveryInitialWaitTimeout​(java.lang.Long discoveryInitialWaitTimeout)
      • getClientID

        public java.lang.String getClientID()
      • setClientID

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

        public java.lang.Integer getDupsOKBatchSize()
      • setDupsOKBatchSize

        public void setDupsOKBatchSize​(java.lang.Integer dupsOKBatchSize)
      • getTransactionBatchSize

        public java.lang.Integer getTransactionBatchSize()
      • setTransactionBatchSize

        public void setTransactionBatchSize​(java.lang.Integer transactionBatchSize)
      • getClientFailureCheckPeriod

        public java.lang.Long getClientFailureCheckPeriod()
      • setClientFailureCheckPeriod

        public void setClientFailureCheckPeriod​(java.lang.Long clientFailureCheckPeriod)
      • getConnectionTTL

        public java.lang.Long getConnectionTTL()
      • setConnectionTTL

        public void setConnectionTTL​(java.lang.Long connectionTTL)
      • getCallTimeout

        public java.lang.Long getCallTimeout()
      • setCallTimeout

        public void setCallTimeout​(java.lang.Long callTimeout)
      • getConsumerWindowSize

        public java.lang.Integer getConsumerWindowSize()
      • setConsumerWindowSize

        public void setConsumerWindowSize​(java.lang.Integer consumerWindowSize)
      • getConsumerMaxRate

        public java.lang.Integer getConsumerMaxRate()
      • setConsumerMaxRate

        public void setConsumerMaxRate​(java.lang.Integer consumerMaxRate)
      • getConfirmationWindowSize

        public java.lang.Integer getConfirmationWindowSize()
      • setConfirmationWindowSize

        public void setConfirmationWindowSize​(java.lang.Integer confirmationWindowSize)
      • getProducerMaxRate

        public java.lang.Integer getProducerMaxRate()
      • setProducerMaxRate

        public void setProducerMaxRate​(java.lang.Integer producerMaxRate)
      • getMinLargeMessageSize

        public java.lang.Integer getMinLargeMessageSize()
      • setMinLargeMessageSize

        public void setMinLargeMessageSize​(java.lang.Integer minLargeMessageSize)
      • getBlockOnAcknowledge

        public java.lang.Boolean getBlockOnAcknowledge()
        A getter as well as a setter for those servers that use introspection
      • isBlockOnAcknowledge

        public java.lang.Boolean isBlockOnAcknowledge()
      • setBlockOnAcknowledge

        public void setBlockOnAcknowledge​(java.lang.Boolean blockOnAcknowledge)
      • getBlockOnNonDurableSend

        public java.lang.Boolean getBlockOnNonDurableSend()
        A getter as well as a setter for those servers that use introspection
      • isBlockOnNonDurableSend

        public java.lang.Boolean isBlockOnNonDurableSend()
      • setBlockOnNonDurableSend

        public void setBlockOnNonDurableSend​(java.lang.Boolean blockOnNonDurableSend)
      • getBlockOnDurableSend

        public java.lang.Boolean getBlockOnDurableSend()
        A getter as well as a setter for those servers that use introspection
      • isBlockOnDurableSend

        public java.lang.Boolean isBlockOnDurableSend()
      • setBlockOnDurableSend

        public void setBlockOnDurableSend​(java.lang.Boolean blockOnDurableSend)
      • getAutoGroup

        public java.lang.Boolean getAutoGroup()
        A getter as well as a setter for those servers that use introspection
      • isAutoGroup

        public java.lang.Boolean isAutoGroup()
      • setAutoGroup

        public void setAutoGroup​(java.lang.Boolean autoGroup)
      • getPreAcknowledge

        public java.lang.Boolean getPreAcknowledge()
        A getter as well as a setter for those servers that use introspection
      • isPreAcknowledge

        public java.lang.Boolean isPreAcknowledge()
      • setPreAcknowledge

        public void setPreAcknowledge​(java.lang.Boolean preAcknowledge)
      • getRetryInterval

        public java.lang.Long getRetryInterval()
      • setRetryInterval

        public void setRetryInterval​(java.lang.Long retryInterval)
      • getRetryIntervalMultiplier

        public java.lang.Double getRetryIntervalMultiplier()
      • setRetryIntervalMultiplier

        public void setRetryIntervalMultiplier​(java.lang.Double retryIntervalMultiplier)
      • getReconnectAttempts

        public java.lang.Integer getReconnectAttempts()
      • setReconnectAttempts

        public void setReconnectAttempts​(java.lang.Integer reconnectAttempts)
      • getUseGlobalPools

        public java.lang.Boolean getUseGlobalPools()
        A getter as well as a setter for those servers that use introspection
      • isUseGlobalPools

        public java.lang.Boolean isUseGlobalPools()
      • setUseGlobalPools

        public void setUseGlobalPools​(java.lang.Boolean useGlobalPools)
      • getCacheDestinations

        public java.lang.Boolean getCacheDestinations()
        A getter as well as a setter for those servers that use introspection
      • isCacheDestinations

        public java.lang.Boolean isCacheDestinations()
      • setCacheDestinations

        public void setCacheDestinations​(java.lang.Boolean cacheDestinations)
      • getEnable1xPrefixes

        public java.lang.Boolean getEnable1xPrefixes()
        A getter as well as a setter for those servers that use introspection
      • isEnable1xPrefixes

        public java.lang.Boolean isEnable1xPrefixes()
      • setEnable1xPrefixes

        public void setEnable1xPrefixes​(java.lang.Boolean enable1xPrefixes)
      • getScheduledThreadPoolMaxSize

        public java.lang.Integer getScheduledThreadPoolMaxSize()
      • setScheduledThreadPoolMaxSize

        public void setScheduledThreadPoolMaxSize​(java.lang.Integer scheduledThreadPoolMaxSize)
      • getThreadPoolMaxSize

        public java.lang.Integer getThreadPoolMaxSize()
      • setThreadPoolMaxSize

        public void setThreadPoolMaxSize​(java.lang.Integer threadPoolMaxSize)
      • getHA

        public java.lang.Boolean getHA()
        A getter as well as a setter for those servers that use introspection
      • isHA

        public java.lang.Boolean isHA()
      • setAllowLocalTransactions

        public void setAllowLocalTransactions​(java.lang.Boolean allowLocalTransactions)
      • getAllowLocalTransactions

        public java.lang.Boolean getAllowLocalTransactions()
        A getter as well as a setter for those servers that use introspection
      • isAllowLocalTransactions

        public java.lang.Boolean isAllowLocalTransactions()
      • getInJtaTransaction

        public java.lang.Boolean getInJtaTransaction()
        A getter as well as a setter for those servers that use introspection
      • isInJtaTransaction

        public java.lang.Boolean isInJtaTransaction()
      • setInJtaTransaction

        public void setInJtaTransaction​(java.lang.Boolean inJtaTransaction)
      • setHA

        public void setHA​(java.lang.Boolean ha)
      • isCompressLargeMessage

        public java.lang.Boolean isCompressLargeMessage()
      • setCompressLargeMessage

        public void setCompressLargeMessage​(java.lang.Boolean compressLargeMessage)
      • getInitialConnectAttempts

        public java.lang.Integer getInitialConnectAttempts()
      • setInitialConnectAttempts

        public void setInitialConnectAttempts​(java.lang.Integer initialConnectAttempts)
      • getUseTryLock

        public java.lang.Integer getUseTryLock()
        Get the useTryLock.
        Returns:
        the useTryLock.
      • setUseTryLock

        public void setUseTryLock​(java.lang.Integer useTryLock)
        Set the useTryLock.
        Parameters:
        useTryLock - the useTryLock.
      • getMetaData

        public javax.jms.ConnectionMetaData getMetaData()
        Get the connection metadata
        Returns:
        The metadata
      • getProperties

        protected ActiveMQRAMCFProperties getProperties()
        Get the managed connection factory properties
        Returns:
        The properties
      • stop

        public void stop()