thanks for comment :)

Achim Hügen wrote:
> 
> 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
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-much-getService-cost--tf2634343.html#a7393972
Sent from the Hivemind - User mailing list archive at Nabble.com.

Reply via email to