Return-Path: Delivered-To: apmail-jakarta-turbine-user-archive@www.apache.org Received: (qmail 48797 invoked from network); 19 Oct 2005 02:21:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Oct 2005 02:21:57 -0000 Received: (qmail 10232 invoked by uid 500); 19 Oct 2005 02:21:55 -0000 Delivered-To: apmail-jakarta-turbine-user-archive@jakarta.apache.org Received: (qmail 10207 invoked by uid 500); 19 Oct 2005 02:21:54 -0000 Mailing-List: contact turbine-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Turbine Users List" Reply-To: "Turbine Users List" Delivered-To: mailing list turbine-user@jakarta.apache.org Received: (qmail 10196 invoked by uid 99); 19 Oct 2005 02:21:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2005 19:21:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [12.4.198.118] (HELO raq01.transitionpoint.com) (12.4.198.118) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2005 19:21:54 -0700 Received: from [192.168.0.9] ([205.160.101.136]) by raq01.transitionpoint.com (8.10.2/8.10.2) with SMTP id j9J1rQa28567 for ; Tue, 18 Oct 2005 21:53:27 -0400 Mime-Version: 1.0 (Apple Message framework v734) In-Reply-To: <434AA429.8030807@it20one.at> References: <434AA429.8030807@it20one.at> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <53CF03B2-A885-4C7D-B8C1-04BD8E105D66@upstate.com> Content-Transfer-Encoding: 7bit From: Eric Pugh Subject: Re: How to integrate Turbine with other service frameworks such as YAAFI, Fortress, Pico, HiveMind, Spring, you name it .... Date: Tue, 18 Oct 2005 22:21:24 -0400 To: "Turbine Users List" X-Mailer: Apple Mail (2.734) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Sigi, Just made my first Turbine 2.4 commit in a while.. Just updating the commons-email to 1.0 (yay!). At any rate, I to lean to #1. Less magic seems to be a good thing. We've talked about some sort of wrapper that would return a service from the first IOC container that found it. If it really is backwards compatible, which I guess it is, then that sounds great... Just as a question, have we checked if anyone is dynamically calling methods on a Service? Like to start it up or anything? If not, then I like #1. Worst came to worse you could always do an instanceof Service check.... Eric On Oct 10, 2005, at 1:26 PM, Siegfried Goeschl wrote: > Hi folks, > > one of the lesser elegant things to do when migrating existing > Turbine services to Fulcrum components is the fact that you have to > know where you get the service from - we are actually violating the > service location transparency which is not utterly unimportant. > > I'm currently working my way through the latest SVN version of > Turbine and I think the following things could work > > 1) TurbineServiceProvider approach > ============================================================ > > *) changing org.apache.turbine.services.ServiceBroker to return > Object instead of Service > *) define a generic TurbineServiceProvider interfaces exposing > methods to lookup and release services > *) change the existing Turbine service lookup to delegate service > lookups (regarding unknown services) to Turbine services > implementing TurbineServiceProvider interface > > +) this would allow transparent service lookup for many IOC > containers to come .... ;-) > +) this approach actually works with Turbine since callers of > Turbine services are usually not casting to Service > +) it is backward compatible for clients casting to the desired > service interface > +) it is rather straightforward to implement > -) it changes the existing ServiceBroker interface and is highly > visible > > 2) Dynamic Proxy approach > ============================================================ > > It is possible to wrap the interfaces of an arbitrary object into > an dynamic proxy which could also expose the existing Service > interface > > +) would not change the current interfaces > -) tricky, overengineered and a little bit fragile (btw, we call > that "edelhack" ... awesome but futile in the long run) > -) in the general case the is no meaningful implementation for many > of the Service methods. > > IMHO 1) would be the way to go but before I invest too much time I > would like to ask for some opinions out there ... any PMCs alive > and kicking are especially welcome ... :-) > > Thanks in advance > > Siegfried Goeschl > > --------------------------------------------------------------------- > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: turbine-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: turbine-user-help@jakarta.apache.org