directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <akaras...@apache.org>
Subject Re: [ApacheDS] Why is setLdapServer() called on LdapSession?
Date Wed, 20 Aug 2008 14:18:52 GMT
On Wed, Aug 20, 2008 at 1:09 AM, Emmanuel Lecharny <elecharny@gmail.com>wrote:

> Alex Karasulu wrote:
>
>> Emmanuel,
>>
>> You're calling session.setLdapServer() on sessions when you're getting
>> them
>> from the LdapServer in the first place.  Take a look at line 120 of
>> LdapRequestHandler to see.  I was wondering should not this already be set
>> when you get the LdapSession from the LdapServer?
>>
>>
> This is to have a direct access to the ldapSession instance from the
> ldapServer. If we don't do that, we have to look into the session map to get
> access to it, which is a little bit more complex.
>
> Now, the question is why is it not set when the session is created the
> first time ? The LdapSession instance is created in the LdapProcotolHandler
> class in ldapServer.


Yeah why don't we set it.  Creating this field then not having it set on
creation leaves us to have to set this value explicitly.  Just seems like a
great way to have a NPE creep up after some refactoring later on.


>
>  Thanks,
>> Alex
>>
>>
>>
>
>
> --
> --
> cordialement, regards,
> Emmanuel L├ęcharny
> www.iktek.com
> directory.apache.org
>
>
>


-- 
Microsoft gives you Windows, Linux gives you the whole house ...

Mime
View raw message