hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Louet" <slo...@hotmail.com>
Subject Re: Service instanciation
Date Wed, 24 Nov 2004 21:27:09 GMT
Thanks Howard. So I need to create something like a 
PrototypeServiceModelFactory extending  BaseLocatable and implementing 
ServiceModelFactory. Is it correct?


>From: Howard Lewis Ship <hlship@gmail.com>
>Reply-To: Howard Lewis Ship <hlship@gmail.com>
>To: hivemind-user@jakarta.apache.org, slouet@hotmail.com
>Subject: Re: Service instanciation
>Date: Wed, 24 Nov 2004 07:43:26 -0500
>MIME-Version: 1.0
>Received: from mail.apache.org ([209.237.227.199]) by mc6-f10.hotmail.com 
>with Microsoft SMTPSVC(5.0.2195.6713); Wed, 24 Nov 2004 04:45:03 -0800
>Received: (qmail 12127 invoked by uid 500); 24 Nov 2004 12:44:59 -0000
>Received: (qmail 12083 invoked by uid 99); 24 Nov 2004 12:44:59 -0000
>Received: pass (hermes.apache.org: domain of hlship@gmail.com designates 
>64.233.184.199 as permitted sender)
>Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.199)  
>by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 24 Nov 2004 04:44:54 -0800
>Received: by wproxy.gmail.com with SMTP id 69so695391wra        for 
><hivemind-user@jakarta.apache.org>; Wed, 24 Nov 2004 04:44:36 -0800 (PST)
>Received: by 10.54.41.63 with SMTP id o63mr597796wro;        Wed, 24 Nov 
>2004 04:43:27 -0800 (PST)
>Received: by 10.54.31.73 with HTTP; Wed, 24 Nov 2004 04:43:26 -0800 (PST)
>X-Message-Info: JGTYoYF78jFkpV2PQp+8YPopxxuEihLC
>Mailing-List: contact hivemind-user-help@jakarta.apache.org; run by ezmlm
>Precedence: bulk
>list-help: <mailto:hivemind-user-help@jakarta.apache.org>
>list-unsubscribe: <mailto:hivemind-user-unsubscribe@jakarta.apache.org>
>list-post: <mailto:hivemind-user@jakarta.apache.org>
>Delivered-To: mailing list hivemind-user@jakarta.apache.org
>X-ASF-Spam-Status: No, hits=0.0 
>required=10.0tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS
>X-Spam-Check-By: apache.org
>DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;        s=beta; 
>d=gmail.com;        
>h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references;

>        
>b=o4BxoNY2nyO2QxJWgauemP3HIicgAmh5rKeqdr6f0YnOTVS9B8T5Onp7iX6pvmS8QfYZbeqqq3GHA/wBgPrKa1CjqlsMKUv5CHD9WAIjZ6A4jszoz6T8jk8hnyxA8po0mh3X724LPiUrp+JQMi2VsDGBrNcClQV4Obf5CRTE/yc=
>References: 
><B1F6F2DA362BD2118EA30008C75618E30A643E45@eugexc01ntms.eugalg.hboc.com> 
><BAY2-F102F4815C235DFCD867630DBB80@phx.gbl>
>X-Virus-Checked: Checked
>Return-Path: hivemind-user-return-487-slouet=hotmail.com@jakarta.apache.org
>X-OriginalArrivalTime: 24 Nov 2004 12:45:05.0340 (UTC) 
>FILETIME=[6C26FFC0:01C4D223]
>
>Or build your own prototype service factory!  It something that will
>be added in 1.1 (if someone adds a JIRA issue, hint) but can be added
>by anyone even to 1.0 ... one of the things I love about HiveMind!
>
>
>On Wed, 24 Nov 2004 10:13:55 +0100, Stephane Louet <slouet@hotmail.com> 
>wrote:
> > Well, I guess I'll go back to my homegrown POJO factory then :-(
> >
> > >From: "Hensley, Richard" <Richard.Hensley@McKesson.com>
> > >To: hivemind-user@jakarta.apache.org,slouet@hotmail.com
> > >Subject: RE: Service instanciation
> > >Date: Tue, 23 Nov 2004 16:37:52 -0500
> > >MIME-Version: 1.0
> > >Received: from mail1.mckhboc.com ([208.147.67.98]) by 
>mc7-f34.hotmail.com
> > >with Microsoft SMTPSVC(5.0.2195.6824); Tue, 23 Nov 2004 13:44:57 -0800
> > >Received: from 139.177.6.216 by mail1.mckhboc.com with ESMTP (Outbound
> > >Mail1 SMTP Relay (MMS v5.6.1)); Tue, 23 Nov 2004 13:38:05 -0800
> > >Received: by smtpout.hboc.com with Internet Mail Service (5.5.2657.72) 
>id
> > ><WLSTW2KD>; Tue, 23 Nov 2004 16:36:42 -0500
> > >Received: from atlexc91nthub.hboc.com (ims2.mckesson.com 
>[139.177.6.115] )
> > >by atlexcsmtpa.hboc.com with SMTP (Microsoft Exchange Internet Mail 
>Service
> > >Version 5.5.2657.72) id WLSTW2J5; Tue, 23 Nov 2004 16:36:37 -0500
> > >Received: by ims2.mckesson.com with Internet Mail Service (5.5.2657.72) 
>id
> > ><XNWLJQGJ>; Tue, 23 Nov 2004 16:39:48 -0500
> > >X-Message-Info: JGTYoYF78jG1z8iUJ+kGbC3GP2QyxI2N
> > >X-Server-Uuid: E618535E-AE39-475D-9091-BC1AF22CB2F2
> > >X-Mailer: Internet Mail Service (5.5.2657.72)
> > >X-Mailer: Internet Mail Service (5.5.2657.72)
> > >X-WSS-ID: 6DBD723723C3091941-01-01
> > >Return-Path: Richard.Hensley@McKesson.com
> > >X-OriginalArrivalTime: 23 Nov 2004 21:44:57.0093 (UTC)
> > >FILETIME=[ACBA8350:01C4D1A5]
> >
> >
> > >
> > >Stefano,
> > >
> > >Threaded means that you get a new instance for each thread, not each 
>time
> > >you call getService(). I'm not sure how to configure HiveMind to do 
>what
> > >you
> > >want.
> > >
> > >Richard
> > >
> > >-----Original Message-----
> > >From: Stephane Louet [mailto:slouet@hotmail.com]
> > >Sent: Tuesday, November 23, 2004 1:26 PM
> > >To: hivemind-user@jakarta.apache.org
> > >Subject: Service instanciation
> > >
> > >I have a newbie question for you guys. I have declared a service point 
>that
> > >looks like below:
> > >
> > ><service-point id="AttrDef" interface="mypackage.attr.AttrDef">
> > >       <invoke-factory model="threaded">
> > >         <construct class="mypackage.attr.impl.AttrDefImpl"/>
> > >       </invoke-factory>
> > >       <interceptor service-id="hivemind.LoggingInterceptor"/>
> > ></service-point>
> > >
> > >I have used "threaded" because I want a new instance of AttrDefImpl 
>every
> > >time I do a .getService( AttrDef.class ). But if I do something like:
> > >
> > >AttrDef attrDef1 = (AttrDef)registry.getService( AttrDef.class );
> > >attrDef1.setName( "1" );
> > >
> > >AttrDef attrDef2 = (AttrDef)registry.getService( AttrDef.class );
> > >attrDef2.setName( "2" );
> > >
> > >System.out.println( "attrDef1=" + attrDef1.getName() + ", attrDef2=" +
> > >attrDef2.getName() );
> > >
> > >I basically get the following attrDef1=2, attrDef2=2. It looks like
> > >.getService() returns the same element (a singleton?) every time. I 
>believe
> > >I am missing something here ;-)
> > >
> > >Any help appreciated,
> > >Stefano
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
>
>
>--
>Howard M. Lewis Ship
>Independent J2EE / Open-Source Java Consultant
>Creator, Jakarta Tapestry
>Creator, Jakarta HiveMind
>http://howardlewisship.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message