Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 59029 invoked from network); 23 Feb 2009 14:47:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2009 14:47:49 -0000 Received: (qmail 13175 invoked by uid 500); 23 Feb 2009 14:47:49 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 13153 invoked by uid 500); 23 Feb 2009 14:47:49 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 13142 invoked by uid 99); 23 Feb 2009 14:47:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 06:47:49 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of imavroukakis@gameaccount.com designates 83.244.222.83 as permitted sender) Received: from [83.244.222.83] (HELO mail1.gameaccount.com) (83.244.222.83) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 14:47:40 +0000 Received: from localhost ([127.0.0.1] helo=[192.168.30.190]) by mail1.gameaccount.com with esmtp (Exim 4.66) (envelope-from ) id 1Lbc4x-0001Wo-Qy for users@directory.apache.org; Mon, 23 Feb 2009 14:46:44 +0000 Received: from [192.168.30.190] ([192.168.30.190] helo=[192.168.30.190]) by ASSP.nospam; 23 Feb 2009 14:46:43 +0000 Message-ID: <49A2B6F7.1080707@gameaccount.com> Date: Mon, 23 Feb 2009 14:47:19 +0000 From: Yiannis Mavroukakis Organization: GameAccount User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: [ApacheDS] Poor man's cluster interceptor References: <498AFE3A.7050406@vogon.net> <499DD922.90702@gameaccount.com> <499DDC29.9080107@nextury.com> <499ED47B.3030005@gameaccount.com> <49A27601.40707@gameaccount.com> <49A286AB.1000809@gameaccount.com> <49A29519.3030202@gameaccount.com> In-Reply-To: <49A29519.3030202@gameaccount.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hello again, Little bit of background info before my question 2009-02-23 14:34:51,407 DEBUG [org.apache.directory.server.schema.registries.DefaultOidRegistry] looked up OID '1.3.6.1.4.1.1466.115.121.1.12' with id 'dn' 2009-02-23 14:34:51,407 DEBUG [org.apache.directory.server.schema.registries.DefaultOidRegistry] looked up OID '2.5.18.12' with id 'collectiveAttributeSubentries' 2009-02-23 14:34:51,407 DEBUG [org.apache.directory.server.schema.registries.DefaultAttributeTypeRegistry] lookup with id2.5.18.12' of attributeType: <2.5.18.12, collectiveAttributeSubentries> 2009-02-23 14:34:51,407 DEBUG [org.apache.directory.server.schema.registries.DefaultOidRegistry] looked up OID '2.5.4.0' with id 'objectClass' 2009-02-23 14:34:51,407 DEBUG [org.apache.directory.server.schema.registries.DefaultAttributeTypeRegistry] lookup with id2.5.4.0' of attributeType: <2.5.4.0, objectClass> As i've mentioned in my previous posts, Jabber XCP seems to stick dn as an attribute in its search request. Now the question is, is it correct to implement search( NextInterceptor next , SearchOperationContext opContext ) in order to remove DN? I've tried to do something very very basic like public EntryFilteringCursor search( NextInterceptor next , SearchOperationContext opContext ) throws Exception { EntryFilteringCursor cursor = next.search( opContext ); Set returnAttributes = opContext .getReturningAttributes( ); if( returnAttributes != null ) { Set modifiedAttributes = new HashSet( ); for( AttributeTypeOptions attributeTypeOptions : returnAttributes ) { if( !attributeTypeOptions.hasOption( "1.1" ) ) { modifiedAttributes.add( attributeTypeOptions ); } } opContext.setReturningAttributes( modifiedAttributes ); } return cursor; } But that doesn't seem to do the trick, as DS is still complaining about the existence of dn as an attribute in the search. Am I going along the right path or is this all very very wrong ? :-) Thank you! Yiannis Yiannis Mavroukakis wrote: > I'll try it, although my understanding of how to do either one is poor > :-) > > Y. > > Emmanuel Lecharny wrote: >> You can even write an interceptor which will remove the DN from the >> returned attributes, and add it when the search is successfull (you >> will have to add a Filter) >> >> I think it can be done in half an hour. >> >> Otherwise, I would rather implement RFC 5020, transform the DN to >> entryDN in an interceptor, and back. That would be way better, but a >> bit longer :) >> >> On Mon, Feb 23, 2009 at 12:21 PM, Yiannis Mavroukakis >> wrote: >> >>> I've looked around the config for Jabber XCP and it doesn't seem to >>> be a >>> configurable attribute. Is it possible to use >>> an interceptor, implement search( NextInterceptor next >>> ,SearchOperationContext opContext ), and rewrite the attribute to be >>> 1.1 >>> instead of dn ? >>> >>> Thanks, >>> >>> Yiannis >>> >>> Emmanuel Lecharny wrote: >>> >>>> More specifically, if you just want to get the DN of each entry >>>> without any other attribute, just specify "1.1 " as requested >>>> attributes. >>>> >>>> On Mon, Feb 23, 2009 at 11:16 AM, Emmanuel Lecharny >>>> wrote: >>>> >>>> >>>>> Hi, >>>>> >>>>> DN is not an attribute. You should not send a search request with it >>>>> as a requested attribute. That's why you get this warning. >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> Cordialement, >>>>> Emmanuel L�charny >>>>> www.iktek.com >>>>> >>>>> >>>>> >>>> >>>> >>>> >> >> >> >>