Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 531718CB1 for ; Fri, 12 Aug 2011 02:10:07 +0000 (UTC) Received: (qmail 75847 invoked by uid 500); 12 Aug 2011 02:10:07 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 75708 invoked by uid 500); 12 Aug 2011 02:10:06 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 75693 invoked by uid 99); 12 Aug 2011 02:10:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 02:10:06 +0000 X-ASF-Spam-Status: No, hits=2.1 required=5.0 tests=FREEMAIL_FROM,HK_RANDOM_ENVFROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xiaoyijhondevelop@gmail.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vw0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 02:09:59 +0000 Received: by vws18 with SMTP id 18so2883222vws.13 for ; Thu, 11 Aug 2011 19:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=G8ecf37tZWywuM4EgGzXhfHNpJcEsmix9KmGsFy+fCs=; b=cXk1cXh+/8kmNafY3t8OMISIo/xqA3AblITZHlyrenfUlybcrefh7+MxTFX9dz9FP1 v261tHon/3tFgfiDvadJApqRTiDaCD/aqABALNtLAXKOOPhfcMGObX3BsxhuYDSDoexj Jqz61ZA0SkxJZXDDvS42RJdPOSNUqj3UP01pg= MIME-Version: 1.0 Received: by 10.52.29.178 with SMTP id l18mr275803vdh.311.1313114978275; Thu, 11 Aug 2011 19:09:38 -0700 (PDT) Received: by 10.220.95.71 with HTTP; Thu, 11 Aug 2011 19:09:38 -0700 (PDT) In-Reply-To: <4E43D9FE.7070803@ungoverned.org> References: <4E43D9FE.7070803@ungoverned.org> Date: Fri, 12 Aug 2011 10:09:38 +0800 Message-ID: Subject: Re: About the repository's search order in OBR's repositoryAdmin From: Yi Xiao To: dev@felix.apache.org Cc: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=20cf307f3b36d4515d04aa456713 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f3b36d4515d04aa456713 Content-Type: text/plain; charset=ISO-8859-1 Thank you very much for response so quick! In my application, maybe there are two or more resources have the same symbolic name and version, but different uris(local or remote), so I need a search order to guarantee the uri is local first. On Thu, Aug 11, 2011 at 9:32 PM, Richard S. Hall wrote: > On 8/10/11 11:00 PM, Yi Xiao wrote: > >> Hi devs, >> >> I have a question that Could I define the repository's search order when >> repository Admin's search the resource? And also, when the resolver >> resolve >> a bundle, could I assign the order of the repositories? >> >> I've noticed when the repository Admin search a resource, it will search >> system and local first, then the user added repos. But the user's repos >> search order depends on the repo's add order. >> Now, I want to define the search order of users added repos, could you >> give >> me some suggestions? thx~ >> >> > Using org.apache.felix.**bundlerepository.**RepositoryAdmin.resolver(**Repository[]) > you can specify which repository to use. I would imagine that this just > iterates over them in order. However, I'm not sure how significant the > repository order is, since the results are aggregated and then the "best" > candidate is chosen iteratively until one succeeds. > > -> richard > > -- Best regards! John Xiao --20cf307f3b36d4515d04aa456713 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you very much for response so quick!
In my application, maybe ther= e are two or more resources have the same symbolic name and version, but di= fferent uris(local or remote), so I need a search order to guarantee the ur= i is local first.

On Thu, Aug 11, 2011 at 9:32 PM, Richard S. = Hall <heavy@un= governed.org> wrote:
On 8/10/11 11:00 PM, Yi Xiao wrote:
Hi devs,

I have a question that Could I define the repository's search order whe= n
repository Admin's search the resource? And also, when the resolver res= olve
a bundle, could I assign the order of the repositories?

I've noticed when the repository Admin search a resource, it will searc= h
system and local first, then the user added repos. But the user's repos=
search order depends on the repo's add order.
Now, I want to define the search order of users added repos, could you give=
me some suggestions? thx~


Using org.apache.felix.bundlerepository.RepositoryAdmin.resol= ver(Repository[]) you can specify which repository to use. I would i= magine that this just iterates over them in order. However, I'm not sur= e how significant the repository order is, since the results are aggregated= and then the "best" candidate is chosen iteratively until one su= cceeds.

-> richard




--
Best regards!
=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0John Xiao

--20cf307f3b36d4515d04aa456713--