directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <akaras...@gmail.com>
Subject Re: New Bind and pending operations question
Date Tue, 09 Feb 2010 14:31:09 GMT
On Tue, Feb 9, 2010 at 6:17 AM, Emmanuel Lecharny <elecharny@gmail.com>wrote:

> Hi,
>
> when the client issue a first BindRequest, the messageId will be '1'. It
> will start a new LdapSession on the server, with all the subsequent
> operations having an incremented messageId. The clinet is responsible for
> the ID generation.
>
> Now, if the client issue a new BindRequest, should the messageId be
> incremented, or reset to 1 ? My understanding is that we are stil in the
> same LdapSession, with a request for new credentials, and we then need to
> use an incremented ID.
>
> For instance, in this scenario, where the ID is in parentheses after the
> request :
> Bind(1)
> Search(2)
> Search(3)
> Bind(XXX)
>
> the XXX should be 4.
>
> Now, that raise another question : whet should we do with the responses to
> (3), assuming we haven't received all of it ? Should we discard them ? My
> understanding is that they are still valid.
>
> wdyt ?
>
> The values for the message ID are specific to the session established with
the bind not with the connection. So we would start again from 1.  In a way
note that the session:messageId uniquely identifies each message received by
the server - although this is not explicit with a session id there is a
unique LdapSession object created.

So a new LdapSession object needs to be created for the new bind request
that comes in and numbers need to start back at 1. They can start at 4 too
if you like but this is not necessary, you just don't view 1 2 and 3 as
value usable message ID values for that session.

Now in terms of outstanding operations that are still in progress you need
to abandon or cancel them programatically once there is an explicit
UnbindRequest or there is an implicit unbind with a RE-BindRequest using the
same TCP socket.

Does this make sense or am I missing something.

-- 
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org

Mime
View raw message