hivemind-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Dotte (JIRA)" <>
Subject [jira] Created: (HIVEMIND-191) registryDidShutdown() Called Twice on Bean Service
Date Wed, 01 Nov 2006 15:25:16 GMT
registryDidShutdown() Called Twice on Bean Service

                 Key: HIVEMIND-191
             Project: HiveMind
          Issue Type: Bug
          Components: framework
    Affects Versions: 1.1.1
         Environment: Win XP, Eclipse 3.2.1
            Reporter: Ben Dotte

When a bean service implements RegistryShutdownListener, the registryDidShutdown() method
gets called twice. This does not happen if the service implements an interface and gets wired
up through it. Here is a simple example that demonstrates the problem:

in testmodule.xml:
<service-point id="TestService" interface="TestService">
		<construct class="TestService"/>

public static void main(String[] args)
	RegistryBuilder builder = new RegistryBuilder();
	builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(new DefaultClassResolver(),
	Registry registry = builder.constructRegistry(Locale.getDefault());	
	((TestService) registry.getService(TestService.class)).run();	

public void run() { }
public void registryDidShutdown()
	System.out.println("registryDidShutdown called");

registryDidShutdown called
registryDidShutdown called

I tested this with an interface, ITestService, and "registryDidShutdown called" only got printed

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message