|Re: [p2-dev] touchpoints and manipulators|
I just tried the action contribution. It seems it isn’t working but I may be doing something wrong…
Here is a regular tpuchpoint.eclipse action:
And this is my action:
Even though they look alike the engine didn’t like it – the execution of a provisioning plan with iu that requires my action fails with:
Status ERROR: org.eclipse.equinox.p2.engine code=0 No action found for: org.eclipse.equinox.p2.touchpoint.eclipse.installOsgiConfig. java.lang.IllegalArgumentException: No action found for: org.eclipse.equinox.p2.touchpoint.eclipse.installOsgiConfig.
I also checked how my action was published – it had the correct touchpoint type and the tooling attached to it had the correct instructions.
Am I missing something?
BTW going back a bit, how do you think having touchpoints as service will help with the manipulator problem?
The EclipseTouchpoint is the one initializing the manipulator (see EclipseTouchpoint#getManipulator()) and it "injects" the manipulator to the actions themselves, so no potential issue jumps in mind atm.
I don't have any other ideas on dealing with the action reaching out to the service. Maybe if we ever managed to get the actions be contributed through service, then you could use DS or something like that.
On 2011-08-11, at 6:29 PM, Kapukaranov, Borislav wrote:
I've thought of that, haven't tried it though.
Assuming the contribution works fine do you think there will be problems with several actions that need access to the manipulator.
For example if the InstallBundleAction and my action for scoped plans work together in a single provisioning operation of a plan and a bundle can there be any synchronization problems? Different views of the config data?
In theory I feel this should work fine, but what I couldn't figure out is how to handle in a good way the initialization I need in my actions that is provided only by my touchpoint and isn't by the EclipseTouchpoint - for example a service.
One idea is to lookup my dependencies directly in the action’s code but that feels as a bad practice, although it should work.
Do you have any suggestions?
In the mean time I’ll check if actions can be harmlessly contributed to the Eclipse Touchpoint.
At this point the manipulator is seen as an implementation detail of the Eclipse Touchpoint, which explains why it is not shared / exposed to others.
I suppose that we could start sharing it among various touchpoints (either through service, or through explicit contract), but then comes the issue of intertwining the lifecycles of the touchpoints. To be specific, we need to be sure that all the touchpoints have the opportunity to validate what's there before the operation is committed.
Instead, what should be possible is for the actions that need to access the manipulator to be contributed to the Eclipse Touchpoint (see touchpointType attribute in the declaration of an action) and thus gain access to it. When I say contributed, they would not be part of the Eclipse Touchpoint bundle, but just be seen as part of it.
Note that I have not tried that.
What do you think?
On 2011-08-10, at 3:08 PM, Kapukaranov, Borislav wrote:
As the work on the p2 and Virgo integration moves forward I stumbled across an issue I thought was solved, but know I see we were just lucky and never had a chance of solving it with this approach.
In Virgo there are special artifacts that are available for deployment such as configurations and scoped plans.
I’ll take the configurations as an example.
So in order to deploy them there is a new touchpoint and a new install action, which takes the configurations published as IUs with iu properties and uploads them to config admin.
This leaves two touchpoints(Eclipse and Virgo) which both has commit capability and update the bundles.info, but the trouble is that the manipulators they use are different.
I thought that once the manipulator is initialized every touchpoint will use that instance but apparently this was a wrong assumption. :(
The results I observed are that depending on which touchpoint.commit gets called first by the engine, sometimes installed bundles are lost from the bundles.infobecause of the different manipulators.
Is there a nice way to use one and the same manipulator in all available touchpoints, or at least in all relevant touchpoints?
Back to the top