Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » B3 » Using the ProvisioningAgent
Using the ProvisioningAgent [message #602121] Wed, 03 March 2010 11:14
Filip Hrbek is currently offline Filip HrbekFriend
Messages: 233
Registered: July 2009
Senior Member
Hi all,

I am trying to user the provisioning framework properly in the b3 aggregator (no more restarting p2 bundles to switch p2 data area etc.).

I created a dedicated provisioning agent (with its location in the aggregation target) for everything that is done during the aggregation.
It means that, in headless run, there are no repository managers registered as "global" services, but they are obtained on demand from the provisioning agent.

Everything seems to work perfectly but one thing - if loading of UpdateSiteArtifactRepository fails (which is expected if the target folder is empty),
there's a piece of code that tries to refresh the artifact manager in this way (, method setProperty):

public String setProperty(String key, String newValue) {
//force repository manager to reload this repository because it caches properties
ArtifactRepositoryManager manager = (ArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.SERVICE_NAME);
if (manager.removeRepository(getLocation()))
return oldValue;

Obviously, there's no artifact repository manager global service available at the moment, so I get an NPE on "manager.removeRepository".
(This does not prevent the aggregator from finishing its work since this error is silently ignored - it just means "the repo does not exist")

Does it mean that there are some pieces of code in p2 that are not adapted to proper usage of the provisioning framework?
Or am I doing anything wrong?
Should I rather ask at p2-dev?

Thanks for hints.

Previous Topic:Problems with DS on startup
Next Topic:Using the ProvisioningAgent
Goto Forum:

Current Time: Thu Jun 21 08:58:05 GMT 2018

Powered by FUDForum. Page generated in 0.01228 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top