Package org.openspaces.core.space.mode
Class RefreshSpaceModeContextLoader
java.lang.Object
org.openspaces.core.space.mode.SpaceModeContextLoader
org.openspaces.core.space.mode.RefreshSpaceModeContextLoader
- All Implemented Interfaces:
EventListener,ClusterInfoAware,BeanLevelPropertiesAware,RefreshableContextLoader,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class RefreshSpaceModeContextLoader
extends SpaceModeContextLoader
implements RefreshableContextLoader
Extension to SpaceModeContextLoader allowing for the context loader to be refreshable and load
new code. Only works with the Service Grid or the Standalone container.
If a refresh is executed on this context loader, will close the application context of this context and load it again using a new class loader allowing for new code definitions to be applied.
- Author:
- kimchy
-
Field Summary
Fields inherited from class org.openspaces.core.space.mode.SpaceModeContextLoader
applicationContext, beanName, logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidCloses the application context.protected voidLoads the application context and adding specific bean factory and bean post processors.voidrefresh()Methods inherited from class org.openspaces.core.space.mode.SpaceModeContextLoader
destroy, onApplicationEvent, publishEvent, setActiveWhenPrimary, setApplicationContext, setBeanLevelProperties, setBeanName, setClusterInfo, setGigaSpace, setLocationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
-
Constructor Details
-
RefreshSpaceModeContextLoader
public RefreshSpaceModeContextLoader()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classSpaceModeContextLoader- Throws:
Exception
-
loadApplicationContext
Description copied from class:SpaceModeContextLoaderLoads the application context and adding specific bean factory and bean post processors. Won't load an application context if one is already defined.- Overrides:
loadApplicationContextin classSpaceModeContextLoader- Throws:
Exception
-
closeApplicationContext
protected void closeApplicationContext()Description copied from class:SpaceModeContextLoaderCloses the application context. Won't close that application context if one is not defined.- Overrides:
closeApplicationContextin classSpaceModeContextLoader
-
refresh
- Specified by:
refreshin interfaceRefreshableContextLoader- Throws:
Exception
-