Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Dependent Applications
Dependent Applications [message #868719] Wed, 02 May 2012 12:50 Go to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
Hello,
I'm just starting to evaluate Virgo and I have read through large parts of the documentation. I do have a question which I haven't been able to find a good answer for. I'm considering moving a large OSGi-based application from "pure" Equinox to Virgo so that I can co-host other applications as well. So far so good - Virgo seems a perfect fit for this. However, my big application has several plugin-constructs - i.e. it can be extended ad-hoc by dropping in bundles which in turn implement and expose a service (there are a couple of different types supported). Now, if I package up my applications using a plan (or a PAR) - how would I deploy my plugins ? I would assume as another application, but how do I declare the dependencies between them ? How do I make sure Virgo starts my "big app" first and then the plugin-apps ? Should note that I am just planning on using the Virgo kernel as this is not a web-application.

Hope someone can help straighten this out for me.

Thanks!
Re: Dependent Applications [message #868740 is a reply to message #868719] Wed, 02 May 2012 13:27 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

You can add your plan/PAR in initialArtifacts inside config/org.eclipse.virgo.kernel.userregion.properties. This will make your application start before the artifacts (your add-ons) in pickup are hot-deployed.

More details can be found in section 11.6 Configuring Deployment in the User Guide [1]

[1] http://eclipse.org/virgo/documentation/virgo-documentation-3.0.3.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user-guide.html#configuring-kernel
Re: Dependent Applications [message #868757 is a reply to message #868740] Wed, 02 May 2012 13:51 Go to previous messageGo to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
Thanks Hristo, this sounds like it would solve the plugin-issue. However, on a related note I suspect, as the plan would be to host many applications on top of this framework in the future, that we would soon have a need for applications to consume services of other applications. How would this be done ? I understand that an application can have a global scope (or just publish services to the global scope) - but once again start-up order comes into the picture. The "initialArtifacts"-approach doesn't solve that (both apps may support plugin-constructs - and hence both have to be deployed as initialArtifacts). How would I handle this scenario ?
Re: Dependent Applications [message #868769 is a reply to message #868757] Wed, 02 May 2012 14:12 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

Well, what did you use with your Equinox based runtime?

Off the top of my head ... you can probably use DS or Blueprint to control the service dependencies but I'm not sure this will fit your use-case.



Re: Dependent Applications [message #868790 is a reply to message #868769] Wed, 02 May 2012 14:44 Go to previous messageGo to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
Well, currently I am not yet in this situation. I only have one app - but as I said, we are planning on moving other apps to this future platform - and I am sure the situation would arise. I am sure I could use blueprints to wire the dependencies - but the start order would still be an issue, right ? Unless my dependencies are optional and we code our apps to deal with that.
Re: Dependent Applications [message #868873 is a reply to message #868790] Wed, 02 May 2012 16:55 Go to previous messageGo to next message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
I should add that within my current application I use a property in Equinox config.ini to control the start-order of my bundles...
Re: Dependent Applications [message #869462 is a reply to message #868873] Thu, 03 May 2012 12:43 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

Hi Johan,

What you can do to control the startup order is to use:

  • plans
  • DS, Blueprint or similar framework


Plans can be embedded in other plans so combining this neat feature with initialArtifact you can start first your framework application and then ensure your add-ons are started in a certain order if this is really needed.

Personally I prefer frameworks such as DS and Blueprint to ensure that the components are functional only when their dependencies (services, configuration) are provisioned. The start order then should not really matter (except for the parent/framework app) since once all dependencies are satisfied the framework will take care to activate your add-on. This works well for smaller projects but I have no idea if this is applicable for your project structure as well.

Re: Dependent Applications [message #869603 is a reply to message #869462] Thu, 03 May 2012 17:11 Go to previous message
Johan Eriksson is currently offline Johan ErikssonFriend
Messages: 19
Registered: May 2012
Junior Member
Thanks Hristo, yes - I think I can do this with blueprints.
Previous Topic:Bundle refresh in virgo 3.0.2
Next Topic:Help! Update virgo tool from sts2.91 and the plugin crashed
Goto Forum:
  


Current Time: Tue Apr 16 07:12:17 GMT 2024

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

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

Back to the top