com.ibm.wsspi.recovery.handler

Class RecoveryHandler

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.recovery.handler.RecoveryHandler

  1. public abstract class RecoveryHandler
  2. extends java.lang.Object
The RecoveryHandler interface defines how the exception will be handled by Recovery. Any sub-system leveraging Recovery needs can call the interface to hand over the exception to Recovery handler, which will generate a failed event. The original event data (message, record) is still in the sub-system. Usage: RecoveryHandler.getInstance().handleException(eventId, exception, context);

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COMPONENT_NAME_PROPERTY
SCA Component name where the exception happened.
  1. static
  2. java.lang.String
COMPONENT_TYPE_JMS
Component types for components.
  1. static
  2. java.lang.String
COMPONENT_TYPE_MQ
  1. static
  2. java.lang.String
COMPONENT_TYPE_PROPERTY
Type of binding that received the message.
  1. static
  2. java.lang.String
COPYRIGHT
  1. static
  2. java.lang.String
EXPIRATION_PROPERTY
Expiration time of the failed event The property is mandatory.
  1. static
  2. java.lang.String
FAILURE_TIME_PROPERTY
The timestamp when the exception happened.
  1. static
  2. java.lang.String
INTERACTION_TYPE_PROPERTY
SCA interaction type Property value type: String
  1. static
  2. java.lang.String
MODULE_NAME_PROPERTY
SCA Module name where the exception happened.
  1. static
  2. java.lang.String
OPERATION_NAME_PROPERTY
Operation name (of the SCA interface) where the exception happened The property is mandatory.
  1. static
  2. java.lang.String
RESUBMIT_DESTINATION_PROPERTY
Resubmit destination of the failed event The property is mandatory.

Constructor Summary

Constructor and Description
RecoveryHandler()

Method Summary

Modifier and Type Method and Description
  1. static
  2. RecoveryHandler
getInstance()
Gets an instance of RecoveryHandler.
  1. abstract
  2. void
handleException(java.lang.String eventId,java.lang.Exception exception,java.util.Properties context)
Hand over the exception from sub-system to Recovery handler.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
See Also:

COMPONENT_TYPE_JMS

  1. public static final java.lang.String COMPONENT_TYPE_JMS
Component types for components. Other extended component types: COMPONENT_TYPE_MQ COMPONENT_TYPE_J2C COMPONENT_TYPE_BPC COMPONENT_TYPE_MFC
See Also:

COMPONENT_TYPE_MQ

  1. public static final java.lang.String COMPONENT_TYPE_MQ
See Also:

MODULE_NAME_PROPERTY

  1. public static final java.lang.String MODULE_NAME_PROPERTY
SCA Module name where the exception happened. The property is mandatory. Property value type: String
See Also:

COMPONENT_TYPE_PROPERTY

  1. public static final java.lang.String COMPONENT_TYPE_PROPERTY
Type of binding that received the message. The property is mandatory. Property value type: String For JMS binding, the value is COMPONENT_TYPE_JMS
See Also:

COMPONENT_NAME_PROPERTY

  1. public static final java.lang.String COMPONENT_NAME_PROPERTY
SCA Component name where the exception happened. The property is mandatory. Property value type: String For JMS Import, component name is the import name; For JMS Export, component name is the export name;
See Also:

OPERATION_NAME_PROPERTY

  1. public static final java.lang.String OPERATION_NAME_PROPERTY
Operation name (of the SCA interface) where the exception happened The property is mandatory. Property value type: String For JMS binding, TargetFunctionName is assigned as operation name.
See Also:

RESUBMIT_DESTINATION_PROPERTY

  1. public static final java.lang.String RESUBMIT_DESTINATION_PROPERTY
Resubmit destination of the failed event The property is mandatory. Property value type: String
See Also:

EXPIRATION_PROPERTY

  1. public static final java.lang.String EXPIRATION_PROPERTY
Expiration time of the failed event The property is mandatory. Property value type: String
See Also:

FAILURE_TIME_PROPERTY

  1. public static final java.lang.String FAILURE_TIME_PROPERTY
The timestamp when the exception happened. The property is mandatory. Property value type: long For JMS message, assign JMSTimestamp header.
See Also:

INTERACTION_TYPE_PROPERTY

  1. public static final java.lang.String INTERACTION_TYPE_PROPERTY
SCA interaction type Property value type: String
See Also:

Constructor Detail

RecoveryHandler

  1. public RecoveryHandler()

Method Detail

getInstance

  1. public static RecoveryHandler getInstance( )
  2. throws RecoveryException
Gets an instance of RecoveryHandler.
Returns:
instance of RecoveryHandler
Throws:
RecoveryException - if the base Recovery handler could not be loaded.

handleException

  1. public abstract void handleException( java.lang.String eventId,
  2. java.lang.Exception exception,
  3. java.util.Properties context)
  4. throws RecoveryException
Hand over the exception from sub-system to Recovery handler. Recovery handler will preserve the metadata into Recovery repository in the same transaction as caller. The original message/record will be left in the sub-system still.
Parameters:
eventId - Event identifier to locate the event in sub-system JMS system id for JMS message
exception - The exception related to the exception
context - Properties containing context information
Throws:
RecoveryException - when the failed event can not be saved successfully.