Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Temporary Repo Location
Temporary Repo Location [message #557990] Thu, 09 September 2010 13:26 Go to next message
James Peltzer is currently offline James Peltzer
Messages: 41
Registered: July 2009
Member
Hi all,
I'm wondering if there is a way to temporarily register a repository with
the update manager.

I know I can use the IMetadataRepositoryManager and
IArtifactRepositoryManager to add repositories to the system permantently.
I'm looking for a way to add a repository location in such a way that it is
not persisted when the application shuts down.

Here's why:
I have a number of servers that are automatically detected by the system.
These servers frequently appear, disappear, and change their addresses.
Each time the application runs, it may be able to reach a completely
different set of servers.

I'm allowing each server to register itself as the host of a repository
while it is detected by my application but I would like to remove the
repository from the list when the server is no longer available. The best
way me to keep the repository list clean would be to re-add the repositories
each time the application launches.

Any help would be appreciated.

Thanks,

James
Re: Temporary Repo Location [message #558184 is a reply to message #557990] Fri, 10 September 2010 08:56 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2492
Registered: July 2009
Senior Member
Have you looked at using a composite repository? Thinking that a refresh
of that repository would pick up the changes in the contained repositories.

This way, you would only need to add your dynamic repository once.

Regards
- henrik

On 9/9/10 7:26 PM, James Peltzer wrote:
> Hi all,
> I'm wondering if there is a way to temporarily register a repository
> with the update manager.
>
> I know I can use the IMetadataRepositoryManager and
> IArtifactRepositoryManager to add repositories to the system
> permantently. I'm looking for a way to add a repository location in such
> a way that it is not persisted when the application shuts down.
>
> Here's why:
> I have a number of servers that are automatically detected by the
> system. These servers frequently appear, disappear, and change their
> addresses. Each time the application runs, it may be able to reach a
> completely different set of servers.
>
> I'm allowing each server to register itself as the host of a repository
> while it is detected by my application but I would like to remove the
> repository from the list when the server is no longer available. The
> best way me to keep the repository list clean would be to re-add the
> repositories each time the application launches.
>
> Any help would be appreciated.
>
> Thanks,
>
> James
>
>
>
>
Re: Temporary Repo Location [message #576222 is a reply to message #557990] Fri, 10 September 2010 08:56 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2492
Registered: July 2009
Senior Member
Have you looked at using a composite repository? Thinking that a refresh
of that repository would pick up the changes in the contained repositories.

This way, you would only need to add your dynamic repository once.

Regards
- henrik

On 9/9/10 7:26 PM, James Peltzer wrote:
> Hi all,
> I'm wondering if there is a way to temporarily register a repository
> with the update manager.
>
> I know I can use the IMetadataRepositoryManager and
> IArtifactRepositoryManager to add repositories to the system
> permantently. I'm looking for a way to add a repository location in such
> a way that it is not persisted when the application shuts down.
>
> Here's why:
> I have a number of servers that are automatically detected by the
> system. These servers frequently appear, disappear, and change their
> addresses. Each time the application runs, it may be able to reach a
> completely different set of servers.
>
> I'm allowing each server to register itself as the host of a repository
> while it is detected by my application but I would like to remove the
> repository from the list when the server is no longer available. The
> best way me to keep the repository list clean would be to re-add the
> repositories each time the application launches.
>
> Any help would be appreciated.
>
> Thanks,
>
> James
>
>
>
>
Re: Temporary Repo Location [message #631706 is a reply to message #558184] Fri, 08 October 2010 09:55 Go to previous messageGo to next message
James Peltzer is currently offline James Peltzer
Messages: 41
Registered: July 2009
Member
Thanks for the reply. I have gone the route of making a composite
repository even though an in-memory repository makes more sense in my mind.
The only remaining issue with this approach is that I can't seem to nest
composite repositories. That is, if the repository I'm trying to link to
from my composite repository is also a composite, it doesn't seem to work.
Is this actually the case? Is there a way to nest the composite?

Thanks again,

James


"Henrik Lindberg" <henrik.lindberg@cloudsmith.com> wrote in message
news:i6d9ti$h2l$1@build.eclipse.org...
> Have you looked at using a composite repository? Thinking that a refresh
> of that repository would pick up the changes in the contained
> repositories.
>
> This way, you would only need to add your dynamic repository once.
>
> Regards
> - henrik
>
> On 9/9/10 7:26 PM, James Peltzer wrote:
>> Hi all,
>> I'm wondering if there is a way to temporarily register a repository
>> with the update manager.
>>
>> I know I can use the IMetadataRepositoryManager and
>> IArtifactRepositoryManager to add repositories to the system
>> permantently. I'm looking for a way to add a repository location in such
>> a way that it is not persisted when the application shuts down.
>>
>> Here's why:
>> I have a number of servers that are automatically detected by the
>> system. These servers frequently appear, disappear, and change their
>> addresses. Each time the application runs, it may be able to reach a
>> completely different set of servers.
>>
>> I'm allowing each server to register itself as the host of a repository
>> while it is detected by my application but I would like to remove the
>> repository from the list when the server is no longer available. The
>> best way me to keep the repository list clean would be to re-add the
>> repositories each time the application launches.
>>
>> Any help would be appreciated.
>>
>> Thanks,
>>
>> James
>>
>>
>>
>>
>
>
Re: Temporary Repo Location [message #631763 is a reply to message #631706] Fri, 08 October 2010 11:28 Go to previous message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2492
Registered: July 2009
Senior Member
I would expect that to work...

One potential issue is if a repository changes type and was visitied by
clients - I seem to recall that there were issues with that - clients
may hold on to their belief the site is still in the old form.

I assume you have checked that the composite site is does not have a non
composite index, or that it is an old style update site at the same time.

To make sure it is not a caching issue like this, I would make sure to
start with a clean slate to make sure.

Regards
- henrik

On 10/8/10 3:55 PM, James Peltzer wrote:
> Thanks for the reply. I have gone the route of making a composite
> repository even though an in-memory repository makes more sense in my
> mind. The only remaining issue with this approach is that I can't seem
> to nest composite repositories. That is, if the repository I'm trying to
> link to from my composite repository is also a composite, it doesn't
> seem to work. Is this actually the case? Is there a way to nest the
> composite?
>
Previous Topic:p2 UI Update command - "Cannot create an update wizard on an unresolved operation"
Next Topic:[Policy] Invalid thread access with force restart
Goto Forum:
  


Current Time: Fri Apr 18 01:49:26 EDT 2014

Powered by FUDForum. Page generated in 0.10561 seconds