Hi
in a plain felix environment I can use @Deactivate to define a method which is called on the deactivation of the service.
How can I achive this for a JIRA component?
Regards
Steve
Community moderators have prevented the ability to post new answers.
There are a few options, some better than others depending on what you are trying to do. Be aware that when any of these things happen, part of your plugin may already be gone, so it isn't always safe to communicate outside the module that is shutting down.
DisposableBean
(from Spring) and use the destroy
method.EventListener
for PluginModuleDisabledEvent
.LifecycleAware
from SAL will get an onStop()
method.There are probably others, but those are the ones I generally use, and for most purposes I find DisposableBean
to be easiest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.