Package org.apache.activemq.artemis.ra
Class ActiveMQRAManagedConnectionFactory
- java.lang.Object
-
- org.apache.activemq.artemis.ra.ActiveMQRAManagedConnectionFactory
-
- All Implemented Interfaces:
Serializable,javax.resource.spi.ManagedConnectionFactory,javax.resource.spi.ResourceAdapterAssociation
public final class ActiveMQRAManagedConnectionFactory extends Object implements javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation
ActiveMQ 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 ObjectcreateConnectionFactory()Creates a Connection Factory instanceObjectcreateConnectionFactory(javax.resource.spi.ConnectionManager cxManager)Creates a Connection Factory instancejavax.resource.spi.ManagedConnectioncreateManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)Creates a new physical connection to the underlying EIS resource manager.booleanequals(Object obj)Indicates whether some other object is "equal to" this one.BooleangetAllowLocalTransactions()A getter as well as a setter for those servers that use introspectionBooleangetAutoGroup()A getter as well as a setter for those servers that use introspectionBooleangetBlockOnAcknowledge()A getter as well as a setter for those servers that use introspectionBooleangetBlockOnDurableSend()A getter as well as a setter for those servers that use introspectionBooleangetBlockOnNonDurableSend()A getter as well as a setter for those servers that use introspectionBooleangetCacheDestinations()A getter as well as a setter for those servers that use introspectionLonggetCallTimeout()LonggetClientFailureCheckPeriod()StringgetClientID()IntegergetConfirmationWindowSize()StringgetConnectionLoadBalancingPolicyClassName()StringgetConnectionParameters()LonggetConnectionTTL()StringgetConnectorClassName()IntegergetConsumerMaxRate()IntegergetConsumerWindowSize()StringgetDiscoveryAddress()LonggetDiscoveryInitialWaitTimeout()IntegergetDiscoveryPort()LonggetDiscoveryRefreshTimeout()IntegergetDupsOKBatchSize()BooleangetEnable1xPrefixes()A getter as well as a setter for those servers that use introspectionBooleangetHA()A getter as well as a setter for those servers that use introspectionIntegergetInitialConnectAttempts()BooleangetInJtaTransaction()A getter as well as a setter for those servers that use introspectionPrintWritergetLogWriter()Get the log writer -- NOT SUPPORTEDjavax.jms.ConnectionMetaDatagetMetaData()Get the connection metadataIntegergetMinLargeMessageSize()BooleangetPreAcknowledge()A getter as well as a setter for those servers that use introspectionIntegergetProducerMaxRate()protected ActiveMQRAMCFPropertiesgetProperties()Get the managed connection factory propertiesIntegergetReconnectAttempts()javax.resource.spi.ResourceAdaptergetResourceAdapter()Get the resource adapterXARecoveryConfiggetResourceRecovery()LonggetRetryInterval()DoublegetRetryIntervalMultiplier()IntegergetScheduledThreadPoolMaxSize()StringgetSessionDefaultType()Get the default session typeIntegergetThreadPoolMaxSize()IntegergetTransactionBatchSize()BooleangetUseGlobalPools()A getter as well as a setter for those servers that use introspectionIntegergetUseTryLock()Get the useTryLock.inthashCode()Return the hash code for the objectBooleanisAllowLocalTransactions()BooleanisAutoGroup()BooleanisBlockOnAcknowledge()BooleanisBlockOnDurableSend()BooleanisBlockOnNonDurableSend()BooleanisCacheDestinations()BooleanisCompressLargeMessage()BooleanisEnable1xPrefixes()BooleanisHA()booleanisIgnoreJTA()BooleanisInJtaTransaction()BooleanisPreAcknowledge()BooleanisUseGlobalPools()javax.resource.spi.ManagedConnectionmatchManagedConnections(Set connectionSet, Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)Returns a matched connection from the candidate set of connections.voidsetAllowLocalTransactions(Boolean allowLocalTransactions)voidsetAutoGroup(Boolean autoGroup)voidsetBlockOnAcknowledge(Boolean blockOnAcknowledge)voidsetBlockOnDurableSend(Boolean blockOnDurableSend)voidsetBlockOnNonDurableSend(Boolean blockOnNonDurableSend)voidsetCacheDestinations(Boolean cacheDestinations)voidsetCallTimeout(Long callTimeout)voidsetClientFailureCheckPeriod(Long clientFailureCheckPeriod)voidsetClientID(String clientID)voidsetCompressLargeMessage(Boolean compressLargeMessage)voidsetConfirmationWindowSize(Integer confirmationWindowSize)voidsetConnectionLoadBalancingPolicyClassName(String connectionLoadBalancingPolicyClassName)voidsetConnectionParameters(String configuration)voidsetConnectionTTL(Long connectionTTL)voidsetConnectorClassName(String value)voidsetConsumerMaxRate(Integer consumerMaxRate)voidsetConsumerWindowSize(Integer consumerWindowSize)voidsetDiscoveryAddress(String discoveryAddress)voidsetDiscoveryInitialWaitTimeout(Long discoveryInitialWaitTimeout)voidsetDiscoveryPort(Integer discoveryPort)voidsetDiscoveryRefreshTimeout(Long discoveryRefreshTimeout)voidsetDupsOKBatchSize(Integer dupsOKBatchSize)voidsetEnable1xPrefixes(Boolean enable1xPrefixes)voidsetHA(Boolean ha)voidsetInitialConnectAttempts(Integer initialConnectAttempts)voidsetInJtaTransaction(Boolean inJtaTransaction)voidsetLogWriter(PrintWriter out)Set the log writer -- NOT SUPPORTEDvoidsetMinLargeMessageSize(Integer minLargeMessageSize)voidsetPreAcknowledge(Boolean preAcknowledge)voidsetProducerMaxRate(Integer producerMaxRate)voidsetReconnectAttempts(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(Long retryInterval)voidsetRetryIntervalMultiplier(Double retryIntervalMultiplier)voidsetScheduledThreadPoolMaxSize(Integer scheduledThreadPoolMaxSize)voidsetSessionDefaultType(String type)Set the default session typevoidsetThreadPoolMaxSize(Integer threadPoolMaxSize)voidsetTransactionBatchSize(Integer transactionBatchSize)voidsetUseGlobalPools(Boolean useGlobalPools)voidsetUseTryLock(Integer useTryLock)Set the useTryLock.voidstop()
-
-
-
Method Detail
-
createConnectionFactory
public Object createConnectionFactory() throws javax.resource.ResourceException
Creates 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 Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager) throws javax.resource.ResourceException
Creates 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(Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
Creates 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 XARecoveryConfig getResourceRecovery()
-
matchManagedConnections
public javax.resource.spi.ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
Returns 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(PrintWriter out) throws javax.resource.ResourceException
Set 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 PrintWriter getLogWriter() throws javax.resource.ResourceException
Get 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(Object obj)
Indicates whether some other object is "equal to" this one.
-
hashCode
public int hashCode()
Return the hash code for the object
-
getSessionDefaultType
public String getSessionDefaultType()
Get the default session type- Returns:
- The value
-
setSessionDefaultType
public void setSessionDefaultType(String type)
Set the default session type- Parameters:
type- either javax.jms.Topic or javax.jms.Queue
-
getConnectionParameters
public String getConnectionParameters()
- Returns:
- the connectionParameters
-
setConnectionParameters
public void setConnectionParameters(String configuration)
-
getConnectorClassName
public String getConnectorClassName()
- Returns:
- the transportType
-
setConnectorClassName
public void setConnectorClassName(String value)
-
getConnectionLoadBalancingPolicyClassName
public String getConnectionLoadBalancingPolicyClassName()
-
setConnectionLoadBalancingPolicyClassName
public void setConnectionLoadBalancingPolicyClassName(String connectionLoadBalancingPolicyClassName)
-
getDiscoveryAddress
public String getDiscoveryAddress()
-
setDiscoveryAddress
public void setDiscoveryAddress(String discoveryAddress)
-
getDiscoveryPort
public Integer getDiscoveryPort()
-
setDiscoveryPort
public void setDiscoveryPort(Integer discoveryPort)
-
getDiscoveryRefreshTimeout
public Long getDiscoveryRefreshTimeout()
-
setDiscoveryRefreshTimeout
public void setDiscoveryRefreshTimeout(Long discoveryRefreshTimeout)
-
getDiscoveryInitialWaitTimeout
public Long getDiscoveryInitialWaitTimeout()
-
setDiscoveryInitialWaitTimeout
public void setDiscoveryInitialWaitTimeout(Long discoveryInitialWaitTimeout)
-
getClientID
public String getClientID()
-
setClientID
public void setClientID(String clientID)
-
getDupsOKBatchSize
public Integer getDupsOKBatchSize()
-
setDupsOKBatchSize
public void setDupsOKBatchSize(Integer dupsOKBatchSize)
-
getTransactionBatchSize
public Integer getTransactionBatchSize()
-
setTransactionBatchSize
public void setTransactionBatchSize(Integer transactionBatchSize)
-
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)
-
getConsumerWindowSize
public Integer getConsumerWindowSize()
-
setConsumerWindowSize
public void setConsumerWindowSize(Integer consumerWindowSize)
-
getConsumerMaxRate
public Integer getConsumerMaxRate()
-
setConsumerMaxRate
public void setConsumerMaxRate(Integer consumerMaxRate)
-
getConfirmationWindowSize
public Integer getConfirmationWindowSize()
-
setConfirmationWindowSize
public void setConfirmationWindowSize(Integer confirmationWindowSize)
-
getProducerMaxRate
public Integer getProducerMaxRate()
-
setProducerMaxRate
public void setProducerMaxRate(Integer producerMaxRate)
-
getMinLargeMessageSize
public Integer getMinLargeMessageSize()
-
setMinLargeMessageSize
public void setMinLargeMessageSize(Integer minLargeMessageSize)
-
getBlockOnAcknowledge
public Boolean getBlockOnAcknowledge()
A getter as well as a setter for those servers that use introspection
-
isBlockOnAcknowledge
public Boolean isBlockOnAcknowledge()
-
setBlockOnAcknowledge
public void setBlockOnAcknowledge(Boolean blockOnAcknowledge)
-
getBlockOnNonDurableSend
public Boolean getBlockOnNonDurableSend()
A getter as well as a setter for those servers that use introspection
-
isBlockOnNonDurableSend
public Boolean isBlockOnNonDurableSend()
-
setBlockOnNonDurableSend
public void setBlockOnNonDurableSend(Boolean blockOnNonDurableSend)
-
getBlockOnDurableSend
public Boolean getBlockOnDurableSend()
A getter as well as a setter for those servers that use introspection
-
isBlockOnDurableSend
public Boolean isBlockOnDurableSend()
-
setBlockOnDurableSend
public void setBlockOnDurableSend(Boolean blockOnDurableSend)
-
getAutoGroup
public Boolean getAutoGroup()
A getter as well as a setter for those servers that use introspection
-
isAutoGroup
public Boolean isAutoGroup()
-
setAutoGroup
public void setAutoGroup(Boolean autoGroup)
-
getPreAcknowledge
public Boolean getPreAcknowledge()
A getter as well as a setter for those servers that use introspection
-
isPreAcknowledge
public Boolean isPreAcknowledge()
-
setPreAcknowledge
public void setPreAcknowledge(Boolean preAcknowledge)
-
getRetryInterval
public Long getRetryInterval()
-
setRetryInterval
public void setRetryInterval(Long retryInterval)
-
getRetryIntervalMultiplier
public Double getRetryIntervalMultiplier()
-
setRetryIntervalMultiplier
public void setRetryIntervalMultiplier(Double retryIntervalMultiplier)
-
getReconnectAttempts
public Integer getReconnectAttempts()
-
setReconnectAttempts
public void setReconnectAttempts(Integer reconnectAttempts)
-
getUseGlobalPools
public Boolean getUseGlobalPools()
A getter as well as a setter for those servers that use introspection
-
isUseGlobalPools
public Boolean isUseGlobalPools()
-
setUseGlobalPools
public void setUseGlobalPools(Boolean useGlobalPools)
-
getCacheDestinations
public Boolean getCacheDestinations()
A getter as well as a setter for those servers that use introspection
-
isCacheDestinations
public Boolean isCacheDestinations()
-
setCacheDestinations
public void setCacheDestinations(Boolean cacheDestinations)
-
getEnable1xPrefixes
public Boolean getEnable1xPrefixes()
A getter as well as a setter for those servers that use introspection
-
isEnable1xPrefixes
public Boolean isEnable1xPrefixes()
-
setEnable1xPrefixes
public void setEnable1xPrefixes(Boolean enable1xPrefixes)
-
getScheduledThreadPoolMaxSize
public Integer getScheduledThreadPoolMaxSize()
-
setScheduledThreadPoolMaxSize
public void setScheduledThreadPoolMaxSize(Integer scheduledThreadPoolMaxSize)
-
getThreadPoolMaxSize
public Integer getThreadPoolMaxSize()
-
setThreadPoolMaxSize
public void setThreadPoolMaxSize(Integer threadPoolMaxSize)
-
getHA
public Boolean getHA()
A getter as well as a setter for those servers that use introspection
-
isHA
public Boolean isHA()
-
setAllowLocalTransactions
public void setAllowLocalTransactions(Boolean allowLocalTransactions)
-
getAllowLocalTransactions
public Boolean getAllowLocalTransactions()
A getter as well as a setter for those servers that use introspection
-
isAllowLocalTransactions
public Boolean isAllowLocalTransactions()
-
getInJtaTransaction
public Boolean getInJtaTransaction()
A getter as well as a setter for those servers that use introspection
-
isInJtaTransaction
public Boolean isInJtaTransaction()
-
setInJtaTransaction
public void setInJtaTransaction(Boolean inJtaTransaction)
-
setHA
public void setHA(Boolean ha)
-
isCompressLargeMessage
public Boolean isCompressLargeMessage()
-
setCompressLargeMessage
public void setCompressLargeMessage(Boolean compressLargeMessage)
-
getInitialConnectAttempts
public Integer getInitialConnectAttempts()
-
setInitialConnectAttempts
public void setInitialConnectAttempts(Integer initialConnectAttempts)
-
getUseTryLock
public Integer getUseTryLock()
Get the useTryLock.- Returns:
- the useTryLock.
-
setUseTryLock
public void setUseTryLock(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()
-
-