Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 22615 invoked from network); 9 Feb 2010 14:31:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Feb 2010 14:31:39 -0000 Received: (qmail 69695 invoked by uid 500); 9 Feb 2010 14:31:39 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 69605 invoked by uid 500); 9 Feb 2010 14:31:39 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 69597 invoked by uid 99); 9 Feb 2010 14:31:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 14:31:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of akarasulu@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 14:31:31 +0000 Received: by fg-out-1718.google.com with SMTP id 19so119226fgg.1 for ; Tue, 09 Feb 2010 06:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=f16NvjesvcA6XZUpSOwEYdSmMihO/FRxZYf+bnvxQGM=; b=h4zYw85LkFv1GJCVVdmpe4cjhpoLTFZKuvZ+cCeTBUCYI1ubw526Yo6xsmNrA36dO4 enDZ0iI0tf2xuaPcNwwOHU1IUG0g2vrYHiDl2+b5rL23/a5yJ5JuF2TzXW1weITTgHnc DBNjaN2ofuTkiIUCOV52R70UkcLZx3WAehtOQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kFYreZ5CJOkzyZL6uCjwpqBBaY5M4lESi/VN1C0uJuAT53mzb4e+AbQBOJKDxylQQS BWGTyKQ7bcaS248S7C7iG0kqj2pomZojuvSTAMe0oi/0XsUoGvNVTxiUgVoMrbk3YFV4 FeKhbtH6LZ2U0nIGk45zQ3LMIhu0UP35dJioI= MIME-Version: 1.0 Received: by 10.239.141.13 with SMTP id z13mr831057hbz.134.1265725869471; Tue, 09 Feb 2010 06:31:09 -0800 (PST) In-Reply-To: <4B714446.9000902@gmail.com> References: <4B714446.9000902@gmail.com> Date: Tue, 9 Feb 2010 09:31:09 -0500 Message-ID: Subject: Re: New Bind and pending operations question From: Alex Karasulu To: Apache Directory Developers List , elecharny@apache.org Content-Type: multipart/alternative; boundary=001485f628f2d53a30047f2bc4b1 --001485f628f2d53a30047f2bc4b1 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Feb 9, 2010 at 6:17 AM, Emmanuel Lecharny 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 --001485f628f2d53a30047f2bc4b1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Feb 9, 2010 at 6:17 AM, Emmanuel Lec= harny <elecharn= y@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 o= perations having an incremented messageId. The clinet is responsible for th= e ID generation.

Now, if the client issue a new BindRequest, should the messageId be increme= nted, or reset to 1 ? My understanding is that we are stil in the same Ldap= Session, with a request for new credentials, and we then need to use an inc= remented ID.

For instance, in this scenario, where the ID is in parentheses after the re= quest :
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 es= tablished with the bind not with the connection. So we would start again fr= om 1. =A0In a way note that the session:messageId uniquely identifies each = message received by the server - although this is not explicit with a sessi= on id there is a unique LdapSession object created.

So a new LdapSession object needs to be created f= or 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 i= n progress you need to abandon or cancel them programatically once there is= an explicit UnbindRequest or there is an implicit unbind with a RE-BindReq= uest using the same TCP socket.

Does this make sense or am I missing something.

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

--001485f628f2d53a30047f2bc4b1--