Hi,


how much getService(..) coast and does hivemind cashes these calls
i mean should i cashe by myself service getter:

private ISomeInterface someservice;

public ISomeInterface getSomeservice(){
    if (someservice==null)
someservice=registry.getService(ISomeInterface.class);
    return someservice;
}

or its redundant and hivemind do these work for me?

A getService is pretty cheap, it's just a lookup in a map.


and the other question:
these is web application so on each request i have to perform
registry.setupThread();
and object with service getter stored in session.. so "cashed" service
instance would be old one

So im askng is it bad for threaded environment (and i should somehow clean my "cash" to perform getService on each request) or its ok and all be fine


I don't expect any problems with the cached service instances.
Your objects are referencing proxies only which handle thread related
issues in the case of a pooled or threaded service model.

Achim




Reply via email to