Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0ED6A4DB6 for ; Wed, 29 Jun 2011 19:57:57 +0000 (UTC) Received: (qmail 86597 invoked by uid 500); 29 Jun 2011 19:57:56 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 86516 invoked by uid 500); 29 Jun 2011 19:57:55 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 86508 invoked by uid 99); 29 Jun 2011 19:57:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 19:57:55 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shamikb@gmail.com designates 209.85.210.49 as permitted sender) Received: from [209.85.210.49] (HELO mail-pz0-f49.google.com) (209.85.210.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 19:57:51 +0000 Received: by pzk28 with SMTP id 28so1458980pzk.22 for ; Wed, 29 Jun 2011 12:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=03m97TlmftkaS045Dj1iwdwkcivWDYavFrLlVr8heOw=; b=HPJf9tb7pfLAeizhWf7PWp9Yq+U56vAtC1gAmpy+2E0d2Yr7tpRaf9LRhRb1eyaOa4 oeVWaUoqKewqtb8DxCXTJHS/oFnxSrfcwlzIVhOL/1GOxBWJiGTT9TeXUdlJI73R4RJY 8u3W9JMDSS5ODCwDgCpHjdNtu5+7kCQUHRYXo= MIME-Version: 1.0 Received: by 10.142.48.13 with SMTP id v13mr617014wfv.310.1309377450841; Wed, 29 Jun 2011 12:57:30 -0700 (PDT) Received: by 10.142.174.1 with HTTP; Wed, 29 Jun 2011 12:57:30 -0700 (PDT) In-Reply-To: References: <4E0B749A.6050104@ungoverned.org> Date: Wed, 29 Jun 2011 12:57:30 -0700 Message-ID: Subject: Re: Question on bundle management best practises From: Shamik Bandopadhyay To: users@felix.apache.org Content-Type: multipart/alternative; boundary=000e0cd20abad5951b04a6df31a9 --000e0cd20abad5951b04a6df31a9 Content-Type: text/plain; charset=ISO-8859-1 Just to add to my previous reply, I realized the other way to do is to drop all your bundles in the deploy folder instead of installing them through karaf console or web console. In that way you can install or uninstall a bundle by dropping and deleting respectively. But not sure how to refresh specific bundle(s) On Wed, Jun 29, 2011 at 12:44 PM, Shamik Bandopadhyay wrote: > I did take a look into this when I was trying the hot deploy exercise. My > understanding is, this is property which felix file-install internally uses > to perform hot deploy. It polls the "deploy" directory and installs any > newly found bundle, uninstalls when the bundle is reomoved. > > What I'm trying to figure looks a little beyond the scope of felix file > install. If you recall yesterday's discussion on hot deploy of a different > version of a bundle (for/bar example), I tried few things and understood the > behaviour. To refresh, my container has foo-1.0.0 which has a dependency on > bar-1.0.0. Successful, hot deploying a bar-1.1.0 requires the following > step. > > 1. Drop the bar-1.1.0 in deploy folder. Felix file install poller will pick > it up and install it. > 2. Uninstall bar-1.0.0 from the container > 3. Refresh foo-1.0.0. so that it'll refer to bar-1.1.0 > > The part which I'm struggling is to deal with step 2 and 3. I don't think > felix file install allows you to do so. Doing it through web console is an > option, but I was more looking into an external script which can do perform > the above steps by calling some API / script provided by OSGi / felix. > > Another thing I've noticed is OSGi core framework Bundle interface provides > the lifecycle methods. Maybe, I can create a bundle, expose a service which > will use this API to perform the lifecycle operations. The referenced bundle > lists, which needs to be refreshed, can be automated through spring app > context. > > This prompted me to post the question to understand what's the best > practise being followed in this particular aspect. > > -Thanks > > On Wed, Jun 29, 2011 at 11:53 AM, Richard S. Hall wrote: > >> It seems like File Install should allow you to do things. >> >> http://felix.apache.org/site/**apache-felix-file-install.html >> >> -> richard >> >> >> On 6/29/11 13:37, Shamik Bandopadhyay wrote: >> >>> Hi, >>> >>> I'm trying to understand the best practises or ways to manage bundles >>> in >>> an OSGi environment. I ran into this when I was trying to do a hot >>> deployment . As part of the process, I had to drop the new version of the >>> bundle in the deploy folder, uninstall the old version from OSGi >>> container >>> and refresh the bundles who has a reference to this one. >>> >>> Now, one easy way to achieve this is to use the web console. But I'm >>> looking >>> into the option of using some sort of external script which will allow me >>> to >>> uninstall and refresh bundles. The available commands are accessible only >>> through the karaf console. >>> >>> Is there a way to execute these commands (uninstall, refresh) from an >>> external script ? What are best practises people follow in this regard ? >>> >>> I'll appreciate if someone can share their experience. >>> >>> - Thanks >>> >>> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org >> For additional commands, e-mail: users-help@felix.apache.org >> >> > --000e0cd20abad5951b04a6df31a9--