[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] IProvisioningAgent not resolved by DS

The issue here is that the p2.core bundle only registers the default provisioning agent after it has read some configuration properties to figure out the default agent location. This is done in the p2.core activator, perhaps there is a better way to get the agent location injected into the default provisioning agent without the need to run the p2.core activator. Right now the p2.core bundle is marked for lazy activation so the activator will not run until the first class is loaded from p2.core. In the Eclipse SDK the dropins support is marked for eager activation and it ends up loading classes from p2.core which causes it to be activated and the provisioning agent gets registered.

It would be good to figure out if there is a better way to do this.

Tom



Inactive hide details for Michael Mangeng ---04/16/2010 05:26:22 AM---Hi all!Michael Mangeng ---04/16/2010 05:26:22 AM---Hi all!


From:

Michael Mangeng <michael.mangeng@xxxxxxxxxxxxxxxxxx>

To:

p2-dev@xxxxxxxxxxx

Date:

04/16/2010 05:26 AM

Subject:

[p2-dev] IProvisioningAgent not resolved by DS




Hi all!

I don't know whether its a bug or intended functionality:

I'm creating a DS component which exposes a few provisioning actions on a servlet. My problem is that the component is not stared because references cannot be satisfied.

First case: Using DS only (does not work)
If i define IProvisioningAgent in component.xml as 0..1, static reference my component does not start because this reference cannot be satisfied (p2.core is not started automatically). as soon as i start p2.core manually in the osgi console, my component is started.

Second case: Using ServiceTracker (works)
Now i've used the same code as you guys used in the p2 commandprovider: In the activate method i register a servicetracker for IProvisioningAgent and wait for the tracker to call the addingService method. instead of the activate method - i register the servlet in the addingBundle method. Note that i use DS here also - only without the reference to IProvisioningAgent.

=> shouldn't the first case work also?

Using build: I20100414-1200

greetings,
Michael

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


GIF image

GIF image