Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 96284 invoked from network); 7 Dec 2009 23:12:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Dec 2009 23:12:03 -0000 Received: (qmail 60178 invoked by uid 500); 7 Dec 2009 23:12:02 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 60110 invoked by uid 500); 7 Dec 2009 23:12:02 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 60100 invoked by uid 99); 7 Dec 2009 23:12:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Dec 2009 23:12:02 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of musachy@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pw0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Dec 2009 23:11:59 +0000 Received: by pwi6 with SMTP id 6so4389356pwi.27 for ; Mon, 07 Dec 2009 15:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2XdzYHq/Z4GtxXTtJALZRhrUShb7y7Q1rdKkxieAt2I=; b=jmO+PEAIkaBmoVf+2R1V3ybujPWHfmtnQa+clkTTdH6mHgoOaecyonqUHyp0Rlvddf p93WvPCwoORRgYuYqVfNe0NabQwU+nDdLJq1hXZqc4cHb/p2tdX0wBIWFZRMuvNbyIRy R+AgnYKwcbGGh/shMt//u0NE99cAnyUEI8RsU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VpCqaOC+SV3V6VqA7JvVKdFrKiIzUz0VR5twZNoGyD5GkHF2r4rZjl+2LXCwn13aKK +zehXrdzAfv1snwuYtIh+mjfjjCfUsKYKH9C1orEeQOW45y8n1UmUF57qsZd1e11+C70 /tk18jaWhMt/eWdcueQKzMkGVwgB/B0tZus3U= MIME-Version: 1.0 Received: by 10.114.189.37 with SMTP id m37mr13335774waf.67.1260227499285; Mon, 07 Dec 2009 15:11:39 -0800 (PST) In-Reply-To: <436d9a250912071455l2822ae17i2af747b08b1664cb@mail.gmail.com> References: <17972874-AF2F-4703-84F6-F531FECCEFB4@pontarelli.com> <4B1D605B.8030307@it-neering.net> <436d9a250912071455l2822ae17i2af747b08b1664cb@mail.gmail.com> Date: Mon, 7 Dec 2009 15:11:39 -0800 Message-ID: Subject: Re: struts 2.2 and guice From: Musachy Barroso To: Struts Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable We could have just one container (no double object factory), and probably the same one could be used for s2 and the app (still to be seen if feasible or not), get any new features that get added or are in jsr 330, and we don't have maintain our own implementation when there is a lib that already does it, like we usually do. Also, guice 2 main jar is 651 kbs, so I don't see much of a problem there. musachy On Mon, Dec 7, 2009 at 2:55 PM, Don Brown wrote: > Late to the party, but I'm not clear why you would want to use Guice 2 > instead of our own. =A0Is there some feature we need that Guice 2 has? > If not, we are basically sucking in a pretty significantly sized > library for no apparent reason. =A0I tried to use Struts 2 on a project > here, and was a bit shocked at the size of the jar nowadays...seems we > went a bit crazy with the shading. =A0I'd generally advise against > adding more bulk without obvious gains. > > Don > > On Tue, Dec 8, 2009 at 7:09 AM, Musachy Barroso wrote= : >> I don't know about dropping Object factory, in this case it would just >> delegate to the jsr 330 implementation. But getting rid of the double >> object factory problem would be very nice. >> >> On Mon, Dec 7, 2009 at 12:06 PM, Rene Gielen wro= te: >>> I'm a huge fan of moving to Guice 2 internally, although I'm not sure i= f >>> we would want to drop the ObjectFactory abstraction for plain pluggable >>> JSR330 DI - as this would imply that Struts 2.2 would not integrate any >>> more against Spring 2.x, Guice 1, Plexus, PicoContainer and what not. D= o >>> we really expect every Struts2 user and his company will be able to mov= e >>> to JSR330 compliant DI within the next months? I doubt that, and I'd >>> rather not sacrifice our DI abstraction for that reason... >>> >>> - Rene >>> >>> >>> Musachy Barroso wrote: >>>> I am reading the spec and I am rather impressed, I thought it would be >>>> a simple thing but it is really comprehensive. I doubt we will have a >>>> use case that won't be covered there. >>>> >>>> musachy >>>> >>>> On Tue, Dec 1, 2009 at 10:49 AM, Musachy Barroso w= rote: >>>>> It is good that you brought this up, because the double object factor= y >>>>> is annoying and creates a lot of unexpected situations(problems with >>>>> class reloading and OSGi). Having just one container would make it >>>>> easier for everybody, users and s2 developers, if it can be pulled >>>>> off. >>>>> >>>>> This kind of change could be too big for a 2.x release I think >>>>> >>>>> musachy >>>>> >>>>> On Tue, Dec 1, 2009 at 10:44 AM, Brian Pontarelli wrote: >>>>>> We could probably make a list and verify. I think the API should be = pretty comprehensive about a lot of those things. >>>>>> >>>>>> -bp >>>>>> >>>>>> >>>>>> On Dec 1, 2009, at 11:42 AM, Musachy Barroso wrote: >>>>>> >>>>>>> ah I see what you mean. yes that would be a good idea, I think that >>>>>>> would work as long as all the containers have what we need, which I= am >>>>>>> not sure if it is in the spec or not (havent read it), like: >>>>>>> >>>>>>> * create/inject objects and statics (duh) >>>>>>> * lookup all implementation by type >>>>>>> >>>>>>> that's all I can think off the top of my head. >>>>>>> >>>>>>> musachy >>>>>>> >>>>>>> On Tue, Dec 1, 2009 at 10:38 AM, Brian Pontarelli wrote: >>>>>>>> I was actually talking about expanding it out like Chris mentioned= . I don't see any reason why those who want to use the container that Strut= s is using shouldn't be able to. Since the annotations and APIs will be sta= ndard across Guice and Spring with the JSR, it seems like it would be possi= ble to allow the application and framework to use the same DI container, ju= st different Injectors. >>>>>>>> >>>>>>>> The default could be Guice but allow Spring to be pluggable (or ev= en discoverable). As long as the internals of Struts are compliant, it shou= ld work fine. This also provides the benefit of configuration reduction in = web.xml and a more comprehensive solution. It would also get Struts out of = the business of building objects and requiring additional configuration and= plugins for different DI containers. I would guess it would clean up the d= ouble ObjectFactory issues as well. >>>>>>>> >>>>>>>> -bp >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Dec 1, 2009, at 11:31 AM, Musachy Barroso wrote: >>>>>>>> >>>>>>>>> this is not related to the application itself, you can still use = any >>>>>>>>> IoC you want. This is for the IoC that is used internally to wire >>>>>>>>> struts internals together, which at the moment is an old version = of >>>>>>>>> guice which is in xwork. >>>>>>>>> >>>>>>>>> On Tue, Dec 1, 2009 at 10:28 AM, Chris Pratt wrote: >>>>>>>>>> I wouldn't have a problem with it as long as I can still swap in= my trusty >>>>>>>>>> Spring IoC container, I can't see my team moving away from it an= y time soon, >>>>>>>>>> but I still want to try to stay as current as possible on Struts= . >>>>>>>>>> =A0(*Chris*) >>>>>>>>>> >>>>>>>>>> On Tue, Dec 1, 2009 at 10:21 AM, Brian Pontarelli wrote: >>>>>>>>>> >>>>>>>>>>> They'll be part of the Guice distribution and under ASLv2 since= Guice uses >>>>>>>>>>> that. >>>>>>>>>>> >>>>>>>>>>> The real question is how to setup the Injector's. I tend to thi= nk this >>>>>>>>>>> layout would be best: >>>>>>>>>>> >>>>>>>>>>> =A0 =A0 =A0 =A0Base >>>>>>>>>>> =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| >>>>>>>>>>> Struts =A0 =A0 =A0 =A0App >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> The Base injector will contain the JEE objects (request, respon= se, etc.) >>>>>>>>>>> and any Struts objects that can be used by the application. The= Struts >>>>>>>>>>> injector will contain all of the private objects that should no= t be >>>>>>>>>>> accessible to the application. The App injector will contain al= l the >>>>>>>>>>> application objects like Actions and such. >>>>>>>>>>> >>>>>>>>>>> -bp >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Dec 1, 2009, at 10:59 AM, Musachy Barroso wrote: >>>>>>>>>>> >>>>>>>>>>>> good point Brian, that has came up also. I have a couple of co= ncerns >>>>>>>>>>>> about it, like what is the status of the jsr and will the API >>>>>>>>>>>> (annotations) will be under a decent (read ASF compatible lice= nse) >>>>>>>>>>>> license and in maven central? which is usually a pain point wh= en it >>>>>>>>>>>> comes to Sun APIs. >>>>>>>>>>>> >>>>>>>>>>>> musachy >>>>>>>>>>>> >>>>>>>>>>>> On Tue, Dec 1, 2009 at 9:54 AM, Brian Pontarelli >>>>>>>>>>> wrote: >>>>>>>>>>>>> I'd suggest using Guice trunk and the JSR annotations rather = than the >>>>>>>>>>> Guice annotations. I'd also make the injector pluggable so that= people can >>>>>>>>>>> plug in Spring/Guice/etc easily. >>>>>>>>>>>>> -bp >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Dec 1, 2009, at 10:33 AM, Musachy Barroso wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> I have talked to a couple of people before and everyone seem= s to agree >>>>>>>>>>>>>> that using guice instead of our internal IoC container (guic= e pre 1.0 >>>>>>>>>>>>>> I think), would be a good idea. I don't have any experience = with guice >>>>>>>>>>>>>> 2.0, but looking at the docs it seems like porting our stuff= would not >>>>>>>>>>>>>> be that hard. Less code to maintain, and we get more >>>>>>>>>>>>>> features/improvements. If we go with this idea, guice would = be shaded >>>>>>>>>>>>>> into xwork to avoid classpath conflicts. >>>>>>>>>>>>>> >>>>>>>>>>>>>> what do you think? >>>>>>>>>>>>>> >>>>>>>>>>>>>> musachy >>>>>>>>>>>>>> >>>>>>>>>>>>>> ------------------------------------------------------------= --------- >>>>>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>>>>>>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -------------------------------------------------------------= -------- >>>>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>>>>>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> --------------------------------------------------------------= ------- >>>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>>>>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> ---------------------------------------------------------------= ------ >>>>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>>>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> -----------------------------------------------------------------= ---- >>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>>>>> >>>>>>>> >>>>>>>> ------------------------------------------------------------------= --- >>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>>>> >>>>>>>> >>>>>>> -------------------------------------------------------------------= -- >>>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>>> >>>>>> >>>>>> --------------------------------------------------------------------= - >>>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>>>> For additional commands, e-mail: dev-help@struts.apache.org >>>>>> >>>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>>> For additional commands, e-mail: dev-help@struts.apache.org >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >>> For additional commands, e-mail: dev-help@struts.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org >> For additional commands, e-mail: dev-help@struts.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org > For additional commands, e-mail: dev-help@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org