com.ibm.wsspi.recovery.handler

Class RecoveryHandler

  • java.lang.Object
    • com.ibm.wsspi.recovery.handler.RecoveryHandler


  • public abstract class RecoveryHandler
    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);
    • Constructor Summary

      Constructors 
      Constructor and Description
      RecoveryHandler() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static RecoveryHandler getInstance()
      Gets an instance of RecoveryHandler.
      abstract 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

      • COMPONENT_TYPE_JMS

        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:
        Constant Field Values
      • COMPONENT_TYPE_MQ

        public static final java.lang.String COMPONENT_TYPE_MQ
        See Also:
        Constant Field Values
      • MODULE_NAME_PROPERTY

        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:
        Constant Field Values
      • COMPONENT_TYPE_PROPERTY

        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:
        Constant Field Values
      • COMPONENT_NAME_PROPERTY

        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:
        Constant Field Values
      • OPERATION_NAME_PROPERTY

        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:
        Constant Field Values
      • RESUBMIT_DESTINATION_PROPERTY

        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:
        Constant Field Values
      • EXPIRATION_PROPERTY

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

        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:
        Constant Field Values
      • INTERACTION_TYPE_PROPERTY

        public static final java.lang.String INTERACTION_TYPE_PROPERTY
        SCA interaction type Property value type: String
        See Also:
        Constant Field Values
    • Constructor Detail

      • RecoveryHandler

        public RecoveryHandler()
    • Method Detail

      • handleException

        public abstract void handleException(java.lang.String eventId,
                           java.lang.Exception exception,
                           java.util.Properties context)
                                      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.
IBM Business Process ManagerTM
Release 8