[ http://issues.apache.org/jira/browse/HIVEMIND-179?page=comments#action_12428449 ] Henrik Vendelbo commented on HIVEMIND-179: ------------------------------------------
Or you could support an interface like Spring's ApplicationContextAware. I don't like making objects depend on the container, but by definition of the problem you make it dependent anyway. > Provide access to the Registry > ------------------------------ > > Key: HIVEMIND-179 > URL: http://issues.apache.org/jira/browse/HIVEMIND-179 > Project: HiveMind > Issue Type: New Feature > Components: framework > Reporter: Martin Strand > > There is currently no way for a service to access its own Registry. > This would be useful sometimes, for example if you've got a listener that is > invoked from a non-Hivemind thread: > public class MyService() > { > private Registry registry; > public MyService() > { > registry = getRegistry(); // <-- Need this > OutsideHivemind.registerListener(this); > } > public void invokeListener() > { > registry.setupThread(); > // Use some Hivemind services... > registry.cleanupThread(); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
