Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 29837 invoked from network); 6 Oct 2009 15:20:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Oct 2009 15:20:46 -0000 Received: (qmail 71132 invoked by uid 500); 6 Oct 2009 15:20:45 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 71081 invoked by uid 500); 6 Oct 2009 15:20:45 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 71071 invoked by uid 99); 6 Oct 2009 15:20:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 15:20:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.85.219.211] (HELO mail-ew0-f211.google.com) (209.85.219.211) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 15:20:36 +0000 Received: by ewy7 with SMTP id 7so4145176ewy.41 for ; Tue, 06 Oct 2009 08:19:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.211.147.26 with SMTP id z26mr5079396ebn.73.1254842355369; Tue, 06 Oct 2009 08:19:15 -0700 (PDT) In-Reply-To: References: <4A8D9E98.5030100@ungoverned.org> <4A8DA544.2080302@ungoverned.org> Date: Tue, 6 Oct 2009 16:19:15 +0100 Message-ID: Subject: Re: Sigil launcher From: David Savage To: dev@felix.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Aug 20, 2009 at 8:38 PM, David Savage wrote: > On Thu, Aug 20, 2009 at 8:34 PM, Richard S. Hall wrote: >> On 8/20/09 15:17, David Savage wrote: >>> >>> Sure like the felix launcher with the bundles dir which is like a >>> simple version of fileinstall - this is a lowest common denominator >>> type approach for remote control of an OSGi runtime. As you say I >>> /could/ use the directory based bundle launch mechanism to start the >>> server as a bundle - but what if that's the behaviour we wanted to >>> debug via the ide - separating it out stuck me as cleaner as long as >>> it remains light weight. From the IDE perspective I want to be able to >>> bring the OSGi runtime up with as few dependencies as possible - as >>> then what ever you debug is out of band of the IDE interaction. >>> >> >> Still, we could potentially accomplish this via a wrapper approach. For >> example, we could modify our Main.java launcher to have a >> Main.getFramework() method. Then in the wrapper, you could invoke >> Main.main() to start the framework, call Main.getFramework() to get the >> created instance, open your socket and go to town. This would involve >> minimal dependencies too, but would avoid duplicating launcher code. > > Ok yep, that makes sense. > >> >> Well, let's see what other people think. Sorry for the multiple emails on this but I'm going around the houses on this launch support and I think I've come back to this idea. I like the idea of using karaf or pax profiles but having taken the time to have a look around they both have quite a few (useful) added extras that unfortunately make them complex to use out side of their own domains. For karaf the support for configs is a dependency that would be difficult to replicate from a standalone launcher and for both pax and karaf the support for urls in mvn format whilst useful is difficult to replicate outside of this context. So I'm thinking that the simplest option is for the sigil launch config to specify a felix config.properties which lists the bundles that should be automatically booted into the framework. This allows you to boot a framework into a known state and then use the socket based API to do the later tweeking. To launch an eclipse install via the felix launcher the config.properties could look something like: felix.auto.deploy.dir=/opt/eclipse/plugins I just tried this myself on a felix 2.0.0 install using the following command line: java -cp /opt/eclipse-SDK-3.5.1/plugins/org.eclipse.osgi_3.5.1.R35x_v20090827.jar:bin/felix.jar org.apache.felix.main.Main and promptly ran into a bunch of resolution failures but this at least proves it's trying to launch it... I just had a quick look at the framework issues in jira and I don't think this (Main.getFramework()) feature has been raised? I'm happy to do this and take a stab at supplying a patch if this all sounds ok? Regards, Dave > > Indeed. > > Regards, > > Dave > >> >> -> richard >> >> >