Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9FAC8256 for ; Fri, 12 Aug 2011 04:55:42 +0000 (UTC) Received: (qmail 10604 invoked by uid 500); 12 Aug 2011 04:55:41 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 10139 invoked by uid 500); 12 Aug 2011 04:55:25 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 9819 invoked by uid 99); 12 Aug 2011 04:55:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 04:55:15 +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 rwonly@gmail.com designates 74.125.83.54 as permitted sender) Received: from [74.125.83.54] (HELO mail-gw0-f54.google.com) (74.125.83.54) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 04:55:08 +0000 Received: by gwb15 with SMTP id 15so678288gwb.13 for ; Thu, 11 Aug 2011 21:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=fk7bZq+Yd/FiL4sXE8PYUNvsLlGKsZa3mrFTezVC4jw=; b=YvQti3cOnt/HzZilmRyVoKgLjW5KZl9iAZmlglbuB8DsR9MYNsDtUgP2J67XuHVte3 PFK+mSOB1RqJwMyZ5dO8F9CLHQSqKzj5G6f+zie2jHD8y/aQPJufu8mgS/MpnMK5cPxe OgDlkecjv60CczoaUX5GbA1GoUOsoqMC+UHrI= Received: by 10.236.161.194 with SMTP id w42mr1391917yhk.206.1313124887132; Thu, 11 Aug 2011 21:54:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.137.15 with HTTP; Thu, 11 Aug 2011 21:54:27 -0700 (PDT) In-Reply-To: <3984D2E8-2AF6-4702-B064-2FD45AC80CD6@yahoo.com> References: <3984D2E8-2AF6-4702-B064-2FD45AC80CD6@yahoo.com> From: Rex Wang Date: Fri, 12 Aug 2011 12:54:27 +0800 Message-ID: Subject: Re: [DISCUSSION] The OBR feature in Geronimo3.0 To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=20cf305e23777179c704aa47b6c1 --20cf305e23777179c704aa47b6c1 Content-Type: text/plain; charset=ISO-8859-1 2011/8/12 David Jencks > I see that karaf is starting an obr subproject, "cave", just added to the > karaf sandbox. Can you tell how similar this is to your goals? > > http://svn.apache.org/repos/asf/karaf/sandbox/jbonofre/cave/trunk/ > > I haven't had time to look into your proposal yet. I have one question, > how do you figure out maven coordinates in the geronimo repository for a > bundle that only has a symbolic name? > The current install-library command use the following logic to calculate artifact: The default groupId is "default" (1) the file name has the following form:-.;, for e.g. mylib-1.0.jar;
(2) or the file is an OSGi bundle, then the artifactId is its Bundle-SymbolicName and the version is its Bundle-Version; After user install an osgi bundle to geronimo repo, the obr gbean's refresh() can re-generate obr.xml for all the artifacts in geronimo repo. Then use Xiao Yi's *obr:geronimo-uninstall symbolicName,version *cli can install and "persist" the bundle and all its dependencies. Could this answer your question? -Rex > thanks > david jencks > > On Aug 11, 2011, at 3:15 AM, Yi Xiao wrote: > > Hi Jark, I'v seen your comments in 5939 and reference here for convenience > * > -------------------------------------------------------------------------- > * > *1) Don't forget about the license headers. > 2) The geronimo-addUrl shell command and related code is unnecessary. There > is already obr:addurl operation. > 3) When doing geronimo-install would be good to also specify whether the > optional resources should also be downloaded and installed. > 4) Can't ThreadPool be injected into ObrBundleInstallerGBean just like the > repository is (instead of doing Kernel lookup)? > 5) GeronimoGBean could also be injected instead of doing OSGi service > lookup. > 6) You shouldn't need to add LOCAL_OBR into repository. That's what > GeronimoOBRGBean does already. > 7) The filter created in ObrUtils.searchRepository() essentially specifies > to find a bundle with the given symbolic name and the minimal version. That > is, for example, the user specified foo,1.0 but the install might result in > installing foo,2.0. I think we want to match the exact version. Or maybe we > want to support version ranges. > 8) The way the code currently decides whether the resource is "local" or > not is not very reliable. So we might need to find another way or improve > Felix OBR.* > * > -------------------------------------------------------------------------- > * > > 1) I will add the license headers > 2) I think the geronimo-addurl command should record the urls into a file, > and geronimo-obr will read the urls and add them so I write the command, > however, I don't decide which file to write and read, do you think we need > to record the urls? > 3) Do you mean the "optional resources" is the dependencies of the target > bundle or something else? > 4), 5), 6) I will resolve it > 7) I've test the scenario you described and there is no such confusion. > However, I think support the version ranges is a good idea! > 8) Now the "local" resources are the ones whose url start with "mvn:". The > implementation is: When install a bundle, if the bundle is local, will > verify its existence, if not existed, will throw an exception; If the bundle > is remote, just download it and install it into geronimo repository. > > On Thu, Aug 11, 2011 at 1:23 PM, Jarek Gawor wrote: > >> There is already obr:addurl command so obr:geronimo-addurl is >> unnecessary. I added all my comments to GERONIMO-5939. >> >> Jarek >> >> On Wed, Aug 10, 2011 at 10:24 PM, Yi Xiao >> wrote: >> > Hi devs, >> > >> > Now, I want to add the support of OSGi bundle repository in Geronimo3.0, >> the >> > patch is available at: >> https://issues.apache.org/jira/browse/GERONIMO-5939 >> > I used Felix's OBR APIs to develop and add THREE karaf shells to >> control >> > the OBR in geronimo: >> > >> > 1 obr:geronimo-addurl url >> > Add a remote repository to the geronimo's repositoryAdmin. >> > >> > 2 obr:geronimo-install [--start | --startLevel num | -v] >> > symbolicName,version >> > Install a bundle into geronimo in OBR way. >> > first, resolve the bundle, if resolve failed, return directly and print >> the >> > unsatisfactory conditions to user; >> > second, download the bundle and its dependencies from the remote sites >> to >> > local; >> > third, deploy all the bundles into geronimo repository and install them >> into >> > OSGi framework; >> > finally, update the geronimo's obr.xml file. >> > >> > 3 obr:geronimo-uninstall symbolicName,version >> > Uninstall a bundle from geronimo in OBR way. >> > Compared with the osgi:uninstall, the OBR's uninstall will clean up the >> > geronimo's repository and startup.properties file, also update the >> obr.xml >> > file. >> > >> > Any suggestions ? >> > >> > -- >> > Best regards! >> > >> > John Xiao >> > >> > > > > -- > Best regards! > > > John Xiao > > > -- Lei Wang (Rex) rwonly AT apache.org --20cf305e23777179c704aa47b6c1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2011/8/12 David Jencks <david_jencks@yahoo.com&g= t;
I see that karaf is starting an obr s= ubproject, "cave", just added to the karaf sandbox. =A0Can you te= ll how similar this is to your goals?

http://svn.apache.org/repos/asf/karaf/sandbox/jbonofre/cave/trunk/<= /div>

I haven't had time to look into your proposal yet. = =A0I have one question, how do you figure out maven coordinates in the gero= nimo repository for a bundle that only has a symbolic name?

The current install-library command use the following logic to cal= culate artifact:
The default groupId is "default"
(1) the f= ile name has the following form:<artifact>-<version>.<type&g= t;;, for e.g. mylib-1.0.jar;<br/>
(2) or the file is an OSGi bundle, then the artifactId is its Bundle-Symbol= icName and the version is its Bundle-Version;

After user install an= osgi bundle to geronimo repo, the obr gbean's refresh() can re-generat= e obr.xml for all the artifacts in geronimo repo.

Then use Xiao Yi's obr:geronimo-uninstall symbolicName,version <= /b>cli can install and "persist" the bundle and all its dependenc= ies.

Could this answer your question?

-Rex


thanks
david jencks

On Aug 11, 2011, at 3:15 AM, Yi Xiao wrote:

Hi Jark, I'v seen your comments in 5939 and reference= here for convenience
----------------------------------------------= ----------------------------
1) Don't forget about the license headers.
2) The geronimo-addUrl shell command and related code is unnecessary. There= is already obr:addurl operation.
3) When doing geronimo-install would be good to also specify whether the optional resources should also be downloaded and installed.
4) Can't ThreadPool be injected into ObrBundleInstallerGBean just like = the repository is (instead of doing Kernel lookup)?
5) GeronimoGBean could also be injected instead of doing OSGi service looku= p.
6) You shouldn't need to add LOCAL_OBR into repository. That's what= GeronimoOBRGBean does already.
7) The filter created in ObrUtils.searchRepository() essentially=20 specifies to find a bundle with the given symbolic name and the minimal version. That is, for example, the user specified foo,1.0 but the=20 install might result in installing foo,2.0. I think we want to match the exact version. Or maybe we want to support version ranges.
8) The way the code currently decides whether the resource is "local&q= uot; or not is not very reliable. So we might need to find another way or=20 improve Felix OBR.
---------------------------------------= -----------------------------------

1) I will add the= license headers
2) I think the geronimo-addurl command should re= cord the urls into a file, and geronimo-obr will read the urls and add them= so I write the command, however, I don't decide which file to write an= d read, do you think we need to record the urls?
3) Do you mean the "optional resources" is the dependencies = of the target bundle or something else?
4), 5), 6) I will resolve= it
7) I've test the scenario you described and there is no s= uch confusion. However, I think support the version ranges is a good idea!<= /div>
8) Now the "local" resources are the ones whose url start wi= th "mvn:". The implementation is: When install a bundle, if the b= undle is local, will verify its existence, if not existed, will throw an ex= ception; If the bundle is remote, just download it and install it into gero= nimo repository.

On Thu, Aug 11, 2011 at 1:23 PM, Jarek = Gawor <jgawor@gmail.com> wrote:
There is already obr:addurl command so obr:geronimo-addurl is
unnecessary. I added all my comments to GERONIMO-5939.

Jarek

On Wed, Aug 10, 2011 at 10:24 PM, Yi Xiao <xiaoyijhondevelop@gmail.com> wro= te:
> Hi devs,
>
> Now, I want to add the support of OSGi bundle repository in Geronimo3.= 0, the
> patch is available at: https://issues.apache.org/jira/browse/GE= RONIMO-5939
> I used Felix's OBR APIs to develop and add=A0 THREE karaf shells t= o control
> the OBR in geronimo:
>
> 1 obr:geronimo-addurl url
> Add a remote repository to the geronimo's repositoryAdmin.
>
> 2 obr:geronimo-install [--start | --startLevel num | -v]
> symbolicName,version
> Install a bundle into geronimo in OBR way.
> first, resolve the bundle, if resolve failed, return directly and prin= t the
> unsatisfactory conditions to user;
> second, download the bundle and its dependencies from the remote sites= to
> local;
> third, deploy all the bundles into geronimo repository and install the= m into
> OSGi framework;
> finally, update the geronimo's obr.xml file.
>
> 3 obr:geronimo-uninstall symbolicName,version
> Uninstall a bundle from geronimo in OBR way.
> Compared with the osgi:uninstall, the OBR's uninstall will clean u= p the
> geronimo's repository and startup.properties file, also update the= obr.xml
> file.
>
> Any suggestions ?
>
> --
> Best regards!
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0John Xiao
>



--
Best regard= s!

=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0John Xiao
=




--
Lei Wang (Rex)
rwonly AT apache.org
--20cf305e23777179c704aa47b6c1--