Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2002-07-13
8
Medium Priority
?
1,367 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
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.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

598 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