directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: How to separate LDAP protocol handler?
Date Sun, 21 May 2006 00:25:23 GMT
Jaka Jaksic a écrit :

>Sorry for posting twice. I didn't want to rush anyone, I just thought that
>my first post didn't get to the list, since it didn't appear in the archive
>even the next day.
>  
>
np at all !

>Thanks for your reply, Emmanuel. After reading your mail, I immediately
>found what I was looking for, I don't know how it escaped me the first
>time...
>  
>
Cool !

>  
>
>>1. LdapProtocolHandler creates the handlers in a static block and 
>>places them in an unmodifiable map, which prevents handlers from being
>>    
>>
>replaced.
>
>This is false. Only the default handlers are static, but they aren't used if
>proper environment properties are set.
>  
>
Ah, may be... I didn't looked very farther, however, than default 
initialization.

>So to use the LdapProtocolProvider with custom directory implementation, all
>I needed to do is this:
>
>	...
>	Hashtable env = ...
>	// map search request types to my own handler
>	env.put(SearchRequest.class.getName(),
>MySearchHandler.class.getName());
>	env.put(SearchRequestImpl.class.getName(),
>MySearchHandler.class.getName());
>	LdapProtocolProvider protocolProvider = new
>LdapProtocolProvider(env);
>	...
>
>I think this should be documented better, as it is very useful. I can
>provide a Hello World LDAP example if anyone is interested.
>  
>
You bet we are ! Better documentation depend on such samples, and people 
like you producing them :)

This is OSS, and Open means Open to welcomed contribution from everyone !

Happy that you found your way through the code ;)

Emmanuel


Mime
View raw message