hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Marcus.Schu...@bmw.ch>
Subject RE: Pooled BuilderFactory
Date Fri, 29 Jun 2007 06:53:10 GMT
If you need multiple instances of an object per thread, it doesn't fit well with the concept
of a service. Probably, you should just setup an object-factory as a service which vends out
new instances on each call. Very much like the ObjectInstanceObjectProvider, or Tapestry's
ASO-Factories

Marcus

> -----Original Message-----
> From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
> Sent: Thursday, June 28, 2007 6:19 PM
> To: user@hivemind.apache.org
> Subject: Re: Pooled BuilderFactory
> 
> Thanks James,
> 
> But is there a way to get 2 different objects ??
> 
> Stephane
> 
> James Carman a écrit :
> > Two calls within the same thread will return the same instance.  
> > Basically, the pooled model is a threaded model, but the instances 
> > returned are obtained from a pool rather than created from scratch 
> > every time they're bound to the thread.
> >
> >
> >
> > On 6/28/07, *Stephane Decleire* <sdecleire@cariboo-networks.com 
> > <mailto:sdecleire@cariboo-networks.com>> wrote:
> >
> >     Hi,
> >
> >     I don't understand why 2 calls to a BuilderFactory 
> which model is
> >     set to
> >     pooled return the same object.
> >     Isn't it the behavior of singletons ?
> >
> >     Thanks in advance for any explanation.
> >
> >     Stephane
> >
> >
> 

Mime
View raw message