Compiling the Java class sample user exits (UNIX and Linux®)

You must compile the sample Java™ class user exits before you run them.

Procedure

  1. Stop CDC Replication.
  2. Unzip the samples.jar file into the lib directory in your IBM® Data Replication installation directory. Make sure you maintain the directory structure when unzipping the jar file.
    After unzipping the jar file, you will have a directory structure like the following:
    <installation_directory>/lib/com/datamirror/ts/target/publication/userexit/sample
  3. Make your changes to the sample user exit.
  4. Compile the modified user exit. For example, if you want to compile UserExitSample.java, open a command window, navigate to the lib directory and issue the following command:
    javac  -classpath ts.jar:. com/datamirror/ts/target/publication/userexit/sample/UserExitSample.java

    If this command runs successfully, there will be no output on your screen.

    Note: Your system must have the Java JDK to run this command.
  5. After running the command successfully, navigate to the following directory and confirm that you have created a UserExitSample.class file:
    <installation_directory>/lib/com/datamirror/ts/target/publication/userexit/sample
  6. Start CDC Replication.
  7. The final step to configure the user exit is to specify the fully qualified path to UserExitSample in Management Console. For example:
    com.datamirror.ts.target.publication.userexit.sample.UserExitSample
    Note: Do not specify the .class extension.

What to do next

For more information on how to specify Java class user exits in Management Console, see your Management Console documentation.

Note: If you plan to use the sample user exits in production environments, you will have to test the samples before they are deployed. IBM does not assume responsibility for adverse results caused by modified or customized user exit classes.