registryDidShutdown() Called Twice on Bean Service

Description

Environment

None

Activity

Show:
JohanL
August 3, 2009, 9:57 AM

Looks like this holds for service interfaces extending the RegistryShutdownListener interface as well

A couple of issues noted:

  • If the bean implements RegistryShutdownListener, the lifecycle method will be part of the synthesized interface & in theory should be part of the services 'offered' by the bean

    • Implies that registryDidShutdown could be called on the bean itself

    • Means the outer proxy produced by service model might have to handle being called directly (i.e. passing the call to the bean)

  • Shutdown can be prevented by having the service model 'correctly' overriding the registryDidShutdown method - but this might have to take into consideration that the method might not be called by Gaderian

Suggestions:

  • Simply override the registryDidShutdown method and not calling the bean if called directly. ShutdownCoordinator will call the 'core' instance no matter

  • Document that implementing/extending the RegistryShutdownListener will result in the proxy being shutdown and no call to the bean/service will happen

JohanL
August 7, 2009, 8:30 PM

Implemented as suggested

Assignee

JohanL

Reporter

JohanL

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure