Detection of Resource Failure
The detection of Resource Failure Handling has the following steps:
- Detecting the failure of the Database or TIBCO Enterprise Message Service™: A thread is configured, which checks the status of these resources at a predefined interval and sends the reports to a repository with the latest status. The repository can be accessed from other components and it can take the respective action. A timeout is configured when checking the status of the resources, and if a response is not received within the timeout period the failure of the particular resource is reported. The concerned thread also checks if any batch processor thread is in an error state. The properties or configuration used for failure detection is described in
Configuration of Resource Failure Handling.
The Fulfillment Order Management application runs another thread, which keeps looking at the repository data that is updated by the failure detection thread, and identifies the resource failure when the status changes in the repository data.
- Using the Spring Interceptor: All the exceptions are generated from the package
com.tibco.aff.oms.server
are intercepted by a classLogException.java
that analyzes the generated exception and identifies if the exceptions are generated due to a resource failure. When intercepting the exception, if a resource failure issue is identified, an appropriate action on resource failure is taken. See Action on Resource Failure and Action On Resource Recovery for more details. - JMS exception handler: A JMS exception handler is registered to identify exception handling. Once an exception is detected by the exception handler the application verifies the JMS failure, and if a failure is found, an appropriate action is taken.
- Intercepting the exception generated when sending the JMS message: The Orchestrator uses the
ResourceRouterImpl.dispatchMessage()
method to send any JMS messages. If an exception occurs when sending a message, then the exception is sent to theHealthCheck
thread and the resources are verified for resource failure.