Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 2734 invoked from network); 12 Jun 2007 07:59:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2007 07:59:07 -0000 Received: (qmail 50804 invoked by uid 500); 12 Jun 2007 07:59:09 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 50768 invoked by uid 500); 12 Jun 2007 07:59:09 -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 50753 invoked by uid 99); 12 Jun 2007 07:59:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2007 00:59:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [212.227.126.171] (HELO moutng.kundenserver.de) (212.227.126.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2007 00:59:05 -0700 Received: from [213.23.52.250] (helo=[10.120.20.28]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis), id 0MKxQS-1Hy1H10J9e-00086D; Tue, 12 Jun 2007 09:58:43 +0200 Message-ID: <466E5238.6060602@stefan-seelmann.de> Date: Tue, 12 Jun 2007 09:58:48 +0200 From: Stefan Seelmann User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: [JNDI] Getting the Directory Context From a Binding? References: <466D7AEA.9060700@gmail.com> <466D9A0F.3010102@gmail.com> <466DE2B6.5050905@gmail.com> In-Reply-To: <466DE2B6.5050905@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/BtEto11EMv+iDBFwR9/9Jgtv3Kefu4amhGn7 tV5LWA92A1RXO3iyvqEgH+4hB2eOUiUDKaTuKpybJWgim99S0f KxH/L0VwkFBtA+AiQfyI1LjtlXqNlVyBMxbqCPIu60= X-Virus-Checked: Checked by ClamAV on apache.org Hi, in Studio we don't use the Context.list() Context.listBindings() Context.lookup() Context.bind() methods. The reason is that JNDI performs magic LDAP request when using this methods. JNDI tries to find out if the object in LDAP is a Java object. Instead we just use the search(String name, String filter, SearchControls cons) method because it gives full control which LDAP request is performed against the server. With the SearchControls you can exactly specify the search scope (object, one level, subtree), the returned attributes, the count and time limits. However with that method you just get the SearchResult objects containing the LDAP attributes, there is no LDAP->Object mapping when using this method. You could take a look to the JNDIConnectionContext class, it does all the I/O to the directory. http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/JNDIConnectionContext.java?view=markup (It is not documented yet and we are on the way to refactor the connection part of the Studio) Hope that help, StefanS Ole Ersoy wrote: > OK Cool - I can always hunt through the LS code base and see how it's > done there. At least I know someone is doing it :-) > > Cheers, > - Ole > > > > >