hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David J. M. Karlsen" <da...@davidkarlsen.com>
Subject Service models
Date Thu, 07 Jul 2005 14:58:45 GMT
Hi list!

I use XPath caches in my application (it fills compiled XPath object in 
a reference map as they are needed, and fetces from the map if they 
already exist).

As the XPath-expressions are different for different "client-classes" I 
want to keep the same cache connected to the same type of 
"client-class". (To utilize several small caches and high hit-ratio's in 
them).

If I use HiveMind to inject the cache as a pooled service, the same 
cache will be injected into different "client-classes".

If I use a singleton model for the cache-service the same instance will 
be used by different client-classes. The app is also multithreaded - so 
the same cacheentry should not be accessed by several clients concurrently.

The clientclasses are also services (pooled) - so once the cache is set 
on a service it will be reused until the pooled service is destroyed 
(just what I want).


What I basically need is a service which creates objects and never 
reuses them in any way. (Object-factory). Of course I could just 
instanciate the cache myself in the service's constructors; but I want 
to apply interceptors to the cacheclass - thus it has to be declared as 
a service (to get the interceptors applied) (?) - or is it possible to 
utilize an objectfactorty which adds interceptors?

I am using HiveMind 1.0

Hope I made myself understood.

Kind regards,

David


---------------------------------------------------------------------
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