This sample shows how to handle errors or exceptions occured and handle them appropriately.

Default Behaviour

This component sends to the output port the same message that it receives on the input port.

Changes made in the component

  1. In the service references under "servicerefs" element in ServiceDescriptor.xml

  2. Add an additional runtime-argument in ServiceDescriptor.xml under 'execution' element as shown below:

  3. Make the following changes:

    Changes Required
    ErrorHandling.javaCreate field static String[] arguments;
    Modify the method void main(String[]) to initialize 'arguments' variable.
    Modify the void onException(JMSException) method of class ErrorHandlingExceptionListener to handle restarting the component the number of times as specified for the runtime argument 'retryCount'. Modify the void onMessage(Message) method to handle the default behaviour of the component.
  • To check the functionality of this component, it should be registered with the server.
  • The steps to register the samples is specified in the Sample Templates section.
Adaptavist ThemeBuilder EngineAtlassian Confluence