Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Hot deploy and bundle resolution
Hot deploy and bundle resolution [message #896814] Thu, 19 July 2012 22:04 Go to next message
Nick Bargnesi is currently offline Nick BargnesiFriend
Messages: 2
Registered: July 2012
Junior Member
Hi. I have a hopefully straightforward question about bundle resolution, specifically focused on hot deployments.

I get the concept of repositories, repository types, and bundle lifecycle. Steve Powell and Glyn Normington did a good job of clarifying things in this post, in particular with respect to developing and deploying.

I have a bundle X that depends on packages exported from Y. Bundle Y is a normal dependency that I have in a watched repository. I can hot deploy X as much as I want and things are good. What I really want to do is hot deploy X and Y, i.e., to pickup/. As I understand it, there's no way to accomplish this.

My curiousity comes from when I deploy Virgo host and snap bundles. I can deploy a snap bundle before its host bundle is deployed, and I end up in the same state as if I were to do it in the reverse order. Here's what I get when a host bundle is deployed after its child snap bundle, note the snap bound to path message on line 6:
[2012-07-19 16:59:11.020] fs-watcher                   <DE0000I> Installing bundle 'host-bundle' version '1.0.0'. 
[2012-07-19 16:59:11.031] fs-watcher                   <DE0001I> Installed bundle 'host-bundle' version '1.0.0'. 
[2012-07-19 16:59:11.037] fs-watcher                   <DE0004I> Starting bundle 'host-bundle' version '1.0.0'. 
[2012-07-19 16:59:11.129] start-signalling-2           <WE0000I> Starting web bundle 'host-bundle' version '1.0.0' with context path '/host'. 
[2012-07-19 16:59:11.168] start-signalling-2           <SN0000I> Host created for path '/host' 
[2012-07-19 16:59:11.200] start-signalling-2           <SN0010I> Snap bound to path '/host/snap' 
[2012-07-19 16:59:11.203] start-signalling-2           <WE0001I> Started web bundle 'host-bundle' version '1.0.0' with context path '/host'. 
[2012-07-19 16:59:11.204] start-signalling-2           <DE0005I> Started bundle 'host-bundle' version '1.0.0'.


In effect, I can hot deploy parent host bundles, child snap bundles, and application artifacts to pickup/. But if I deploy normal dependencies, I have to use an external or watched repository. Is there any way to get the same effect between hot deploying parent/child bundles with normal dependencies and application artifacts?
Re: Hot deploy and bundle resolution [message #896867 is a reply to message #896814] Fri, 20 July 2012 08:06 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Not really, assuming you don't want to put X and Y inside a PAR file and hot deploy that.

Snaps works that way because the dependencies are service dependencies so the order of deployment, which includes resolution of package imports etc., is irrelevant.

You can achieve a similar effect by ensuring that your bundles X and Y have no resolution dependencies between them and X is designed to handle services from Y coming and going. This probably means introducing a bundle Z to export a package containing the service interface that Y publishes and X consumes. You would put Z in the repository so it will be pulled in when either X or Y are deployed.
Re: Hot deploy and bundle resolution [message #896954 is a reply to message #896867] Fri, 20 July 2012 14:06 Go to previous message
Nick Bargnesi is currently offline Nick BargnesiFriend
Messages: 2
Registered: July 2012
Junior Member
Ah, Snaps uses service dependencies. That explains it.

Thanks, Glyn!
Previous Topic:Virgo Tooling M5 Release
Next Topic:Will Snaps work with Apache Felix
Goto Forum:
  


Current Time: Sat Dec 20 04:31:21 GMT 2014

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

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