?
Solved

Where to download tiny LDAP server for window to test JNDI programs?

Posted on 2002-07-13
8
Medium Priority
?
1,359 Views
Last Modified: 2013-11-24
Dear experts,
  I want to download a tiny/free LDAP server for window version to test my own JNDI programs. But I've no idea where can I download it. Please tell me where can I download it. If possible, can you teach me how to configure it ?

Thank you. :)
0
Comment
Question by:JavaSlave
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 5

Expert Comment

by:fontaine
ID: 7151425
http://www.eudora.com/free/ldap.html

I have never used it, however.
0
 
LVL 3

Expert Comment

by:gandalf94305
ID: 7151660
I recommend OpenLDAP from http://www.openldap.org/

Check out the web site, it has examples and the LDAP server itself is relatively easy to configure. HOWEVER, don't expect this to be as easy as running a setup.exe and defining a database table or two. Before doing this, read about the basics of LDAP. You'll find that information on the OpenLDAP site, too.

If you don't want to set up your own LDAP service, try accessing one of the public servers. There are a few lists around, e.g., http://www.emailman.com/ldap/public.html

So, for testing purposes, if you don't have to use specific schema extensions, use one of the public servers. Otherwise, read a bit more and try your luck with OpenLDAP.

Cheers,
--gandalf.
0
 

Author Comment

by:JavaSlave
ID: 7151849
Sorry gandalf94305,
  I can't find any window version from the website..

  My main purpose is that i want to define a JDBC source name, and use JNDI to get JDBC connection from the source though some LDAP service provider. Can I define it in those global LDAP server?

  Please advice me about this topice. Thank..
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Expert Comment

by:fontaine
ID: 7152115
As far as I know about, OpenLDAP is only available for UNIX systems, indeed.
0
 
LVL 3

Expert Comment

by:gandalf94305
ID: 7152147
OpenLDAP is indeed available on Windows. Check out http://www.fivesight.com/downloads/openldap.asp (also mentioned in the FAQ). Compile it yourself or simply download the binaries.

In my opinion, if you want to play with a serious LDAP server, this is probably the best free one around, able to take it up with many commercial servers.

With JNDI, you would use something like this:

  private DirContext theContext = null;
  private Object lock = new Object();

  protected static String MY_INITIAL_CONTEXT_FACTORY =
    "com.sun.jndi.ldap.LdapCtxFactory";

  protected DirContext initializeLDAP(Hashtable config) {

    if (!config.get("ldap.keepalive.context").equals("yes")) {
      return initializeLDAP_newContext(config);
    }

    if (theContext == null) {
      synchronized (lock) {
     if (theContext == null) {
       theContext = initializeLDAP_newContext(atoms);
     }
      }
    }
    return theContext;
  }

  private DirContext initializeLDAP_newContext(Hashtable config) {
    DirContext context = null;
    Hashtable env = new Hashtable(11);

    // java.naming.factory.initial
    env.put(Context.INITIAL_CONTEXT_FACTORY, MY_INITIAL_CONTEXT_FACTORY);
   
    // java.naming.provider.url
    env.put(Context.PROVIDER_URL, config.get("ldap.service"));

    // java.naming.security.authentication
    // -  CRAM-MD5, none, simple, strong
    env.put(Context.SECURITY_AUTHENTICATION, config.get("ldap.authentication"));
   
    // java.naming.security.principal
    // -  dname of the principal to be authenticated
    //env.put(Context.SECURITY_PRINCIPAL, "");

    // java.naming.security.credentials
    // -  credentials for the principal according to the
    //    selected authentication scheme.
    // env.put(Context.SECURITY_CREDENTIALS, "");

    // java.naming.security.protocol
    // env.put(Context.SECURITY_PROTOCOL, "ssl");

    // java.naming.ldap.version
    // env.put("java.naming.ldap.version", "3");

    // Get a handle to an initial directory context
    try {
      context = new InitialDirContext(env);
    } catch (NamingException e) {
      // Log.error(HERE, "cannot initialize LDAP", e);
    }
    return context;
  }

You simply use LDAP v2/v3 to connect to the LDAP server, no JDBC involved here directly. For even more sample code, go to places like http://www-unix.mcs.anl.gov/~chen/talks/jndi-ldap/5.html

One other tool you may find interesting is Softerra's LDAP browser: http://www.ldapadministrator.com/

--gandalf.
0
 

Expert Comment

by:ReRun07
ID: 7764818
One of my developers wants to know how much data a keepalive for LDAP produces?  Basically, he wants to know if we have we should keep a connection open to an LDAP server or close it after each use.  I hope this is enough information.
0
 
LVL 5

Expert Comment

by:vemul
ID: 7887917
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQ'ed and points not refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 7959649
Question placed in PAQ

Computer101
E-E Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question