Return-Path: Delivered-To: apmail-maven-archiva-dev-archive@locus.apache.org Received: (qmail 60504 invoked from network); 25 Feb 2008 22:12:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2008 22:12:33 -0000 Received: (qmail 74662 invoked by uid 500); 25 Feb 2008 22:12:28 -0000 Delivered-To: apmail-maven-archiva-dev-archive@maven.apache.org Received: (qmail 74535 invoked by uid 500); 25 Feb 2008 22:12:28 -0000 Mailing-List: contact archiva-dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: archiva-dev@maven.apache.org Delivered-To: mailing list archiva-dev@maven.apache.org Received: (qmail 74526 invoked by uid 99); 25 Feb 2008 22:12:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 14:12:28 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 124.108.96.112 is neither permitted nor denied by domain of rahul.thakur.xdev@gmail.com) Received: from [124.108.96.112] (HELO rel105.mail.aue.yahoo.com) (124.108.96.112) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 25 Feb 2008 22:11:39 +0000 Received: (qmail 30596 invoked by uid 1000); 25 Feb 2008 22:11:56 -0000 Received: from 124.108.96.70 by rel105.mail.aue.yahoo.com with SMTP; Mon, 25 Feb 2008 14:11:56 -0800 Received: (qmail 19356 invoked from network); 25 Feb 2008 22:11:56 -0000 Received: from unknown (HELO ?192.168.103.153?) (rahul.thakur@xtra.co.nz@203.193.119.196 with plain) by smtp101.tnz.mail.aue.yahoo.com with SMTP; 25 Feb 2008 22:11:56 -0000 X-YMail-OSG: vXg572AVM1kHWz3sOFBVmRxsTWP3OEwsEy8drmpMHpv5fOywxmWQGYJ33Vnj29SIrQ-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <47C33D28.1010500@gmail.com> Date: Tue, 26 Feb 2008 11:11:52 +1300 From: Rahul Thakur User-Agent: Thunderbird 3.0a1pre (Windows/2008022103) MIME-Version: 1.0 To: archiva-dev@maven.apache.org Subject: Re: [OT] Re: An experiment with Spring... What about OSGi ? References: <3D9CB907-9908-466D-BC15-5EFEB62AE137@apache.org> <47C31175.20605@free.fr> <1a5b6c410802251116q651748a0i6eaece210da58b53@mail.gmail.com> <47C3168F.30505@free.fr> In-Reply-To: <47C3168F.30505@free.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org OK, this is just my personal opinion: I think choice of Spring OSGi is influenced by a few things: 1) Archiva is looking to garner more contributions from the community. Moving to Spring would, IMO, definately lessen the learning curve. There is a comprehensive documentation and large user base who work with Spring. Regards choice of Spring DM for OSGi, you might want to have a look here: http://static.springframework.org/osgi/docs/1.0/reference/html/why-spring-dm.html 2) Plexus is good but not as comprehensively documented. (I admit I haven't sustained in doing my bit with the documentation there). 3) May be others can chip with their thoughts on Modello. But I think Modello could be dropped by using JPA annotations for the data model. Cheers, Rahul Ludovic Maitre wrote: > Hi Carlos, > > Thanks for your answer, > > Carlos Sanchez a �crit : >> spring has good integration with OSGi to enable Spring beans to be >> OSGi services. >> > Yes, i'm aware that this integration exist and i've read a couple of > meetings reports related to it on the Equinox wiki, but why bother with > the complicated Spring xml descriptors (well for me i admit that i > haven't tried Spring since v1.2 iirc), is there any need in Archiva > which is not adressed by OSGi (Felix/Sling for instance) + Modello ? I'm > wondering what are the benefits of Spring (even with OSGi integration) > regarding the current Plexus architecture or an alternative architecture > based on some OSGi layer, which features does bring Spring which are not > implemented in the other frameworks (including modello) ? > Best regards, thanks for your time, > >> On Mon, Feb 25, 2008 at 11:05 AM, Ludovic Maitre >> wrote: >>> Hi Brett, all, >>> >>> Have you considered using OSGi instead of [Plexus|Spring] ? I'm not an >>> expert of one or the other, but i try to do some projects with OSGi >>> since a few months and i like it. >>> Best regards, >>> >>> Brett Porter a �crit : >>> > Hi, >>> > >>> > Given the discussion yesterday, I played around with some changes on a >>> > branch when I got up early this morning to show how we could do a >>> > partial migration to Spring without having to do it all at once. >>> > >>> > https://svn.apache.org/repos/asf/maven/archiva/branches/springy >>> > >>> > This shows: >>> > - ability to lookup plexus components via spring IoC >>> > - ability to lookup spring beans during the Plexus component lifecycle >>> > - basic functional setup for Spring in the Archiva application >>> > >>> > Eventually, as whole subsystems no longer require plexus it will be >>> > possible to clean it up, such as: >>> > - get rid of the additional lookups >>> > - use annotations for configuration >>> > - use testng + get/set + mocks for the tests where possible (and >>> > spring testcontext where integration testing is needed) >>> > >>> > Here is how to obtain a plexus object from Spring (note there is some >>> > pre-req setup in test cases you'll see in the commit, as there is in >>> > the additional servlet listener): >>> > >> > factory-method="createInstance" /> >>> > >> > class="org.apache.maven.archiva.common.spring.PlexusFactory"> >>> > >>> > >>> > >>> > >>> > To get a spring bean inside a plexus component, it is like this (make >>> > sure to implement Initializable): >>> > >>> > /** >>> > * @plexus.requirement >>> > */ >>> > private SpringFactory springFactory; >>> > >>> > public void initialize() >>> > throws InitializationException >>> > { >>> > urlFailureCache = (UrlFailureCache) springFactory.lookup( >>> > "urlFailureCache" ); >>> > } >>> > >>> > The next thing we should probably try is using something like >>> > SpringCache as suggested to remove the plexus-cache dependency. >>> > >>> > Have fun! >>> > >>> > Cheers, >>> > Brett >>> > >>> > -- >>> > Brett Porter >>> > brett@apache.org >>> > http://blogs.exist.com/bporter/ >>> > >>> > >>> > >>> >>> >>> -- >>> Cordialement, >>> Ludo - http://www.ubik-products.com >>> --- >>> "L'amour pour principe et l'ordre pour base; le progres pour but" >>> (A.Comte) >>> >>> >> >> >> > >