hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Aderhold <a...@cyclopsrevolution.com>
Subject Re: Getting the Registry everywhere, everytime
Date Mon, 11 Jul 2005 18:09:03 GMT
Hey Achim,

i don't have access to the HttpServletRequest (well, that's not the  
whole truth, I can access it but it's not exactly clean). I'm just  
wondering how this is done in non-web threaded applications where you  
can't push the registry on to the threads, but the threads have to  
pull it?

So i guess there is no other way than subclassing the servletfilter  
and put a reference of the registry in a static context of a utility  
class there.

would be nice to have HM supporting that kind of static lookup  
anyways...

Thanks
-andi


On Jul 11, 2005, at 19:48 Uhr, Achim Hügen wrote:

> The hivemind filter puts the registry in the request.
> You can access it by calling the static method
> HiveMindFilter#getRegistry(javax.servlet.http.HttpServletRequest).
>
> Achim
>
>
> Am Mon, 11 Jul 2005 19:39:48 +0200 schrieb Andreas Aderhold  
> <andi@cyclopsrevolution.com>:
>
>
>> Hi,
>>
>> I'm pretty new to HiveMind and setup a some services today  
>> (basically  following the article on tss) using hibernate +  
>> interceptors. I like  it very much, it's simple and easy.  
>> Everything works fine on  commandline. Now i want to access the  
>> services from a web-framework  and registered the filter provided  
>> by hivemind in the web.xml. so far  so good.
>>
>> but how do i obtain the registry from inside my webapp?
>>
>> in spring i could just get the application context by a static   
>> lookup. i found nothing similar in HiveMind. Using RegistryBuilder  
>> is  way to expensive (builds up everything on each request, uahh).  
>> I only  need the registry build exactly one time (at deploy) and  
>> shutdown on  un-deploy.
>>
>> I excpected to find something static like HiveMind.getRegistry()  
>> to  obtain a reference to the built up registry or even   
>> HiveMind.getService(..). But i can't find anything like that. I  
>> know  that the filter puts the registry on the request context,  
>> but I don't  have access to it.
>>
>> hints or directions where to look?
>>
>> thanks
>> andi
>>
>>
>> PS: why did SDL have to go?? i find it much more readable than  
>> xml :/  any chance for a comeback?
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: hivemind-user- 
>> help@jakarta.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>
>


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