Feature #136

Plug in any source connector easily

Added by Jonathan Clarke 9 months ago. Updated 6 months ago.

Status:Closed Start:
Priority:Normal Due date:
Assigned to:Jonathan Clarke % Done:

100%

Category:Core
Target version:1.2.0

Description

In versions 1.1.*, we had two source connectors: JDBC database and JNDI for directories. The type of the source defined the task type (db2ldap or ldap2ldap). Various bits of the code made explicit choices based on this task type. This made it very hard to add another source type.

As of commit r339, source connectors are considered the same throughout the code: a class that implements the ISrcService interface (two methods: getBean and getListPivots).

Specifying which source connector to use hasn't changed, it's a property in lsc.properties:

lsc.tasks.userWithMail.srcService = org.lsc.jndi.SimpleJndiSrcService

Optionally, the source connector class can implement a constructor that accepts a Properties object in parameter. These properties are passed through from the lsc.properties file, like for the JNDI source service, for example:

lsc.tasks.<task name>.srcService.property1 = something
lsc.tasks.<task name>.srcService.property2 = something else

A source connector is instantiated before a synchronization begins. Only one such object is used in any one synchronization. Therefore, it's now possible to implement any kind of source connector...

Of course, this is a first step towards feature #105.

This feature issue is in Feedback status, because this hasn't been extensively tested yet, nor documented outside of this issue and the Javadoc.

History

Updated by Jonathan Clarke 6 months ago

  • Status changed from Feedback to Closed
  • Target version changed from 1.2.x branch to 1.2.0
  • % Done changed from 80 to 100

This feature seems to work well with both JNDI and JDBC source connectors.

I have documented the process to create a new connector here: http://lsc-project.org/wiki/documentation/1.2/development/addingsourceconnector. (Feedback welcome!)

Also available in: Atom PDF