Tivoli Directory Integrator, Version 7.1.1

User-defined rules configuration

The list of user-defined rules is configured in a text file named reconnect.rules in the "etc" subfolder of the TDI solution folder (or the TDI installation folder, if no solution folder has been defined). Each rule is placed on a single line. The format of a rule is as follows:

<connector_class>:<connector_name>:<exception_class>:<action>:<regular_expression>

where

Notes:
  1. Each part except the action can be empty. If a part is empty that means "match-all".
  2. Each part is mandatory - even if it is empty the surrounding colons must be present. (Consequently on each line there must be at least 4 colons - each colon separating two adjacent parts of the rule. At least 4, because the regular expression may contain colons too. These colons do not interfere with the rule parsing because the regular expression comes last in a rule.)
  3. No redundant white space is allowed.
  4. The regular expression starts just after the fourth colon and spans until the end of the line.
  5. The user-defined rules file is not a Java properties file. The main reason is that a key for a rule must include all rule parts, except the reconnect action, in order to be unique. So the only value from using the Java properties mechanism would be the separation of the action from the other rule parts. However, it would come at the price of escaping white-spaces, colons and equal signs (requirements for a valid property key). Even if the Java property framework was used, custom parsing of the property key would still be required in order to extract the rule parts from it.
  6. The regular expression (not the reconnect action) comes last on each line. This pattern is chosen such that it is unneccesary to escape colons (which are considered rule part delimiters) in the regular expression.
  7. The regular expression must match the entire message text: Suppose the message text you want to match contains the words "Some Error" somewhere in the message text. A suitable regular expression might then be:
    	.*Some Error.*
    The character "." matches any character except new line, and the * modifier specifies 0 or more. Now suppose the message ends with a new line. If that is the case, the previous regular expression does not match. You can try a regular expression like this instead:
    	.*Some Error.*\r?\n?
    "\r" and "\n" specify return and new line characters, and the ? modifier specifies 0 or 1 occurrence.
  8. You must still configure reconnect in the Connector's configuration; see General reconnect configuration.

Examples

An example, consisting of two rules:

com.ibm.di.connector.ReconnectTestConnector:myconnname:java.io.IOException:error:.*\Wfatal\W.*
::java.io.IOException:reconnect:
Reconnect with the JDBC Connector

Tivoli® Directory Integrator's JDBC connector is configured in Iterator mode to iterate a table from DB2 and is enabled for the reconnect feature. However, at the time of running the solution, DB2 instance is not started yet. In order to have reconnect working, the following exception details need to be mentioned in the reconnect.rules file:

com.ibm.di.connector.JDBCConnector::com.ibm.db2.jdbc.DB2Exception:reconnect:
Reconnect with the RAC Connector

Tivoli Directory Integrator's RAC connector is configured in Iterator mode and is enabled for the reconnect feature. In case the Agent Controller server is down, in order for the RAC connector to try to reattempt (reconnect), the following exception details need to be mentioned in the reconnect.rules file:

com.ibm.di.connector.RACConnector::org.eclipse.tptp.platform.execution.exceptions.AgentControllerUnavailableException:reconnect:

Exception considerations

Every environment and solution created for a particular environment using Tivoli Directory Integrator is typically unique. User-defined rules are custom-built and the functionality is made available so solutions can automatically attempt to reconnect based on the exceptions specific to the environment or solution. Refer to the Tivoli Directory Integrator Java API documentation for information about specific exceptions that are returned by the Tivoli Directory Integrator APIs for each Connector.

Additionally, some Tivoli Directory Integrator components rely on underlying libraries and the APIs of these libraries throw exceptions for specific situations. Below we list a few core TDI components where you can look for additional information on exceptions and what may be the cause of the exceptions. This information is helpful when deciding if you want to attempt to create custom reconnect rules for specific exceptions that may be encountered:

[ Top of Page | Previous Page | Next Page | Contents | Terms of use | Feedback ]
(C) Copyright IBM Corporation, 2003, 2012. All Rights Reserved.
IBM Tivoli Directory Integrator 7.1.1