You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Yi Xiao <xi...@gmail.com> on 2011/08/11 05:00:40 UTC

About the repository's search order in OBR's repositoryAdmin

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~

-- 
Best regards!


               John Xiao

Re: About the repository's search order in OBR's repositoryAdmin

Posted by Yi Xiao <xi...@gmail.com>.
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 <he...@ungoverned.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 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

Re: About the repository's search order in OBR's repositoryAdmin

Posted by Yi Xiao <xi...@gmail.com>.
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 <he...@ungoverned.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 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

Re: About the repository's search order in OBR's repositoryAdmin

Posted by "Richard S. Hall" <he...@ungoverned.org>.
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