Customizing the formatter processor

RepConnector translates replication events into XML before delivering them. It also provides a Java API that allows you to create custom formatters that translate replication events into other formats. To create a customized formatter that runs within the RepConnector environment:

  1. Create a class that implements either com.sybase.connector.repra.rep.RepTransactionFormatter or com.sybase.connector.repra.rep.RepraCustomTransactionFormatter. RepraCustomTransactionFormatter allows the RepConnector Manager to set and load a property page, while RepTransactionFormatter does not.

  2. Compile the class and archive it to a .jar file.

  3. Using the RepConnector Manager, add or modify a RepConnector connection where the inbound type is “REPLICATION.”

    • On the General Information page, select Customized Plug-in Class.

    • On the Plug-in Class Information page of the wizard, enter the name of the custom class in the Message Formatter Plug-in Class field. If RepraCustomTransactionFormatter was implemented, enter the path to the property page and its name in the Message Formatter Properties File field.

  4. Modify the application server environment to load the customized message formatter. See “Configuring the environment for a custom sender or formatter” in Chapter 4, “Configuring RepConnector.”

  5. Shut down and restart the application server.