Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 39143 invoked from network); 2 Oct 2003 12:38:05 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Oct 2003 12:38:05 -0000 Received: (qmail 61845 invoked by uid 500); 2 Oct 2003 12:37:58 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 61812 invoked by uid 500); 2 Oct 2003 12:37:58 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 61797 invoked from network); 2 Oct 2003 12:37:57 -0000 Received: from unknown (HELO rwcrmhc11.comcast.net) (204.127.198.35) by daedalus.apache.org with SMTP; 2 Oct 2003 12:37:57 -0000 Received: from almightybeast (h0010b50ed00a.ne.client2.attbi.com[24.128.112.68]) by comcast.net (rwcrmhc11) with SMTP id <2003100212375801300ab26ce> (Authid: hlship); Thu, 2 Oct 2003 12:37:58 +0000 From: "Howard M. Lewis Ship" To: "'Jakarta Commons Developers List'" Subject: RE: [HiveMind] extend BuildFactory to use static fields/methods Date: Thu, 2 Oct 2003 08:37:45 -0400 Message-ID: <01af01c388e1$fbbaac40$6501a8c0@ALMIGHTYBEAST> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This looks pretty darn good. Just a few thoughts/observations: 1) Could we just merge ConstructorFactory into BuilderFactory, to provide both sets of options (using constructors, then optionally setting properties). 2) Could we use http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/ConstructorUtils.html to access the constructor (this applies to elsewhere in the framework). Method public static Object invokeConstructor(Class klass, Object[] args) seems to do the trick, and I will be changing other code to start using this. 3) The exception thrown on line 133 should be more descriptive, come from HiveMind.properties, and include the correct Location. 4) Need an update to framework/xdoc/BuilderFactory.xml to describe new features (once merged into BuilderFactory). 5) For the constructor arguments, would this look better: foo service-id config-id ?? Maybe, maybe not. 6) What if the constructor expects the Log, Messages or service id to be a parameter? Need elements. -- Howard M. Lewis Ship Creator, Tapestry: Java Web Components http://jakarta.apache.org/tapestry http://jakarta.apache.org/commons/sandbox/hivemind/ http://javatapestry.blogspot.com > -----Original Message----- > From: news [mailto:news@sea.gmane.org] On Behalf Of Knut Wannheden > Sent: Wednesday, October 01, 2003 6:56 PM > To: commons-dev@jakarta.apache.org > Subject: Re: [HiveMind] extend BuildFactory to use static > fields/methods > > > Howard, > > I found it was easiest to develop the service as part of the > HiveMind project itself. That way I have all the classpaths > set up and could reuse the test harness, etc. Therefore I now > attach the additions and changes as a patch. If this isn't > convenient for you I will try to separate the code and send > it in a different form. > > --knut > > "Howard M. Lewis Ship" wrote in message > news:018301c38861$4044ecd0$6501a8c0@ALMIGHTYBEAST... > > I do like the idea of mixing the two models; write some tests and > > we'll > see about integrating it > > with hivemind.BuilderFactory. > > > > -- > > Howard M. Lewis Ship > > Creator, Tapestry: Java Web Components > > http://jakarta.apache.org/tapestry > > http://jakarta.apache.org/commons/sandbox/hivemind/ > > http://javatapestry.blogspot.com > > > > > -----Original Message----- > > > From: news [mailto:news@sea.gmane.org] On Behalf Of Knut Wannheden > > > Sent: Wednesday, October 01, 2003 4:57 PM > > > To: commons-dev@jakarta.apache.org > > > Subject: Re: [HiveMind] extend BuildFactory to use static > > > fields/methods > > > > > > > > > I have written a service implementing this strategy, with a minor > > > difference: I didn't add a nested as you proposed, > > > instead the elements are immedeate child elements. This > > > way the service can be used everywhere hivemind.BuilderFactory is > > > used. E.g. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The constructor parameter elements and property elements can be > > > mixed freely, as long as the constructor parameter elements are > > > given in the same order as in the actual constructor. In > this case: > > > int, String. > > > > > > The service supports the following constructor parameter > > > elements: , , , , , > > > , and . > > > > > > If anyone's interested I can supply the source. I just > thought I'd > > > write some more unit tests first... > > > > > > --knut > > > > > > "Christian Essl" wrote in message > > > news:oprwddvegswo6mmv@mail.yahoo.de... > > > > That would be realy helpful. Maybe we could add a > tag > > > > which would include the current BuilderFactory tags and set the > > > > properties after the service is constructed. > > > > > > > > > > > > > > > > > > > > > > > > (etc.) > > > > > > > > > > > > (etc.) > > > > > > > > > > > > > > > > > > > > On Wed, 1 Oct 2003 10:22:52 -0400, Howard M. Lewis Ship > > > > wrote: > > > > > > > > > Maybe "ConstructorFactory"? Something like: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > (etc.) > > > > > > > > > > > > > > > The elements inside the element are the > parameters > > > > > to the constructor. > > > > > > > > > > I'll be setting up a HiveMind:Contrib subproject shortly. We > > > > > can start putting stuff in there and then migrate it up to > > > > > library or framework if it proves to be popular > > > and > > > > > essential. > > > > > > > > > > -- > > > > > Howard M. Lewis Ship > > > > > Creator, Tapestry: Java Web Components > > > > > http://jakarta.apache.org/tapestry > > > > > http://jakarta.apache.org/commons/sandbox/hivemind/ > > > > > http://javatapestry.blogspot.com > > > > > > > > > >> -----Original Message----- > > > > >> From: news [mailto:news@sea.gmane.org] On Behalf Of Knut > > > Wannheden > > > > >> Sent: Wednesday, October 01, 2003 10:18 AM > > > > >> To: commons-dev@jakarta.apache.org > > > > >> Subject: Re: [HiveMind] extend BuildFactory to use static > > > fields/methods > > > > >> > > > > >> > > > > >> Then how about a new factory service which lets you > specify the > > > > >> constructor parameters? This is also a very common > IoC pattern > > > > >> AFAIK. > > > > >> > > > > >> --knut > > > > >> > > > > >> "Howard M. Lewis Ship" wrote in message > > > > > news:016001c38821$2e575700$6501a8c0@ALMIGHTYBEAST... > > > > > Outside of Kurt's use case ... wrapping around > machine-generated > > > > > code, I feel that this talk of accessing static > > > singletons is a step > > > > > backwards. > > > > > > > > > > The point of HiveMind is to eliminate those static > variables and > > > > > static inits, do things thread-safe and just-in-time. > > > > > > > > > > -- > > > > > Howard M. Lewis Ship > > > > > Creator, Tapestry: Java Web Components > > > http://jakarta.apache.org/tapestry > > > > > http://jakarta.apache.org/commons/sandbox/hivemind/ > > > > > http://javatapestry.blogspot.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------------- > > > > > - > > > > > To unsubscribe, e-mail: > > > > > commons-dev-unsubscribe@jakarta.apache.org > > > > > For additional commands, e-mail: > > > commons-dev-help@jakarta.apache.org > > > > > > > > > > > > > > > > > > > -------------------------------------------------------------------- > > > > > - > > > > > To unsubscribe, e-mail: > > > > > commons-dev-unsubscribe@jakarta.apache.org > > > > > For additional commands, e-mail: > > > commons-dev-help@jakarta.apache.org > > > > > > > > > > > > > > > > > > > > > -- > > > > Using M2, Opera's revolutionary e-mail client: > > http://www.opera.com/m2/ > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org