public class JmsConnectionErrorHandler extends JmsConnectionErrorHandlerImpl implements javax.jms.ExceptionListener
ExceptionListener
.In the adapter configuration file this class is aliased as jms-connection-error-handler which is the preferred alternative to the fully qualified classname when building your configuration.
idForLogging
log
Constructor and Description |
---|
JmsConnectionErrorHandler() |
JmsConnectionErrorHandler(java.lang.Boolean singleExecution) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
java.lang.Boolean |
getSingleExecution() |
void |
init()
Initialises the component.
|
void |
onException(javax.jms.JMSException e) |
void |
setSingleExecution(java.lang.Boolean b)
Ignore multiple invocations of the
ExceptionListener.onException(JMSException) method. |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
allowedInConjunctionWith, equals, handleConnectionException, hashCode
getRegisteredChannels, registerConnection, restartAffectedComponents, retrieveConnection, retryWaitTimeMs
public JmsConnectionErrorHandler()
public JmsConnectionErrorHandler(java.lang.Boolean singleExecution)
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
init
in class JmsConnectionErrorHandlerImpl
CoreException
- wrapping any underlying Exception
spublic void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.
start
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing a
RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely.
Throwing a RuntimeException
may cause unintended consequences
close
in interface ComponentLifecycle
public void onException(javax.jms.JMSException e)
onException
in interface javax.jms.ExceptionListener
public java.lang.Boolean getSingleExecution()
public void setSingleExecution(java.lang.Boolean b)
ExceptionListener.onException(JMSException)
method.
There is no JMS specification guarantee that a provider will not issue multiple calls to
ExceptionListener.onException(JMSException)
in short order. In some cases this does happen, which can cause subequent
problems based on timing around when the connections re-initialise themselves.
b
- whether or not to filter multiple executions; defaults to true if not specified.