directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tino Schwarze <>
Subject Re: Implementing an alternative backend
Date Wed, 27 Dec 2006 18:45:38 GMT
On Thu, Dec 21, 2006 at 12:25:52PM -0500, Alex Karasulu wrote:

> > I've got a pretty interesting project here: We would like to equip our
> > open-EIS knowledge management software with an embedded LDAP server.
> > I was pretty glad to find the Apache DS since everything seems to be in
> > place. My first goal is to allow user authentication against an existing
> > open-EIS user base which is stored in a DB.


> First thing just take a look at the Partition interface in the partition
> package.  You'll have to implement this for your EIS application.
> Best thing to do might be to first stub out all the methods and set
> things up so you can just read a simple entry after installing the
> partition into the server.  Then you can move on to start building up
> your solution.

I've come so far to have an ApacheDS running with to partitions:
ou=system and, the latter being backed (kind of ;))
by open-EIS. To ease testing, I'd like to access my own partition via
JNDI. After everything is set up, I start the server using this code

    Hashtable<String, Object> _environment = new Hashtable<String, Object>();

    _environment.put ("", "simple");
    _environment.put ("", "uid=admin,ou=system");
    _environment.put ("", "secret");

    _environment.put ("java.naming.provider.url", "ou=system");
    _environment.put ("java.naming.factory.initial", "");
    _environment.put ("", _serverconfig);

    // this actually starts up the server
    InitialDirContext _idc = new InitialDirContext (_environment);

    Attributes _testattrs = _idc.getAttributes("uid=admin");

    System.out.println ("initialized: uid="+_testattrs.get("uid"));

But how do I get access to my partition? I suppose,
creating another InitialDirCotext is not the way to go (I'd have to
provide all the internal stuff, object classes, attriute types etc
myself, I suppose), but everything I can do with that context I created,
is relative to it, so I can't actually access my own partition.

Any advice on this?




View raw message