Package org.apache.activemq.artemis.ra
Class ActiveMQRAManagedConnectionFactory
- java.lang.Object
-
- org.apache.activemq.artemis.ra.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.ResourceAdapterAssociationActiveMQ Artemis ManagedConnectionFactory- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ActiveMQRAManagedConnectionFactory()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectcreateConnectionFactory()Creates a Connection Factory instancejava.lang.ObjectcreateConnectionFactory(javax.resource.spi.ConnectionManager cxManager)Creates a Connection Factory instancejavax.resource.spi.ManagedConnectioncreateManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)Creates a new physical connection to the underlying EIS resource manager.booleanequals(java.lang.Object obj)Indicates whether some other object is "equal to" this one.java.lang.BooleangetAllowLocalTransactions()A getter as well as a setter for those servers that use introspectionjava.lang.BooleangetAutoGroup()A getter as well as a setter for those servers that use introspectionjava.lang.BooleangetBlockOnAcknowledge()A getter as well as a setter for those servers that use introspectionjava.lang.BooleangetBlockOnDurableSend()A getter as well as a setter for those servers that use introspectionjava.lang.BooleangetBlockOnNonDurableSend()A getter as well as a setter for those servers that use introspectionjava.lang.BooleangetCacheDestinations()A getter as well as a setter for those servers that use introspectionjava.lang.LonggetCallTimeout()java.lang.LonggetClientFailureCheckPeriod()java.lang.StringgetClientID()java.lang.IntegergetConfirmationWindowSize()java.lang.StringgetConnectionLoadBalancingPolicyClassName()java.lang.StringgetConnectionParameters()java.lang.LonggetConnectionTTL()java.lang.StringgetConnectorClassName()java.lang.IntegergetConsumerMaxRate()java.lang.IntegergetConsumerWindowSize()java.lang.StringgetDiscoveryAddress()java.lang.LonggetDiscoveryInitialWaitTimeout()java.lang.IntegergetDiscoveryPort()java.lang.LonggetDiscoveryRefreshTimeout()java.lang.IntegergetDupsOKBatchSize()java.lang.BooleangetEnable1xPrefixes()A getter as well as a setter for those servers that use introspectionjava.lang.BooleangetHA()A getter as well as a setter for those servers that use introspectionjava.lang.IntegergetInitialConnectAttempts()java.lang.BooleangetInJtaTransaction()A getter as well as a setter for those servers that use introspectionjava.io.PrintWritergetLogWriter()Get the log writer -- NOT SUPPORTEDjavax.jms.ConnectionMetaDatagetMetaData()Get the connection metadatajava.lang.IntegergetMinLargeMessageSize()java.lang.BooleangetPreAcknowledge()A getter as well as a setter for those servers that use introspectionjava.lang.IntegergetProducerMaxRate()protected ActiveMQRAMCFPropertiesgetProperties()Get the managed connection factory propertiesjava.lang.IntegergetReconnectAttempts()javax.resource.spi.ResourceAdaptergetResourceAdapter()Get the resource adapterorg.apache.activemq.artemis.service.extensions.xa.recovery.XARecoveryConfiggetResourceRecovery()java.lang.LonggetRetryInterval()java.lang.DoublegetRetryIntervalMultiplier()java.lang.IntegergetScheduledThreadPoolMaxSize()java.lang.StringgetSessionDefaultType()Get the default session typejava.lang.IntegergetThreadPoolMaxSize()java.lang.IntegergetTransactionBatchSize()java.lang.BooleangetUseGlobalPools()A getter as well as a setter for those servers that use introspectionjava.lang.IntegergetUseTryLock()Get the useTryLock.inthashCode()Return the hash code for the objectjava.lang.BooleanisAllowLocalTransactions()java.lang.BooleanisAutoGroup()java.lang.BooleanisBlockOnAcknowledge()java.lang.BooleanisBlockOnDurableSend()java.lang.BooleanisBlockOnNonDurableSend()java.lang.BooleanisCacheDestinations()java.lang.BooleanisCompressLargeMessage()java.lang.BooleanisEnable1xPrefixes()java.lang.BooleanisHA()booleanisIgnoreJTA()java.lang.BooleanisInJtaTransaction()java.lang.BooleanisPreAcknowledge()java.lang.BooleanisUseGlobalPools()javax.resource.spi.ManagedConnectionmatchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)Returns a matched connection from the candidate set of connections.voidsetAllowLocalTransactions(java.lang.Boolean allowLocalTransactions)voidsetAutoGroup(java.lang.Boolean autoGroup)voidsetBlockOnAcknowledge(java.lang.Boolean blockOnAcknowledge)voidsetBlockOnDurableSend(java.lang.Boolean blockOnDurableSend)voidsetBlockOnNonDurableSend(java.lang.Boolean blockOnNonDurableSend)voidsetCacheDestinations(java.lang.Boolean cacheDestinations)voidsetCallTimeout(java.lang.Long callTimeout)voidsetClientFailureCheckPeriod(java.lang.Long clientFailureCheckPeriod)voidsetClientID(java.lang.String clientID)voidsetCompressLargeMessage(java.lang.Boolean compressLargeMessage)voidsetConfirmationWindowSize(java.lang.Integer confirmationWindowSize)voidsetConnectionLoadBalancingPolicyClassName(java.lang.String connectionLoadBalancingPolicyClassName)voidsetConnectionParameters(java.lang.String configuration)voidsetConnectionTTL(java.lang.Long connectionTTL)voidsetConnectorClassName(java.lang.String value)voidsetConsumerMaxRate(java.lang.Integer consumerMaxRate)voidsetConsumerWindowSize(java.lang.Integer consumerWindowSize)voidsetDiscoveryAddress(java.lang.String discoveryAddress)voidsetDiscoveryInitialWaitTimeout(java.lang.Long discoveryInitialWaitTimeout)voidsetDiscoveryPort(java.lang.Integer discoveryPort)voidsetDiscoveryRefreshTimeout(java.lang.Long discoveryRefreshTimeout)voidsetDupsOKBatchSize(java.lang.Integer dupsOKBatchSize)voidsetEnable1xPrefixes(java.lang.Boolean enable1xPrefixes)voidsetHA(java.lang.Boolean ha)voidsetInitialConnectAttempts(java.lang.Integer initialConnectAttempts)voidsetInJtaTransaction(java.lang.Boolean inJtaTransaction)voidsetLogWriter(java.io.PrintWriter out)Set the log writer -- NOT SUPPORTEDvoidsetMinLargeMessageSize(java.lang.Integer minLargeMessageSize)voidsetPreAcknowledge(java.lang.Boolean preAcknowledge)voidsetProducerMaxRate(java.lang.Integer producerMaxRate)voidsetReconnectAttempts(java.lang.Integer reconnectAttempts)voidsetResourceAdapter(javax.resource.spi.ResourceAdapter ra)Set the resource adapter
This should ensure that when the RA is stopped, this MCF will be stopped as well.voidsetRetryInterval(java.lang.Long retryInterval)voidsetRetryIntervalMultiplier(java.lang.Double retryIntervalMultiplier)voidsetScheduledThreadPoolMaxSize(java.lang.Integer scheduledThreadPoolMaxSize)voidsetSessionDefaultType(java.lang.String type)Set the default session typevoidsetThreadPoolMaxSize(java.lang.Integer threadPoolMaxSize)voidsetTransactionBatchSize(java.lang.Integer transactionBatchSize)voidsetUseGlobalPools(java.lang.Boolean useGlobalPools)voidsetUseTryLock(java.lang.Integer useTryLock)Set the useTryLock.voidstop()
-
-
-
Method Detail
-
createConnectionFactory
public java.lang.Object createConnectionFactory() throws javax.resource.ResourceExceptionCreates a Connection Factory instance- Specified by:
createConnectionFactoryin interfacejavax.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.ResourceExceptionCreates a Connection Factory instance- Specified by:
createConnectionFactoryin interfacejavax.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.ResourceExceptionCreates a new physical connection to the underlying EIS resource manager.- Specified by:
createManagedConnectionin interfacejavax.resource.spi.ManagedConnectionFactory- Parameters:
subject- Caller's security informationcxRequestInfo- 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.ResourceExceptionReturns a matched connection from the candidate set of connections.- Specified by:
matchManagedConnectionsin interfacejavax.resource.spi.ManagedConnectionFactory- Parameters:
connectionSet- The candidate connection setsubject- Caller's security informationcxRequestInfo- 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.ResourceExceptionSet the log writer -- NOT SUPPORTED- Specified by:
setLogWriterin interfacejavax.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.ResourceExceptionGet the log writer -- NOT SUPPORTED- Specified by:
getLogWriterin interfacejavax.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:
getResourceAdapterin interfacejavax.resource.spi.ResourceAdapterAssociation- Returns:
- The resource adapter
-
isIgnoreJTA
public boolean isIgnoreJTA()
-
setResourceAdapter
public void setResourceAdapter(javax.resource.spi.ResourceAdapter ra) throws javax.resource.ResourceExceptionSet the resource adapter
This should ensure that when the RA is stopped, this MCF will be stopped as well.- Specified by:
setResourceAdapterin interfacejavax.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:
equalsin interfacejavax.resource.spi.ManagedConnectionFactory- Overrides:
equalsin classjava.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:
hashCodein interfacejavax.resource.spi.ManagedConnectionFactory- Overrides:
hashCodein classjava.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()
-
-