Class ActiveMQResourceAdapter
- All Implemented Interfaces:
ResourceAdapter,Serializable
- Direct Known Subclasses:
ActiveMQResourceAdapter
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseConnectionFactory(ConnectionFactoryProperties properties) protected BroadcastEndpointFactorycreateBroadcastEndpointFactory(ConnectionFactoryProperties overrideProperties) createRecoveryActiveMQConnectionFactory(ConnectionFactoryProperties overrideProperties) createSession(ClientSessionFactory parameterFactory, int ackMode, String user, String pass, Boolean preAck, Integer dupsOkBatchSize, Integer transactionBatchSize, boolean deliveryTransacted, boolean useLocalTx, Integer txTimeout) voidendpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) This is called during the activation of a message endpoint.voidendpointDeactivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) This is called when a message endpoint is deactivated.booleangetCodec()getConnectionFactory(ConnectionFactoryProperties overrideProperties) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.getHA()Hashtable<?,?> intlonggetTSR()getXAResources(ActivationSpec[] specs) This method is called by the application server during crash recovery.inthashCode()Deprecated.booleannewConnectionFactory(ConnectionFactoryProperties overrideProperties) overrideConnectionParameters(Map<String, Object> connectionParams, Map<String, Object> overrideConnectionParams) voidsetAutoGroup(Boolean autoGroup) voidsetBlockOnAcknowledge(Boolean blockOnAcknowledge) voidsetBlockOnDurableSend(Boolean blockOnDurableSend) voidsetBlockOnNonDurableSend(Boolean blockOnNonDurableSend) voidsetCacheDestinations(Boolean cacheDestinations) voidsetCacheLargeMessagesClient(Boolean cacheLargeMessagesClient) voidsetCallFailoverTimeout(Long callFailoverTimeout) voidsetCallTimeout(Long callTimeout) voidsetClientFailureCheckPeriod(Long clientFailureCheckPeriod) voidsetClientID(String clientID) voidsetCompressionLevel(Integer compressionLevel) Sets what compressionLevel to use when compressing messagesvoidsetCompressLargeMessage(Boolean compressLargeMessage) voidsetConfirmationWindowSize(Integer confirmationWindowSize) voidsetConnectionLoadBalancingPolicyClassName(String connectionLoadBalancingPolicyClassName) voidsetConnectionParameters(String config) voidsetConnectionTTL(Long connectionTTL) voidsetConnectorClassName(String connectorClassName) voidsetConsumerMaxRate(Integer consumerMaxRate) voidsetConsumerWindowSize(Integer consumerWindowSize) voidsetDeserializationAllowList(String deserializationAllowList) voidsetDeserializationBlackList(String deserializationDenyList) Deprecated, for removal: This API element is subject to removal in a future version.voidsetDeserializationDenyList(String deserializationDenyList) voidsetDeserializationWhiteList(String deserializationAllowList) Deprecated, for removal: This API element is subject to removal in a future version.voidvoidsetDiscoveryInitialWaitTimeout(Long discoveryInitialWaitTimeout) voidsetDiscoveryLocalBindAddress(String discoveryLocalBindAddress) voidsetDiscoveryPort(Integer dgp) voidsetDiscoveryRefreshTimeout(Long discoveryRefreshTimeout) voidsetDupsOKBatchSize(Integer dupsOKBatchSize) voidsetEnable1xPrefixes(Boolean enable1xPrefixes) voidsetEntries(String entries) voidsetFailoverOnInitialConnection(Boolean failoverOnInitialConnection) Deprecated.voidsetGroupID(String groupID) voidvoidsetIgnoreJTA(Boolean ignoreJTA) voidsetInitialConnectAttempts(Integer initialConnectAttempts) voidsetInitialMessagePacketSize(Integer initialMessagePacketSize) voidsetJgroupsChannelLocatorClass(String jgroupsChannelLocatorClass) voidsetJgroupsChannelName(String jgroupsChannelName) voidsetJgroupsChannelRefName(String jgroupsChannelRefName) voidsetJgroupsFile(String jgroupsFile) voidsetJndiParams(String jndiParams) voidsetManagedConnectionFactory(ActiveMQRAManagedConnectionFactory activeMQRAManagedConnectionFactory) voidsetMaxRetryInterval(Long maxRetryInterval) voidsetMinLargeMessageSize(Integer minLargeMessageSize) voidsetPassword(String password) voidsetPasswordCodec(String passwordCodec) voidsetPreAcknowledge(Boolean preAcknowledge) voidsetProducerMaxRate(Integer producerMaxRate) voidsetProducerWindowSize(Integer producerWindowSize) voidsetProtocolManagerFactoryStr(String protocolManagerFactoryStr) voidsetReconnectAttempts(Integer reconnectAttempts) voidsetRetryInterval(Long retryInterval) voidsetRetryIntervalMultiplier(Double retryIntervalMultiplier) voidsetScheduledThreadPoolMaxSize(Integer scheduledThreadPoolMaxSize) voidsetSetupAttempts(Integer setupAttempts) voidsetSetupInterval(Long interval) voidsetThreadPoolMaxSize(Integer threadPoolMaxSize) voidsetTransactionBatchSize(Integer transactionBatchSize) protected voidsetup()voidsetUseAutoRecovery(Boolean useAutoRecovery) voidsetUseGlobalPools(Boolean useGlobalPools) voidsetUseJNDI(Boolean value) voidsetUseLocalTx(Boolean localTx) voidsetUseMaskedPassword(Boolean useMaskedPassword) voidsetUserName(String userName) voidsetUseTopologyForLoadBalancing(Boolean useTopologyForLoadBalancing) voidstart(BootstrapContext ctx) This is called when a resource adapter instance is bootstrapped.voidstop()This is called when a resource adapter instance is undeployed or during application server shutdown.
-
Field Details
-
PRODUCT_NAME
- See Also:
-
-
Constructor Details
-
ActiveMQResourceAdapter
public ActiveMQResourceAdapter()
-
-
Method Details
-
getTSR
-
endpointActivation
public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) throws ResourceException This is called during the activation of a message endpoint. This causes the resource adapter instance to do the necessary setup (ie., setup message delivery for the message endpoint with a message provider). Note that message delivery to the message endpoint might start even before this method returns.Endpoint activation is deemed successful only when this method completes successfully without throwing any exceptions.
- Specified by:
endpointActivationin interfaceResourceAdapter- Parameters:
endpointFactory- a message endpoint factory instance.spec- an activation spec JavaBean instance.- Throws:
NotSupportedException- indicates message endpoint activation rejection due to incorrect activation setup information.ResourceException
-
endpointDeactivation
This is called when a message endpoint is deactivated. The instances passed as arguments to this method call should be identical to those passed in for the correspondingendpointActivationcall. This causes the resource adapter to stop delivering messages to the message endpoint.Any exception thrown by this method is ignored. After this method call, the endpoint is deemed inactive.
- Specified by:
endpointDeactivationin interfaceResourceAdapter- Parameters:
endpointFactory- a message endpoint factory instance.spec- an activation spec JavaBean instance.
-
getXAResources
This method is called by the application server during crash recovery. This method takes in an array ofActivationSpecJavaBeans and returns an array ofXAResourceobjects each of which represents a unique resource manager. The resource adapter may return null if it does not implement theXAResourceinterface. Otherwise, it must return an array ofXAResourceobjects, each of which represents a unique resource manager that was used by the endpoint applications. The application server uses theXAResourceobjects to query each resource manager for a list of in-doubt transactions. It then completes each pending transaction by sending the commit decision to the participating resource managers.- Specified by:
getXAResourcesin interfaceResourceAdapter- Parameters:
specs- an array ofActivationSpecJavaBeans each of which corresponds to an deployed endpoint application that was active prior to the system crash.- Returns:
- an array of
XAResourceobjects each of which represents a unique resource manager. - Throws:
ResourceException- generic exception if operation fails due to an error condition.
-
start
This is called when a resource adapter instance is bootstrapped. This may be during resource adapter deployment or application server startup. This is a startup notification from the application server, and this method is called by an application server thread. The application server thread executes in an unspecified context.During this method call a ResourceAdapter JavaBean is responsible for initializing the resource adapter instance. Any exception thrown during this method call causes the application server to abort the bootstrap procedure for this specific resource adapter instance.
- Specified by:
startin interfaceResourceAdapter- Parameters:
ctx- a bootstrap context containing references to useful facilities that could be used by a resource adapter instance.- Throws:
ResourceAdapterInternalException- indicates bootstrap failure. The resource adapter instance is unusable and must be discarded.
-
stop
public void stop()This is called when a resource adapter instance is undeployed or during application server shutdown. This is a shutdown notification from the application server, and this method is called by an application server thread. The application server thread executes in an unspecified context.During this method call, a ResourceAdapter JavaBean is responsible for performing an orderly shutdown of the resource adapter instance. Any exception thrown by this method call does not alter the processing of the application server shutdown or resource adapter undeployment that caused this method call. The application server may log the exception information for error reporting purposes.
- Specified by:
stopin interfaceResourceAdapter
-
setUseAutoRecovery
-
isUseAutoRecovery
-
isUseMaskedPassword
-
setUseMaskedPassword
-
setPasswordCodec
-
getPasswordCodec
-
setConnectorClassName
-
getConnectorClassName
-
getConnectionParameters
-
setConnectionParameters
-
getHA
-
setHA
-
getEntries
-
getJndiName
-
setEntries
-
getDiscoveryAddress
-
setJgroupsFile
-
getJgroupsFile
-
getJgroupsChannelName
-
setJgroupsChannelName
-
setDiscoveryAddress
-
getDiscoveryPort
-
setDiscoveryLocalBindAddress
-
getDiscoveryLocalBindAddress
-
setDiscoveryPort
-
getDiscoveryRefreshTimeout
-
setDiscoveryRefreshTimeout
-
getDiscoveryInitialWaitTimeout
-
setDiscoveryInitialWaitTimeout
-
getClientFailureCheckPeriod
-
setClientFailureCheckPeriod
-
getConnectionTTL
-
setConnectionTTL
-
isCacheLargeMessagesClient
-
setCacheLargeMessagesClient
-
isCompressLargeMessage
-
setFailoverOnInitialConnection
Deprecated. -
isFailoverOnInitialConnection
Deprecated. -
setCacheDestinations
-
isCacheDestinations
-
setEnable1xPrefixes
-
isEnable1xPrefixes
-
setCompressLargeMessage
-
getCompressionLevel
-
setCompressionLevel
Sets what compressionLevel to use when compressing messages- Parameters:
compressionLevel- must be -1 (default) or 0-9
-
getCallTimeout
-
setCallTimeout
-
getCallFailoverTimeout
-
setCallFailoverTimeout
-
getDupsOKBatchSize
-
setDupsOKBatchSize
-
getTransactionBatchSize
-
setTransactionBatchSize
-
getConsumerWindowSize
-
setConsumerWindowSize
-
getConsumerMaxRate
-
setConsumerMaxRate
-
getConfirmationWindowSize
-
setConfirmationWindowSize
-
getProducerMaxRate
-
setProducerMaxRate
-
setUseTopologyForLoadBalancing
-
getUseTopologyForLoadBalancing
-
isUseTopologyForLoadBalancing
-
getProducerWindowSize
-
setProducerWindowSize
-
getProtocolManagerFactoryStr
-
setProtocolManagerFactoryStr
-
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, 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
-
setDeserializationDenyList
-
getDeserializationAllowList
-
setDeserializationAllowList
-
getMinLargeMessageSize
-
setMinLargeMessageSize
-
getBlockOnAcknowledge
-
setBlockOnAcknowledge
-
getBlockOnNonDurableSend
-
setBlockOnNonDurableSend
-
getBlockOnDurableSend
-
setBlockOnDurableSend
-
getAutoGroup
-
setAutoGroup
-
getPreAcknowledge
-
setPreAcknowledge
-
getInitialConnectAttempts
-
setInitialConnectAttempts
-
getInitialMessagePacketSize
-
setInitialMessagePacketSize
-
getRetryInterval
-
setRetryInterval
-
getRetryIntervalMultiplier
-
setRetryIntervalMultiplier
-
getMaxRetryInterval
-
setMaxRetryInterval
-
getReconnectAttempts
-
setReconnectAttempts
-
getConnectionLoadBalancingPolicyClassName
-
setConnectionLoadBalancingPolicyClassName
public void setConnectionLoadBalancingPolicyClassName(String connectionLoadBalancingPolicyClassName) -
getScheduledThreadPoolMaxSize
-
setScheduledThreadPoolMaxSize
-
getThreadPoolMaxSize
-
setThreadPoolMaxSize
-
getUseGlobalPools
-
setUseGlobalPools
-
getUserName
-
setUserName
-
getPassword
-
setPassword
-
isUseJNDI
public boolean isUseJNDI() -
setUseJNDI
-
getJndiParams
-
setJndiParams
-
getParsedJndiParams
-
getClientID
-
setClientID
-
getGroupID
-
setGroupID
-
getUseLocalTx
-
setUseLocalTx
-
getSetupAttempts
public int getSetupAttempts() -
setSetupAttempts
-
getSetupInterval
public long getSetupInterval() -
setSetupInterval
-
equals
-
hashCode
public int hashCode() -
getWorkManager
-
createSession
public ClientSession createSession(ClientSessionFactory parameterFactory, int ackMode, String user, String pass, Boolean preAck, Integer dupsOkBatchSize, Integer transactionBatchSize, boolean deliveryTransacted, boolean useLocalTx, Integer txTimeout) throws Exception - Throws:
Exception
-
getRecoveryManager
-
getProperties
-
setup
- Throws:
ActiveMQException
-
getActivations
-
getDefaultActiveMQConnectionFactory
- Throws:
ResourceException
-
getJgroupsChannelLocatorClass
-
setJgroupsChannelLocatorClass
-
getJgroupsChannelRefName
-
setJgroupsChannelRefName
-
getConnectionFactory
public ActiveMQConnectionFactory getConnectionFactory(ConnectionFactoryProperties overrideProperties) -
newConnectionFactory
public ActiveMQConnectionFactory newConnectionFactory(ConnectionFactoryProperties overrideProperties) -
createRecoveryActiveMQConnectionFactory
public ActiveMQConnectionFactory createRecoveryActiveMQConnectionFactory(ConnectionFactoryProperties overrideProperties) -
createBroadcastEndpointFactory
protected BroadcastEndpointFactory createBroadcastEndpointFactory(ConnectionFactoryProperties overrideProperties) -
overrideConnectionParameters
-
setManagedConnectionFactory
public void setManagedConnectionFactory(ActiveMQRAManagedConnectionFactory activeMQRAManagedConnectionFactory) -
getCodec
-
closeConnectionFactory
-
isIgnoreJTA
-
setIgnoreJTA
-