Package org.apache.qpid.jms
Class JmsConnection
- java.lang.Object
-
- org.apache.qpid.jms.JmsConnection
-
- All Implemented Interfaces:
AutoCloseable,javax.jms.Connection,javax.jms.QueueConnection,javax.jms.TopicConnection,ProviderListener
- Direct Known Subclasses:
JmsQueueConnection,JmsTopicConnection
public class JmsConnection extends Object implements AutoCloseable, javax.jms.Connection, javax.jms.TopicConnection, javax.jms.QueueConnection, ProviderListener
Implementation of a JMS Connection
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJmsConnection(JmsConnectionInfo connectionInfo, Provider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddConnectionConsumer(JmsConsumerInfo consumerInfo, JmsConnectionConsumer consumer)voidaddConnectionListener(JmsConnectionListener listener)Adds a JmsConnectionListener so that a client can be notified of events in the underlying connection and its state.protected voidaddSession(JmsSessionInfo sessionInfo, JmsSession session)protected voidcheckClosed()protected voidcheckClosedOrFailed()protected voidcheckConsumeFromTemporaryDestination(JmsTemporaryDestination destination)voidclose()javax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Destination destination, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Queue queue, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Topic topic, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.ConnectionConsumercreateDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.QueueSessioncreateQueueSession(boolean transacted, int acknowledgeMode)javax.jms.SessioncreateSession()javax.jms.SessioncreateSession(boolean transacted, int acknowledgeMode)javax.jms.SessioncreateSession(int acknowledgeMode)javax.jms.ConnectionConsumercreateSharedConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)javax.jms.ConnectionConsumercreateSharedDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)protected javax.jms.TemporaryQueuecreateTemporaryQueue()protected javax.jms.TemporaryTopiccreateTemporaryTopic()javax.jms.TopicSessioncreateTopicSession(boolean transacted, int acknowledgeMode)protected voiddeleteTemporaryDestination(JmsTemporaryDestination destination)StringgetClientID()longgetCloseTimeout()URIgetConfiguredURI()URIgetConnectedURI()longgetConnectTimeout()JmsDeserializationPolicygetDeserializationPolicy()javax.jms.ExceptionListenergetExceptionListener()JmsConnectionIdgetId()JmsMessageFactorygetMessageFactory()JmsMessageIDPolicygetMessageIDPolicy()javax.jms.ConnectionMetaDatagetMetaData()protected JmsConsumerIdgetNextConnectionConsumerId()protected JmsSessionIdgetNextSessionId()protected JmsTransactionIdgetNextTransactionId()StringgetPassword()JmsPrefetchPolicygetPrefetchPolicy()JmsPresettlePolicygetPresettlePolicy()StringgetQueuePrefix()JmsRedeliveryPolicygetRedeliveryPolicy()longgetRequestTimeout()longgetSendTimeout()protected intgetSessionAcknowledgeMode(boolean transacted, int acknowledgeMode)StringgetTopicPrefix()StringgetUsername()booleanisClosed()booleanisCloseLinksThatFailOnReconnect()booleanisConnected()protected booleanisExplicitClientID()booleanisFailed()booleanisForceAsyncAcks()booleanisForceAsyncSend()booleanisForceSyncSend()booleanisLocalMessageExpiry()booleanisLocalMessagePriority()booleanisPopulateJMSXUserID()booleanisReceiveLocalOnly()booleanisReceiveNoWaitLocalOnly()booleanisStarted()protected booleanisTemporaryDestinationDeleted(JmsDestination destination)booleanisUseDaemonThread()booleanisValidatePropertyNames()booleanisValidateSelector()voidonAsyncException(Throwable error)Handles any asynchronous errors that occur from the JMS framework classes.voidonCompletedMessageSend(JmsOutboundMessageDispatch envelope)Called when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered successful based on the QoS level associated of the outbound message.voidonConnectionEstablished(URI remoteURI)Called to indicate that the underlying connection to the Broker has been established for the first time.voidonConnectionFailure(ProviderException ex)Called to indicate that the underlying connection to the Broker has been lost and the Provider will not perform any reconnect.voidonConnectionInterrupted(URI remoteURI)Called from a fault tolerant Provider instance to signal that the underlying connection to the Broker has been lost.voidonConnectionRecovered(Provider provider)Called to indicate that a connection to the Broker has been reestablished and that all recovery operations have succeeded and the connection will now be transitioned to a recovered state.voidonConnectionRecovery(Provider provider)Called to indicate that a connection to the Broker has been reestablished and that notified listener should start to recover it's state.voidonConnectionRestored(URI remoteURI)Called to signal that all recovery operations are now complete and the Provider is again in a normal connected state.voidonException(Exception ex)voidonException(javax.jms.JMSException ex)voidonFailedMessageSend(JmsOutboundMessageDispatch envelope, ProviderException cause)Called when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered failed.voidonInboundMessage(JmsInboundMessageDispatch envelope)Called when a new Message has arrived for a registered consumer.voidonProviderException(ProviderException cause)Called to indicate that a some client operation caused or received an error that is not considered fatal at the provider level.voidonResourceClosed(JmsResource resource, ProviderException cause)Called to indicate that a currently active resource has been closed due to some error condition, management request or some other action.protected voidproviderFailed(ProviderException cause)protected voidremoveConnectionConsumer(JmsConsumerInfo consumerInfo)booleanremoveConnectionListener(JmsConnectionListener listener)Removes a JmsConnectionListener that was previously registered.protected voidremoveSession(JmsSessionInfo sessionInfo)voidsetClientID(String clientID)voidsetCloseLinksThatFailOnReconnect(boolean closeLinksThatFailOnReconnect)voidsetCloseTimeout(long closeTimeout)voidsetConnectTimeout(long connectTimeout)voidsetDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy)voidsetExceptionListener(javax.jms.ExceptionListener listener)voidsetForceAsyncAcks(boolean forceAsyncAcks)voidsetForceAsyncSend(boolean forceAsyncSend)voidsetForceSyncSend(boolean alwaysSyncSend)voidsetLocalMessageExpiry(boolean localMessageExpiry)voidsetLocalMessagePriority(boolean localMessagePriority)voidsetMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy)voidsetPopulateJMSXUserID(boolean populateJMSXUserID)voidsetPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy)voidsetPresettlePolicy(JmsPresettlePolicy presettlePolicy)voidsetQueuePrefix(String queuePrefix)voidsetReceiveLocalOnly(boolean receiveLocalOnly)voidsetReceiveNoWaitLocalOnly(boolean receiveNoWaitLocalOnly)voidsetRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy)voidsetRequestTimeout(long requestTimeout)voidsetSendTimeout(long sendTimeout)voidsetTopicPrefix(String topicPrefix)voidsetValidatePropertyNames(boolean validatePropertyNames)voidsetValidateSelector(boolean validateSelector)protected voidshutdown()Called to free all Connection resources.protected voidshutdown(Exception cause)Called to free all Connection resources.voidstart()voidstop()
-
-
-
Constructor Detail
-
JmsConnection
protected JmsConnection(JmsConnectionInfo connectionInfo, Provider provider) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
-
Method Detail
-
close
public void close() throws javax.jms.JMSException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
shutdown
protected void shutdown() throws javax.jms.JMSExceptionCalled to free all Connection resources.- Throws:
javax.jms.JMSException
-
shutdown
protected void shutdown(Exception cause) throws javax.jms.JMSException
Called to free all Connection resources.- Throws:
javax.jms.JMSException
-
createSession
public javax.jms.Session createSession() throws javax.jms.JMSException- Specified by:
createSessionin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSession
public javax.jms.Session createSession(int acknowledgeMode) throws javax.jms.JMSException- Specified by:
createSessionin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSession
public javax.jms.Session createSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException- Specified by:
createSessionin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
getClientID
public String getClientID() throws javax.jms.JMSException
- Specified by:
getClientIDin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
getMetaData
public javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException- Specified by:
getMetaDatain interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
setClientID
public void setClientID(String clientID) throws javax.jms.JMSException
- Specified by:
setClientIDin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
start
public void start() throws javax.jms.JMSException- Specified by:
startin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
stop
public void stop() throws javax.jms.JMSException- Specified by:
stopin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSharedConnectionConsumer
public javax.jms.ConnectionConsumer createSharedConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createSharedConnectionConsumerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createSharedDurableConnectionConsumer
public javax.jms.ConnectionConsumer createSharedDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createSharedDurableConnectionConsumerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createDurableConnectionConsumer
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createDurableConnectionConsumerin interfacejavax.jms.Connection- Specified by:
createDurableConnectionConsumerin interfacejavax.jms.TopicConnection- Throws:
javax.jms.JMSException
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createConnectionConsumerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createConnectionConsumerin interfacejavax.jms.TopicConnection- Throws:
javax.jms.JMSException
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException- Specified by:
createConnectionConsumerin interfacejavax.jms.QueueConnection- Throws:
javax.jms.JMSException
-
createTopicSession
public javax.jms.TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException- Specified by:
createTopicSessionin interfacejavax.jms.TopicConnection- Throws:
javax.jms.JMSException
-
createQueueSession
public javax.jms.QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException- Specified by:
createQueueSessionin interfacejavax.jms.QueueConnection- Throws:
javax.jms.JMSException
-
onException
public void onException(Exception ex)
-
onException
public void onException(javax.jms.JMSException ex)
-
getSessionAcknowledgeMode
protected int getSessionAcknowledgeMode(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
removeSession
protected void removeSession(JmsSessionInfo sessionInfo)
-
addSession
protected void addSession(JmsSessionInfo sessionInfo, JmsSession session)
-
removeConnectionConsumer
protected void removeConnectionConsumer(JmsConsumerInfo consumerInfo)
-
addConnectionConsumer
protected void addConnectionConsumer(JmsConsumerInfo consumerInfo, JmsConnectionConsumer consumer)
-
createTemporaryQueue
protected javax.jms.TemporaryQueue createTemporaryQueue() throws javax.jms.JMSException- Returns:
- a newly initialized TemporaryQueue instance.
- Throws:
javax.jms.JMSException
-
createTemporaryTopic
protected javax.jms.TemporaryTopic createTemporaryTopic() throws javax.jms.JMSException- Returns:
- a newly initialized TemporaryTopic instance.
- Throws:
javax.jms.JMSException
-
deleteTemporaryDestination
protected void deleteTemporaryDestination(JmsTemporaryDestination destination) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
checkClosedOrFailed
protected void checkClosedOrFailed() throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
checkConsumeFromTemporaryDestination
protected void checkConsumeFromTemporaryDestination(JmsTemporaryDestination destination) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
isTemporaryDestinationDeleted
protected boolean isTemporaryDestinationDeleted(JmsDestination destination)
-
checkClosed
protected void checkClosed() throws javax.jms.IllegalStateException- Throws:
javax.jms.IllegalStateException
-
getNextSessionId
protected JmsSessionId getNextSessionId()
-
getNextTransactionId
protected JmsTransactionId getNextTransactionId()
-
getNextConnectionConsumerId
protected JmsConsumerId getNextConnectionConsumerId()
-
isExplicitClientID
protected boolean isExplicitClientID()
-
getExceptionListener
public javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException- Specified by:
getExceptionListenerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
setExceptionListener
public void setExceptionListener(javax.jms.ExceptionListener listener) throws javax.jms.JMSException- Specified by:
setExceptionListenerin interfacejavax.jms.Connection- Throws:
javax.jms.JMSException
-
addConnectionListener
public void addConnectionListener(JmsConnectionListener listener)
Adds a JmsConnectionListener so that a client can be notified of events in the underlying connection and its state.- Parameters:
listener- the new listener to add to the collection.
-
removeConnectionListener
public boolean removeConnectionListener(JmsConnectionListener listener)
Removes a JmsConnectionListener that was previously registered.- Parameters:
listener- the listener to remove from the collection.- Returns:
- true if the given listener was removed from the current set.
-
isForceAsyncSend
public boolean isForceAsyncSend()
-
setForceAsyncSend
public void setForceAsyncSend(boolean forceAsyncSend)
-
isForceSyncSend
public boolean isForceSyncSend()
-
setForceSyncSend
public void setForceSyncSend(boolean alwaysSyncSend)
-
getTopicPrefix
public String getTopicPrefix()
-
setTopicPrefix
public void setTopicPrefix(String topicPrefix)
-
getQueuePrefix
public String getQueuePrefix()
-
setQueuePrefix
public void setQueuePrefix(String queuePrefix)
-
isValidatePropertyNames
public boolean isValidatePropertyNames()
-
setValidatePropertyNames
public void setValidatePropertyNames(boolean validatePropertyNames)
-
isValidateSelector
public boolean isValidateSelector()
-
setValidateSelector
public void setValidateSelector(boolean validateSelector)
-
getPrefetchPolicy
public JmsPrefetchPolicy getPrefetchPolicy()
-
setPrefetchPolicy
public void setPrefetchPolicy(JmsPrefetchPolicy prefetchPolicy)
-
getRedeliveryPolicy
public JmsRedeliveryPolicy getRedeliveryPolicy()
-
setRedeliveryPolicy
public void setRedeliveryPolicy(JmsRedeliveryPolicy redeliveryPolicy)
-
getPresettlePolicy
public JmsPresettlePolicy getPresettlePolicy()
-
setPresettlePolicy
public void setPresettlePolicy(JmsPresettlePolicy presettlePolicy)
-
getDeserializationPolicy
public JmsDeserializationPolicy getDeserializationPolicy()
-
setDeserializationPolicy
public void setDeserializationPolicy(JmsDeserializationPolicy deserializationPolicy)
-
isReceiveLocalOnly
public boolean isReceiveLocalOnly()
-
setReceiveLocalOnly
public void setReceiveLocalOnly(boolean receiveLocalOnly)
-
isReceiveNoWaitLocalOnly
public boolean isReceiveNoWaitLocalOnly()
-
setReceiveNoWaitLocalOnly
public void setReceiveNoWaitLocalOnly(boolean receiveNoWaitLocalOnly)
-
isLocalMessagePriority
public boolean isLocalMessagePriority()
-
setLocalMessagePriority
public void setLocalMessagePriority(boolean localMessagePriority)
-
getCloseTimeout
public long getCloseTimeout()
-
setCloseTimeout
public void setCloseTimeout(long closeTimeout)
-
getConnectTimeout
public long getConnectTimeout()
-
setConnectTimeout
public void setConnectTimeout(long connectTimeout)
-
getSendTimeout
public long getSendTimeout()
-
setSendTimeout
public void setSendTimeout(long sendTimeout)
-
getRequestTimeout
public long getRequestTimeout()
-
setRequestTimeout
public void setRequestTimeout(long requestTimeout)
-
getConfiguredURI
public URI getConfiguredURI()
-
getConnectedURI
public URI getConnectedURI()
-
getUsername
public String getUsername()
-
getPassword
public String getPassword()
-
isConnected
public boolean isConnected()
-
isStarted
public boolean isStarted()
-
isClosed
public boolean isClosed()
-
isFailed
public boolean isFailed()
-
getId
public JmsConnectionId getId()
-
getMessageFactory
public JmsMessageFactory getMessageFactory()
-
isForceAsyncAcks
public boolean isForceAsyncAcks()
-
setForceAsyncAcks
public void setForceAsyncAcks(boolean forceAsyncAcks)
-
isLocalMessageExpiry
public boolean isLocalMessageExpiry()
-
setLocalMessageExpiry
public void setLocalMessageExpiry(boolean localMessageExpiry)
-
getMessageIDPolicy
public JmsMessageIDPolicy getMessageIDPolicy()
-
setMessageIDPolicy
public void setMessageIDPolicy(JmsMessageIDPolicy messageIDPolicy)
-
isPopulateJMSXUserID
public boolean isPopulateJMSXUserID()
-
setPopulateJMSXUserID
public void setPopulateJMSXUserID(boolean populateJMSXUserID)
-
isUseDaemonThread
public boolean isUseDaemonThread()
-
isCloseLinksThatFailOnReconnect
public boolean isCloseLinksThatFailOnReconnect()
-
setCloseLinksThatFailOnReconnect
public void setCloseLinksThatFailOnReconnect(boolean closeLinksThatFailOnReconnect)
-
onInboundMessage
public void onInboundMessage(JmsInboundMessageDispatch envelope)
Description copied from interface:ProviderListenerCalled when a new Message has arrived for a registered consumer.- Specified by:
onInboundMessagein interfaceProviderListener- Parameters:
envelope- The dispatch object containing the message and delivery information.
-
onCompletedMessageSend
public void onCompletedMessageSend(JmsOutboundMessageDispatch envelope)
Description copied from interface:ProviderListenerCalled when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered successful based on the QoS level associated of the outbound message.- Specified by:
onCompletedMessageSendin interfaceProviderListener- Parameters:
envelope- the original outbound message dispatch that is now complete.
-
onFailedMessageSend
public void onFailedMessageSend(JmsOutboundMessageDispatch envelope, ProviderException cause)
Description copied from interface:ProviderListenerCalled when an outbound message dispatch that requested a completion callback has reached a state where the send can be considered failed.- Specified by:
onFailedMessageSendin interfaceProviderListener- Parameters:
envelope- the original outbound message dispatch that should be treated as a failed send.cause- the exception that describes the cause of the failed send.
-
onConnectionInterrupted
public void onConnectionInterrupted(URI remoteURI)
Description copied from interface:ProviderListenerCalled from a fault tolerant Provider instance to signal that the underlying connection to the Broker has been lost. The Provider will attempt to reconnect following this event unless closed. It is considered a programming error to allow any exceptions to be thrown from this notification method.- Specified by:
onConnectionInterruptedin interfaceProviderListener- Parameters:
remoteURI- The URI of the Broker whose connection was lost.
-
onConnectionRecovery
public void onConnectionRecovery(Provider provider) throws Exception
Description copied from interface:ProviderListenerCalled to indicate that a connection to the Broker has been reestablished and that notified listener should start to recover it's state. The provider will not transition to the recovered state until the listener notifies the provider that recovery is complete.- Specified by:
onConnectionRecoveryin interfaceProviderListener- Parameters:
provider- The new Provider instance that will become active after the state has been recovered.- Throws:
Exception- if an error occurs during recovery attempt, this will fail the Provider that's being used for recovery.
-
onConnectionRecovered
public void onConnectionRecovered(Provider provider) throws Exception
Description copied from interface:ProviderListenerCalled to indicate that a connection to the Broker has been reestablished and that all recovery operations have succeeded and the connection will now be transitioned to a recovered state. This method gives the listener a chance so send any necessary post recovery commands such as consumer start or message pull for a zero prefetch consumer etc.- Specified by:
onConnectionRecoveredin interfaceProviderListener- Parameters:
provider- The new Provider instance that will become active after the state has been recovered.- Throws:
Exception- if an error occurs during recovery attempt, this will fail the Provider that's being used for recovery.
-
onConnectionRestored
public void onConnectionRestored(URI remoteURI)
Description copied from interface:ProviderListenerCalled to signal that all recovery operations are now complete and the Provider is again in a normal connected state. It is considered a programming error to allow any exceptions to be thrown from this notification method.- Specified by:
onConnectionRestoredin interfaceProviderListener- Parameters:
remoteURI- The URI of the Broker that the client has now connected to.
-
onConnectionEstablished
public void onConnectionEstablished(URI remoteURI)
Description copied from interface:ProviderListenerCalled to indicate that the underlying connection to the Broker has been established for the first time. For a fault tolerant provider this event should only ever be triggered once with the interruption and recovery events following on for future- Specified by:
onConnectionEstablishedin interfaceProviderListener- Parameters:
remoteURI- The URI of the Broker that the client has now connected to.
-
onConnectionFailure
public void onConnectionFailure(ProviderException ex)
Description copied from interface:ProviderListenerCalled to indicate that the underlying connection to the Broker has been lost and the Provider will not perform any reconnect. Following this call the provider is in a failed state and further calls to it will throw an Exception.- Specified by:
onConnectionFailurein interfaceProviderListener- Parameters:
ex- The exception that indicates the cause of this Provider failure.
-
onResourceClosed
public void onResourceClosed(JmsResource resource, ProviderException cause)
Description copied from interface:ProviderListenerCalled to indicate that a currently active resource has been closed due to some error condition, management request or some other action. This can either be initiated remotely or locally depending on the condition that triggers the close.- Specified by:
onResourceClosedin interfaceProviderListener- Parameters:
resource- the JmsResource instance that has been closed.cause- optional exception object that indicates the cause of the close.
-
onProviderException
public void onProviderException(ProviderException cause)
Description copied from interface:ProviderListenerCalled to indicate that a some client operation caused or received an error that is not considered fatal at the provider level.- Specified by:
onProviderExceptionin interfaceProviderListener- Parameters:
cause- the exception object that is being reported to the listener.
-
onAsyncException
public void onAsyncException(Throwable error)
Handles any asynchronous errors that occur from the JMS framework classes. If any listeners are registered they will be notified of the error from a thread in the Connection's Executor service.- Parameters:
error- The exception that triggered this error.
-
providerFailed
protected void providerFailed(ProviderException cause)
-
-