Class CachingWebPanelRendererTracker
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor,org.springframework.beans.factory.DisposableBean
AbstractCachingWebPanelRenderer and invokes
AbstractCachingWebPanelRenderer.destroy() method when the
application context is closed.
The subclasses of AbstractCachingWebPanelRenderer are defined in atlassian-plugin.xml as web-panel-renderer
instead of component. So they are not defined as a bean in the generated
META-INF/spring/atlassian-plugins-components.xml. They are instantiated by the WebPanelRendererModuleDescriptor
invoking the createModule() method of a ModuleFactory, which in a Spring-backed plugin system calls the Spring
IoC container programmatically to instantiate an instance of the given module class and autowire it. Beans created
this way are not defined as part of the Spring application context; thus, when the Spring application context is
closed, the destroy() method of these beans are not called even if they implement the DisposableBean
interface. Therefore, we need to track AbstractCachingWebPanelRenderer programmatically.
- Since:
- v1.3.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()postProcessAfterInitialization(Object bean, String beanName) postProcessBeforeInitialization(Object bean, String beanName)
-
Constructor Details
-
CachingWebPanelRendererTracker
public CachingWebPanelRendererTracker()
-
-
Method Details
-
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessBeforeInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException - Specified by:
postProcessAfterInitializationin interfaceorg.springframework.beans.factory.config.BeanPostProcessor- Throws:
org.springframework.beans.BeansException
-
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-