directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: [OT] Is studio using Sun's ldap service provider?
Date Tue, 04 Sep 2007 11:26:26 GMT
Hi Spark,

I agree with Emmanuel, the Sun provider is hardcoded in Studio.

However from my expirience, there are a lot of applications out there
using "com.sun.jndi.ldap.LdapCtxFactory" hardcoded in the code, so they
won't run with Harmony.

Is it possible to add this class into harmony, maybe only as a delegate
to the real implemention? The JDKs of IBM and BEA include this class
too, but I don't know if they just relicensed it from Sun.

Kind Regards,
Stefan Seelmann


Emmanuel Lecharny schrieb:
> Hi,
> 
> studio is based on JNDI to communicate with any ldap server. Studio is
> just a tool.
> 
> If you want to reuse the connect() method, then you just have to change
> the SUN provider by the Harmony provider in the code.
> 
> Emmanuel
> 
> Spark Shen a écrit :
> 
>> Hi, dears
>>
>> I investigated those jars in studio used to connect to ldap server. Seems
>> they uses Sun's service provider.
>>
>>> From JndiConnectionContext:
>>
>> public void connect( String host, int port, boolean useLdaps, boolean
>> useStartTLS, Control[] connCtls,
>>        ExtendedProgressMonitor monitor ) throws NamingException
>>    {
>>
>>        this.environment = new Hashtable<String, String>();
>>        this.environment.put( Context.INITIAL_CONTEXT_FACTORY, "
>> com.sun.jndi.ldap.LdapCtxFactory" ); //$NON-NLS-1$
>>        this.environment.put( "java.naming.ldap.version", "3" );
>> //$NON-NLS-1$ //$NON-NLS-2$
>>
>>       // more logic here......
>>    }
>>
>> The problem is, harmony as a JDK, is the provider for such things like
>> com.sun.jndi.ldap.LdapCtxFactory. We aims to provide our compatible
>> implementation. Such as org.apache.harmony.jndi.ldap.LdapCtxFactory.
>> So, may be we could not used studio code directly.
>>
>> But, at least, test cases for the studio will be invaluable asset for us.
>>
>>  
>>
> 


Mime
View raw message