When I was doing research on using LDAP some time ago now, I thought how neat it would 
be to be able to use LDAP like a database.  However, the recommendations I came across 
always said that it was best to keep your primary data-store in a real RDBMS, and to 
replicate the information to your LDAP server, which was your way of distributing this 
information to the rest of the organisation.

Assuming this to be a correct model, how do you force timely replication of this 
information when it changes?  ( assume your DBMS and your LDAP server are not so 
tightly integrated as to provide this out of the box ).

Some approaches suggest themselves:

- if using Oracle as the DBMS, write an on-insert trigger in the relevant table(s) to 
propogate to the information to the LDAP server  ( synchronous, I think )

- if using EJB 2.0, fire off a message to a messgae-driven-bean to perform the same 
update to the LDAP as was performed to the DBMS.  ( asynchronous )

- if your application server supports plugging-in services via JNDI, you could 
delegate the update to your own RMI-exposed service ( synchronous or asynchronous at 
your leisure ).


Just a different way of looking at the problem.  Hope it helps...

( writing a JDBC driver is an interesting solution though )


regards,
David.


On Sun, 4 Feb 2001, Juan Lorandi (Chile) wrote:

> Jos�, have you ever considered to implement LDAP as a JDBC 2.0 driver? you
> could there handle pooling, reuse
> anything your want.
> >
> >    Under this scenario it made sense for us to make some abstraction
> > that would isolate us from LDAP and database access, and we thought of
> > an entity bean representing our users. Keep in mind that we have also
> > the application administrator role, that may change permissions for
> > other users. Our entity bean provides us methods for all those things:
> > asking for permissions, asking for relation between two employees,
> > changing rights for an user,...
> >
> >    Any thoughts about this?
> >
> >    Regards
> >    Jose
> >
> > Ian McCallion wrote:
> >
> > > Jose Gonz�lez G�mez wrote:
> > >
> > >>    I have an ejb named User that models an user interacting with my
> > >> application. I need this as the actions this user may do in the
> > >> application depend on his position in a directory I access
> > through LDAP.
> > >> I keep some info I need about the user in a database, as
> > this info is
> > >> not in the directory. This way the bean encapsulates all the needed
> > >> access to LDAP and database.
> > >>



David Bullock
LISAsoft Project Lead
Sun Certified Programmer for the Java 2 Platform

 email: [EMAIL PROTECTED]
mobile: +61 4 0290 1228

"The key ingredients of success are a crystal-clear goal,
a realistic attack plan to achieve that goal,
and consistent, daily action to reach that goal."

Steve Maguire, "Debugging the Development Process".

LISAsoft
http://www.lisasoft.com/

Adelaide                  Sydney
--------------------      ------------------------
38 Greenhill Rd           Level 3, 228 Pitt Street
Wayville S.A. 5034        Sydney NSW 2000
Australia                 Australia

PH  +61 8 8272 1555       PH  +61 2 9283 0877
FAX +61 8 8271 1199       FAX +61 2 9283 0866
--------------------      ------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to