Handle termination and cleanup for critical errors
There are a number of methods that allow detecting and handling of IBM® Security Verify Directory Integrator internal errors, as well as errors occurring in IBM® Security Verify Directory Integrator Connectors, Parsers, Function Components and so on. These methods include:
- Error Hooks, in which JavaScript code can be written to handle an error. This method is accessible to IBM® Security Verify Directory Integrator users. Also see Controlling the flow of an AssemblyLine.
- Java™ try-catch-finally blocks, which make sure that a minor failure does not break the Server as well as that all errors are handled appropriately. Such blocks are already in place in the core IBM® Security Verify Directory Integrator server classes.
The JVM shutdown Hook feature improves the reliability of the Server. Java shutdown Hooks allow a piece of code to perform some processing after Control-C is pressed, or when the JVM is shutting down for some other reason, even System.exit.
You can specify an external program to be started when the JVM is shutting down. This external program is started from within the JVM shutdown Hook. This external program is configured using an optional property in the *global.properties or solution.properties file: *
jvm.shutdown.hook=<external application executable>
Shell scripts and batch files can also be specified as the value of this property.
When the JVM shutdown Hook is called, nothing can be done to prevent the JVM termination. However, with the execution of an external program it is possible to perform customizable operations: for example, sending a message that the IBM® Security Verify Directory Integrator server has terminated, carrying out clean up operations, or even restarting a new server if so required.