• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to bind() ?

 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I am going to add a user to an existing LDAP using the JNDI API, what should I provide as the "name" argument for javax.naming.DirContext#bind(String name, Object obj, Attributes attrs)? Should it be the dn of the object or the dn of the context that object should be added to? Something else?

Right now (while prototyping against a mocked-up implementation of DirContext and not having access to a real LDAP server), I'm doing something like this:

It seems a bit stupid giving out first the object itself and then the object's attributes (which the DirContext implementation could easily pick up from the object itself if it implements the appropriate interfaces).
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lasse,
I once(3years back) used Netscape LDAP directory server 4.12 with JNDI to add/access/delete new user information, i used there sample tutorials provided in their site and modified them a little to suite my needs!..

BYW i found this link in google, in case if you had not noted..
Novell Contributes Java-based LDAP to Open Standards
OpenLDAP - Free

Netscape Directory Server 6.21
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the tip. I gave up on OpenLDAP -- it's too geeky (pure command-line with cryptic error messages) for me to learn in a couple of hours so I downloaded an evaluation version of Sun's directory server earlier today (that's what the production environment will be using but I was hoping for a more lightweight product for testing during development). Well, it doesn't look like a resource hog so I guess I'll be fine.

Anyway, I'm still all ears for further tips
 
reply
    Bookmark Topic Watch Topic
  • New Topic