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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to