com.ibm.wsspi.recovery.handler
Class RecoveryHandler
- java.lang.Object
com.ibm.wsspi.recovery.handler.RecoveryHandler
- public abstract class RecoveryHandler
- extends java.lang.Object
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 |
---|---|
|
COMPONENT_NAME_PROPERTY
SCA Component name where the exception happened.
|
|
COMPONENT_TYPE_JMS
Component types for components.
|
|
COMPONENT_TYPE_MQ
|
|
COMPONENT_TYPE_PROPERTY
Type of binding that received the message.
|
|
COPYRIGHT
|
|
EXPIRATION_PROPERTY
Expiration time of the failed event
The property is mandatory.
|
|
FAILURE_TIME_PROPERTY
The timestamp when the exception happened.
|
|
INTERACTION_TYPE_PROPERTY
SCA interaction type
Property value type: String
|
|
MODULE_NAME_PROPERTY
SCA Module name where the exception happened.
|
|
OPERATION_NAME_PROPERTY
Operation name (of the SCA interface) where the exception happened
The property is mandatory.
|
|
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 |
---|---|
|
getInstance()
Gets an instance of RecoveryHandler.
|
|
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
COPYRIGHT
- public static final java.lang.String COPYRIGHT
See Also:
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:
COMPONENT_TYPE_MQ
- public static final java.lang.String COMPONENT_TYPE_MQ
See Also:
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:
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:
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:
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:
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:
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:
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:
INTERACTION_TYPE_PROPERTY
- public static final java.lang.String INTERACTION_TYPE_PROPERTY
SCA interaction type
Property value type: String
See Also:
Constructor Detail
RecoveryHandler
- public RecoveryHandler()
Method Detail
getInstance
- public static RecoveryHandler getInstance( )
- throws RecoveryException
Gets an instance of RecoveryHandler.
Returns:
instance of RecoveryHandler
Throws:
RecoveryException
- if the base Recovery handler could not be loaded. 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.