directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <>
Subject Re: [JNDI] Abstracting away JNDI providers
Date Tue, 25 Sep 2007 21:21:10 GMT
On 9/25/07, Stefan Seelmann <> wrote:
> Hi Alex,
> no, we use "com.sun.jndi.ldap.LdapCtxFactory" and it is hardcoded. We
> already have an Jira about that, see

NP it's easy to fix this.  I was thinking of writing a UniversalCtxFactory
that just delegates.

However, it works fine with Sun, IBM and JRockit JVMs, because they all
> come with this class.

Really I thought that the IBM one was different.  It's ... I hope I
am wrong.
Cound not find a JNDI provider for jrocket tho but I'm pretty sure about

I don't know if they just re-license the libraries
> from Sun. I haven't tested with Harmony, but I guess it won't work (do
> they have a LDAP provider yet?).

I think they're just looking into it now.

Some auto-detection depending on the JVM would be cool. Perhaps a simple
> property file that maps from java.vendor or java.vm.vendor to the
> factory class would be enough. Or we could have a list of well-known
> factory classes and use reflection to test which class exists.

Yeah I just created a wrapper that detects based on the java.vm.vendorproperty.
I'm adding this to a shared/ldap-jndi so we can reuse it along with some of
the other
utilities around JNDI I want to put in there.  BTW I want to implement that
that the Spring LDAP guys are using and put it here as well so we can share

If you're interested in putting shared LDAP JNDI handling code in there too
all the better.


View raw message