hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Burnley <>
Subject Re: ServicePointImpl.getService caching service reference
Date Thu, 29 Sep 2005 10:10:11 GMT
No, its not what I need. Basically, I have a definition of a service that
needs to be distinct instances of a service that potentially could have some
additional configuration applied to it ( like setting its name or
something).(these are supplied by a contribution).

I am wondering if a service projection or something might be the thing I
need, but I've not explored that aspect of hivemind yet.

I.e. create a new service based on an existing service but with some
additional config.

On 9/29/05, Knut Wannheden <> wrote:
> Chris,
> The service implementation returned by the ServicePoint object is
> indeed cached. But it's up to the ServiceModel object to supply it.
> And often (for all models but "primitive") this won't be the actual
> core service implementation (CSI) but rather a proxy object, which
> will lazily create the CSI and delegate to it.
> That being said I don't think you can implement "template" (usually
> refered to as "prototype" in Spring) as you see it as a service model.
> What you could quite easily do is implement a service model which
> returns a new CSI for every method invocation on the service. But
> that's not what you want, is it?
> Take a look at the HiveMind BeanFactory:
> If you need more advanced dependency injection on the created objects
> you will have to roll your own. Take a look at this message for some
> ideas:
> We're looking into implementing reusable code more advanced dependency
> injection, a la BuilderFactory, in HiveMind 1.2.
> HTH,
> --knut
> On 9/29/05, Chris Burnley <> wrote:
> > Hi, I'd like to query why ServicePointImpl.getService method caches the
> > service object.
> >
> > I'm implementing a "template" service model which always creates new
> > instances ( perhaps I'm going about it the wrong way), which of course
> > doesn't work because the the service is cached in ServicePointImpl. I
> > realise that in theory services should be usually mostly stateless and
> > interchangeable, but that is contradicted by the existence of the thread
> > service model.
> >
> > Shouldn't the reference returned be the responsibility of ServiceModel ?
> >
> > regards,
> >
> > Chris Burnley
> >

View raw message