|RE: [p2-dev] Multiple targets|
Very helpful information. Many thanks for taking the time to respond. Much appreciated.
From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Henrik Lindberg
Sent: 17 January 2009 22:58
To: P2 developer discussions
Subject: Re: [p2-dev] Multiple targets
The answer to this question is that it depends on a couple of things:
- you can install and manage into one profile at a time
- one profile is equivalent to one runtime
- when you install into your profile you can have custom touchpoints that can execute your actions (in 3.5 it is easier to write a custom action). These actions can do whatever they need to do to get something installed "someplace else".
Separate installs (i.e. provisioning operations) must be performed if your system requires installation into more than one profile; the case if say both your client and server are osgi based.
There is one advantage if you can have them in the same profile as the configuration across client/server can be maintained with p2 - if you install into two separate profiles the profiles can be independently updated, and there is currently no functionality in p2 to handle constraints between profiles.
To answer your questions more directly:
would it be possible to provision everything through the p2 agent of the osgi instance?
Any p2 agent that have your touchpoint/actions installed can be used. Work is being performed in 3.5 to allow for (at least) touchpoint actions to be dynamically installed as part of the provisioning, but if you want to try things right now - you need to make sure that your actions are installed before you start your custom install.
If the database is an osgi based database and a separate runtime you will probably have it in a separate profile. The same agent can still be used but you need to run it against the two different profiles. If the database is not OSGi based - then your custom actions will have to deal with install and uninstall - but then you don' require more than one profile.
Hope that helped...
On Jan 16, 2009, at 7:15 PM, Warren_Paul@xxxxxxx wrote: