Nice hack, Achim - backdoor access to RegistryInfrastructure. :)
Yeah, it is a dirty hack but it actually seems to work so it will have to
do for now. Thanks.
Does anyone know if there are any plans to fix this so we can access the
Registry without hacks?
Martin
On Mon, 24 Jul 2006 14:38:19 +0200, Achim Hügen <[EMAIL PROTECTED]>
wrote:
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 <[EMAIL PROTECTED]>
wrote:
Which part of the registry api do you need?
Achim
Am Sun, 23 Jul 2006 04:30:02 +0200 schrieb Martin Strand
<[EMAIL PROTECTED]>:
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
<[EMAIL PROTECTED]> 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/[EMAIL PROTECTED]
Martin