[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] IProvisioningAgent not resolved by DS
- From: Thomas Watson <tjwatson@xxxxxxxxxx>
- Date: Fri, 16 Apr 2010 09:48:06 -0500
- Delivered-to: email@example.com
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.
Michael Mangeng ---04/16/2010 05:26:22 AM---Hi all!
Michael Mangeng <michael.mangeng@xxxxxxxxxxxxxxxxxx>
04/16/2010 05:26 AM
[p2-dev] IProvisioningAgent not resolved by DS
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
p2-dev mailing list