Class ActiveMQRAManagedConnectionFactory
- All Implemented Interfaces:
ManagedConnectionFactory,ResourceAdapterAssociation,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a Connection Factory instance.createConnectionFactory(ConnectionManager cxManager) Creates a Connection Factory instance.createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) Creates a new physical connection to the underlying EIS resource manager.booleanCheck if this ManagedConnectionFactory is equal to another ManagedConnectionFactory.A getter as well as a setter for those servers that use introspectionA getter as well as a setter for those servers that use introspectionA getter as well as a setter for those servers that use introspectionA getter as well as a setter for those servers that use introspectionA getter as well as a setter for those servers that use introspectionA getter as well as a setter for those servers that use introspectionA getter as well as a setter for those servers that use introspectiongetHA()A getter as well as a setter for those servers that use introspectionA getter as well as a setter for those servers that use introspectionNOT SUPPORTEDA getter as well as a setter for those servers that use introspectionprotected ActiveMQRAMCFPropertiesGet the associatedResourceAdapterobject.A getter as well as a setter for those servers that use introspectioninthashCode()Returns the hash code for the ManagedConnectionFactoryisHA()booleanmatchManagedConnections(Set connectionSet, Subject subject, 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) voidsetCompressionLevel(Integer compressionLevel) 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) voidvoidsetInitialConnectAttempts(Integer initialConnectAttempts) voidsetInJtaTransaction(Boolean inJtaTransaction) voidsetLogWriter(PrintWriter out) NOT SUPPORTEDvoidsetMinLargeMessageSize(Integer minLargeMessageSize) voidsetPreAcknowledge(Boolean preAcknowledge) voidsetProducerMaxRate(Integer producerMaxRate) voidsetReconnectAttempts(Integer reconnectAttempts) voidAssociate this object with aResourceAdapterobject.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) voidstop()
-
Constructor Details
-
ActiveMQRAManagedConnectionFactory
public ActiveMQRAManagedConnectionFactory()
-
-
Method Details
-
createConnectionFactory
Creates a Connection Factory instance. The Connection Factory instance gets initialized with a default ConnectionManager provided by the resource adapter.- Specified by:
createConnectionFactoryin interfaceManagedConnectionFactory- Returns:
- EIS-specific Connection Factory instance or jakarta.resource.cci.ConnectionFactory instance
- Throws:
ResourceException- Generic exceptionResourceAdapterInternalException- Resource adapter related error condition
-
createConnectionFactory
Creates a Connection Factory instance. The Connection Factory instance gets initialized with the passed ConnectionManager. In the managed scenario, ConnectionManager is provided by the application server.- Specified by:
createConnectionFactoryin interfaceManagedConnectionFactory- Parameters:
cxManager- ConnectionManager to be associated with created EIS connection factory instance- Returns:
- EIS-specific Connection Factory instance or jakarta.resource.cci.ConnectionFactory instance
- Throws:
ResourceException- Generic exceptionResourceAdapterInternalException- Resource adapter related error condition
-
createManagedConnection
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException Creates a new physical connection to the underlying EIS resource manager.ManagedConnectionFactory uses the security information (passed as Subject) and additional ConnectionRequestInfo (which is specific to ResourceAdapter and opaque to application server) to create this new connection.
- Specified by:
createManagedConnectionin interfaceManagedConnectionFactory- Parameters:
subject- Caller's security informationcxRequestInfo- Additional resource adapter specific connection request information- Returns:
- ManagedConnection instance
- Throws:
ResourceException- generic exceptionSecurityException- security related errorResourceAllocationException- failed to allocate system resources for connection requestResourceAdapterInternalException- resource adapter related error conditionEISSystemException- internal error condition in EIS instance
-
getResourceRecovery
-
matchManagedConnections
public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException Returns a matched connection from the candidate set of connections.ManagedConnectionFactory uses the security info (as in Subject) and information provided through ConnectionRequestInfo and additional Resource Adapter specific criteria to do matching. Note that criteria used for matching is specific to a resource adapter and is not prescribed by the Connector specification.
This method returns a ManagedConnection instance that is the best match for handling the connection allocation request.
- Specified by:
matchManagedConnectionsin interfaceManagedConnectionFactory- Parameters:
connectionSet- candidate connection setsubject- caller's security informationcxRequestInfo- additional resource adapter specific connection request information- Returns:
- ManagedConnection if resource adapter finds an acceptable match otherwise null
- Throws:
ResourceException- generic exceptionSecurityException- security related errorResourceAdapterInternalException- resource adapter related error conditionNotSupportedException- if operation is not supported
-
setLogWriter
NOT SUPPORTEDSet the log writer for this ManagedConnectionFactory instance.
The log writer is a character output stream to which all logging and tracing messages for this ManagedConnectionfactory instance will be printed.
ApplicationServer manages the association of output stream with the ManagedConnectionFactory. When a ManagedConnectionFactory object is created the log writer is initially null, in other words, logging is disabled. Once a log writer is associated with a ManagedConnectionFactory, logging and tracing for ManagedConnectionFactory instance is enabled.
The ManagedConnection instances created by ManagedConnectionFactory "inherits" the log writer, which can be overridden by ApplicationServer using ManagedConnection.setLogWriter to set ManagedConnection specific logging and tracing.
- Specified by:
setLogWriterin interfaceManagedConnectionFactory- Parameters:
out- PrintWriter - an out stream for error logging and tracing- Throws:
ResourceException- generic exceptionResourceAdapterInternalException- resource adapter related error condition
-
getLogWriter
NOT SUPPORTEDGet the log writer for this ManagedConnectionFactory instance.
The log writer is a character output stream to which all logging and tracing messages for this ManagedConnectionFactory instance will be printed
ApplicationServer manages the association of output stream with the ManagedConnectionFactory. When a ManagedConnectionFactory object is created the log writer is initially null, in other words, logging is disabled.
- Specified by:
getLogWriterin interfaceManagedConnectionFactory- Returns:
- PrintWriter
- Throws:
ResourceException- generic exception
-
getResourceAdapter
Get the associatedResourceAdapterobject.- Specified by:
getResourceAdapterin interfaceResourceAdapterAssociation- Returns:
- the associated
ResourceAdapterobject.
-
isIgnoreJTA
public boolean isIgnoreJTA() -
setResourceAdapter
Associate this object with aResourceAdapterobject. Note, this method must be called exactly once. That is, the association must not change during the lifetime of this object.- Specified by:
setResourceAdapterin interfaceResourceAdapterAssociation- Parameters:
ra-ResourceAdapterobject to be associated with.- Throws:
ResourceException- generic exception.ResourceAdapterInternalException- resource adapter related error condition.IllegalStateException- indicates that this object is in an illegal state for the method invocation. For example, this occurs when this method is called more than once on the same object.
-
equals
Description copied from interface:ManagedConnectionFactoryCheck if this ManagedConnectionFactory is equal to another ManagedConnectionFactory.- Specified by:
equalsin interfaceManagedConnectionFactory- Overrides:
equalsin classObject- Parameters:
obj- to check- Returns:
- true if two instances are equal
-
hashCode
public int hashCode()Description copied from interface:ManagedConnectionFactoryReturns the hash code for the ManagedConnectionFactory- Specified by:
hashCodein interfaceManagedConnectionFactory- Overrides:
hashCodein classObject- Returns:
- hash code for the ManagedConnectionFactory
-
getSessionDefaultType
-
setSessionDefaultType
Set the default session type- Parameters:
type- either jakarta.jms.Topic or jakarta.jms.Queue
-
getConnectionParameters
-
setConnectionParameters
-
getConnectorClassName
-
setConnectorClassName
-
getConnectionLoadBalancingPolicyClassName
-
setConnectionLoadBalancingPolicyClassName
public void setConnectionLoadBalancingPolicyClassName(String connectionLoadBalancingPolicyClassName) -
getDiscoveryAddress
-
setDiscoveryAddress
-
getDiscoveryPort
-
setDiscoveryPort
-
getDiscoveryRefreshTimeout
-
setDiscoveryRefreshTimeout
-
getDiscoveryInitialWaitTimeout
-
setDiscoveryInitialWaitTimeout
-
getClientID
-
setClientID
-
getDupsOKBatchSize
-
setDupsOKBatchSize
-
getTransactionBatchSize
-
setTransactionBatchSize
-
getClientFailureCheckPeriod
-
setClientFailureCheckPeriod
-
getConnectionTTL
-
setConnectionTTL
-
getCallTimeout
-
setCallTimeout
-
getConsumerWindowSize
-
setConsumerWindowSize
-
getConsumerMaxRate
-
setConsumerMaxRate
-
getConfirmationWindowSize
-
setConfirmationWindowSize
-
getProducerMaxRate
-
setProducerMaxRate
-
getMinLargeMessageSize
-
setMinLargeMessageSize
-
getBlockOnAcknowledge
A getter as well as a setter for those servers that use introspection -
isBlockOnAcknowledge
-
setBlockOnAcknowledge
-
getBlockOnNonDurableSend
A getter as well as a setter for those servers that use introspection -
isBlockOnNonDurableSend
-
setBlockOnNonDurableSend
-
getBlockOnDurableSend
A getter as well as a setter for those servers that use introspection -
isBlockOnDurableSend
-
setBlockOnDurableSend
-
getAutoGroup
A getter as well as a setter for those servers that use introspection -
isAutoGroup
-
setAutoGroup
-
getPreAcknowledge
A getter as well as a setter for those servers that use introspection -
isPreAcknowledge
-
setPreAcknowledge
-
getRetryInterval
-
setRetryInterval
-
getRetryIntervalMultiplier
-
setRetryIntervalMultiplier
-
getReconnectAttempts
-
setReconnectAttempts
-
getUseGlobalPools
A getter as well as a setter for those servers that use introspection -
isUseGlobalPools
-
setUseGlobalPools
-
getCacheDestinations
A getter as well as a setter for those servers that use introspection -
isCacheDestinations
-
setCacheDestinations
-
getEnable1xPrefixes
A getter as well as a setter for those servers that use introspection -
isEnable1xPrefixes
-
setEnable1xPrefixes
-
getScheduledThreadPoolMaxSize
-
setScheduledThreadPoolMaxSize
-
getThreadPoolMaxSize
-
setThreadPoolMaxSize
-
getHA
A getter as well as a setter for those servers that use introspection -
isHA
-
setAllowLocalTransactions
-
getAllowLocalTransactions
A getter as well as a setter for those servers that use introspection -
isAllowLocalTransactions
-
getInJtaTransaction
A getter as well as a setter for those servers that use introspection -
isInJtaTransaction
-
setInJtaTransaction
-
setHA
-
isCompressLargeMessage
-
setCompressLargeMessage
-
getCompressionLevel
-
setCompressionLevel
-
getInitialConnectAttempts
-
setInitialConnectAttempts
-
getUseTryLock
-
setUseTryLock
-
getMetaData
-
getProperties
-
stop
public void stop()
-