XPlanner Idea: Integrating LDAP users

I’ve been thinking about the problem of integrating existing LDAP user profiles into the XPlanner domain model. This is something that has been requested from users with large-scale XPlanner installations. The challenge is how to make the domain model easily and uniformly accessible to the XPlanner code when it’s partitioned across a combination of relational tables and LDAP directories.

Here’s a wild idea… one that I haven’t tried yet, but it would be an interesting experiment.

XPlanner uses Hibernate. Hibernate uses JDBC connections to access relational data. What if we made the LDAP data look like a relational database, accessible through JDBC? There’s an open source tool called the JDBC-LDAP Bridge that provides access LDAPv3 repository using a Type 4 JDBC driver. OK, so that’s one problem potentially solved.

How do we use the new JDBC data source with Hibernate. Well, unfortunately, we have to use two Hibernate SessionFactory objects, one for the JDBC-LDAP Bridge and one for the relational database. This makes the partitioning of the data less transparent than I’d like. What if we could treat both JDBC connections as a single virtual JDBC connection?

We can. There’s an open source JDBC driver called C-JDBC that provides JDBC clustering. It has many interesting features, but for our purpose it will allow us to combine the JDBC-LDAP Bridge and MySQL (or other relational database) JDBC driver into a single virtual JDBC connection.

At least theoretically, if we configure Hibernate to use the C-JDBC driver it should see a unified view of the XPlanner domain model although it’s actually partitioned across LDAP and a relational database.

Like I said, I haven’t tried this yet. If you know of problems with the approach let me know.

One Comment

Add a Comment

Your email address will not be published. Required fields are marked *