PingDirectory

Implement a JDBC sync destination

The JDBCSyncDestination abstract class must be implemented to synchronize data into a relational database. The class enables converting Lightweight Directory Access Protocol (LDAP) content to database content. The extension imports classes from the Java API, LDAP SDK for Java API, and the Server SDK, depending on the database configuration.

When using custom Java database connectivity (JDBC) destinations, SQL statements cannot be called unless JDBC drivers are set in the java.properties file. For example:

start-server.java-args=<...> -Djdbc.drivers=com.microsoft.sqlserver.jdbc.SQLServerDriver

The admin must run dsjavaproperties for the update to the java.properties file to take effect.

Implement the following methods in the script:

  • initializeJDBCSyncDestination – Called when a Sync Pipe starts, or when the resync process starts. Any initialization should be performed here, such as creating internal data structures and setting up variables.

  • finalizeJDBCSyncDestination – Called when a Sync Pipe stops, or when the resync process stops. Any clean up should be performed here, and all internal resources should be freed.

  • createEntry – Creates a full database entry (or row), corresponding to the LDAP entry that is passed in.

  • modifyEntry – Modifies a database entry, corresponding to the LDAP entry that is passed in.

  • fetchEntry – Returns a full destination database entry (in LDAP form), corresponding to the source entry that is passed in.

  • deleteEntry – Deletes a full entry from the database, corresponding to the LDAP entry that is passed in.

For more detailed information on the abstract class, see the Server SDK Javadoc.