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:[EMAIL PROTECTED] > Sent: Thursday, June 28, 2007 6:19 PM > To: [email protected] > 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* <[EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]>> 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 > > > > >
