hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Hügen <achim.hue...@gmx.de>
Subject Re: Get the Registry?
Date Mon, 24 Jul 2006 12:38:19 GMT
Ok, what is coming now is a really dirty hack but might work:

 registry = (RegistryInfrastructure ) 
ServiceSerializationHelper.getServiceSerializationSupport();

It's not the Registry interface you get but RegistryInfrastructure which 
is as good as the
other one because the methods you need are defined there too.

Achim

Martin Strand schrieb:
> I need registry.setupThread() and registry.cleanupThread().
> I've got a service with a listener that is invoked from a thread 
> outside Hivemind, something like this:
>
> public class MyService()
> {
>   private Registry registry;
>
>   public MyService()
>   {
>     registry = getThisThreadsRegistry();
>     OutsideHivemind.registerListener(this);
>   }
>
>   public void invokeListener()
>   {
>     registry.setupThread();
>
>     // Do lots of Hivemind stuff...
>
>     registry.cleanupThread();
>   }
> }
>
> On Mon, 24 Jul 2006 07:45:19 +0200, Achim Hügen <achim.huegen@gmx.de> 
> wrote:
>
>> Which part of the registry api do you need?
>>
>> Achim
>>
>> Am Sun, 23 Jul 2006 04:30:02 +0200 schrieb Martin Strand 
>> <martin.strand@entcap.se>:
>>
>>> Yeah, that would be a simple solution but the problem is that my 
>>> code doesn't control creation of the Registry. :(
>>> It's (sort of) a plugin so I want it to work in any Hivemind 
>>> environment.
>>>
>>> Martin
>>>
>>> On Sun, 23 Jul 2006 03:54:13 +0200, Jason L. Buberel 
>>> <jason@buberel.org> wrote:
>>>
>>>> I use a class named Init with a static method on it to get my 
>>>> singleton
>>>> registry.
>>>>
>>>> See the attached file.
>>>>
>>>>
>>>>
>>>> On Sun, 2006-07-23 at 01:42 +0200, Martin Strand wrote:
>>>>> Is it possible to get a reference to the current thread's 
>>>>> Registry? This
>>>>> old post suggests it's not possible (yet), is that correct?
>>>>> http://mail-archives.apache.org/mod_mbox/jakarta-hivemind-user/200509.mbox/%3c200509011707.j81H7rk1014963@carmanconsulting.com%3e

>>>>>
>>>>>
>>>>> Martin
>
>


Mime
View raw message