View source | Discuss this page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Add page
Show collection (0 pages)
Collections help


How to Define a Symmetric DS Extension


Defining extensions points allows extending certain SymmetricDS functionalities. All SymmetricDS extension points must implement the IExtensionPoint, or any other interface that extends it. These are some of the available extension point interfaces:

The full list of SymmetricDS extensions points can be found here.

How to define a SymmetricDS extension point

The Openbravo data synchronization module allows defining SymmetricDS extensions points using dependency injection. To define one, just create a class that implements a IExtensionPoint. Also include the @ApplicationScoped annotation to make Weld know that the class should be instantiated using dependency injection.

For instance, this is a snippet of an extension defined to handle the synchronization errors:

public class NotifySynchronizationError implements IDatabaseWriterErrorHandler {
   * This method is called if any error occurs while the {@link DefaultDatabaseWriter} is processing
   * a {@link CsvData} in the write method. This method gives an option to take an action on an
   * error or even simply ignore it.
   * @return true if the error should be processed as normal or false if the error should be ignored
   *         and the {@link DataProcessor} should continue to process on.
  public boolean handleError(DataContext context, Table table, CsvData data, Exception ex) {
    STRSYNC_Error error = createErrorEntryFromSynchronizationError(context, table, data, ex);
    // return false, to try not to block the channel and keep on with the synchronization
    return false;

Retrieved from ""

This page has been accessed 1,824 times. This page was last modified on 1 August 2016, at 13:20. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.