Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Plan Concepts
Plan Concepts [message #688502] Fri, 24 June 2011 20:10 Go to next message
Raji Abraham is currently offline Raji Abraham
Messages: 13
Registered: October 2010
Junior Member
If someone can confirm my following observations on plans, that will be of great help:

  1. Artifacts referred by plans has to be in the repository. It cannot be in the pickup directory such as other bundles or the config directory.
  2. If globally scoped Plan B and Plan C specifies dependency on Artifact A, the second plan that is attempted to start will fail with a message 'Artifact A already installed'.

Thanks
Raji
Re: Plan Concepts [message #688543 is a reply to message #688502] Fri, 24 June 2011 22:03 Go to previous messageGo to next message
Borislav Kapukaranov is currently offline Borislav Kapukaranov
Messages: 80
Registered: September 2010
Member
True on the first one.

If you mean scoped=false is globally scoped plan then True for the second observation as well.

Best regards
Borislav
Re: Plan Concepts [message #689269 is a reply to message #688543] Mon, 27 June 2011 09:55 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Note that it would be nice to eventually allow unscoped plans to be able to share artifacts, but this would involve some reference counting and garbage collection and is a little complicated when we consider how lifecycle operations on plans would affect shared artifacts. Perhaps we'll leave this until Virgo implements the OSGi subsystems RFC 152.
Re: Plan Concepts [message #689382 is a reply to message #689269] Mon, 27 June 2011 14:41 Go to previous messageGo to next message
Raji Abraham is currently offline Raji Abraham
Messages: 13
Registered: October 2010
Junior Member
Let me explain a scenario I have. May be someone can suggest how I can achieve this:

I wanted to create common services like the OSGI compendium services. One such "utility" service I have is an incident manager. Its a glorified logging system that has emails sent to "event" subscribers based on custom event processing/correlation. [There are other systems like this available but they are primarily focused on the IT user. I had to tailor it to the business user who need to be notified via "business friendly" email.]

Several other plans want to ensure that the incident manager is available for it to run. If I create scoped plan and include the incident manager in it, Virgo will attempt to create new instances of the incident manager for each plan. Since incident manager plan has a web context and a TCP port it listens on for non-Java apps to send incidents, the second instance creation will fail. Hence I thought of creating unscoped plans. But then too the second installation fails because the incident manager plan is already installed.

There are lots of other scenarios, for example, if I want Virgo to be an ESB platform, I will need Singleton services like the JMS provider or Hazelcast instance, etc.

I can see based on Glyn's description why the implementation is the way it is now. Are there other ways that I can achieve my goal?

Thanks
Raji
Re: Plan Concepts [message #689384 is a reply to message #689382] Mon, 27 June 2011 14:44 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
You could deploy such common utilities using the initialArtifacts property in the user region configuration file. See the User Guide for details. This would ensure the utilities are deployed before your (other) applications. The applications would then not list these utilities in their plans. The main downside is that the dependency is implicit in the applications' plans.
Re: Plan Concepts [message #689426 is a reply to message #689384] Mon, 27 June 2011 16:04 Go to previous messageGo to next message
Raji Abraham is currently offline Raji Abraham
Messages: 13
Registered: October 2010
Junior Member
This is working great! Implicit dependency is not a problem in my case. I can ensure that through deployment/installation automation. I noticed that above the initialArtifacts property there is a comment stating Quote:
# the next line must not be broken with back-slashes

I tried breaking the line with back-slashes and it works fine.
Re: Plan Concepts [message #689428 is a reply to message #689426] Mon, 27 June 2011 16:06 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
You're right. I think we fixed that in the 3.0 line.
Previous Topic:Adding bundle nature
Next Topic:Resolving in-workspace bundle dependencies
Goto Forum:
  


Current Time: Sat Oct 25 00:57:08 GMT 2014

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

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