Configuring subscription-level user exits

A subscription-level user exit lets you define a set of actions that CDC Replication can run before or after a commit event occurs on a specified subscription.

About this task

Subscription-level user exits can work alone or in tandem with table-level user exits, to keep track of which table-level user exits were called during a transaction. The subscription-level user exit could then use that information to apply actions based on the tables in the transaction.

Procedure

  1. Click Configuration > Subscriptions.
  2. Select the subscription.
  3. Right-click and select User Exits.
  4. Select Java Class from the User Exit Type list.
  5. Enter the name of the Java™ class user exit that implements the SubscriptionUserExitIF interface in the Class Name box.
    For example, you may have imported the SubscriptionUserExitIF interface, and the user exit program class that implements this interface in your function has the following definition:
    public class UE1 implements SubscriptionUserExitIF
    In the Class Name box, you must type:
    • UE1—Indicates a stand-alone class.
    • <Java package>.UE1—Indicates that the class is included in a Java package (for example, com.datamirror.interface.UE1).

    The files you generate from compiling the user exit program must be located in a library or folder that is referenced by the CLASSPATH environment variable.

  6. Enter the parameters that you want to make available to the user exit program in the Parameter box.

    You can access the parameters in the user exit program class by invoking the getParameter( ) method during the initialization process. There are no conventions for specifying the parameters. The values you type in this box are free-form. The string of parameter values cannot exceed 255 characters in length.