GigaSpaces XAP 7.1 API

org.openspaces.core.space.mode
Class RefreshSpaceModeContextLoader

java.lang.Object
  extended by org.openspaces.core.space.mode.SpaceModeContextLoader
      extended by org.openspaces.core.space.mode.RefreshSpaceModeContextLoader
All Implemented Interfaces:
EventListener, ClusterInfoAware, BeanLevelPropertiesAware, RefreshableContextLoader, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, 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
RefreshSpaceModeContextLoader()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void closeApplicationContext()
          Closes the application context.
protected  void loadApplicationContext()
          Loads the application context and adding specific bean factory and bean post processors.
 void refresh()
           
 
Methods inherited from class org.openspaces.core.space.mode.SpaceModeContextLoader
destroy, onApplicationEvent, publishEvent, setActiveWhenPrimary, setApplicationContext, setBeanLevelProperties, setBeanName, setClusterInfo, setGigaSpace, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefreshSpaceModeContextLoader

public RefreshSpaceModeContextLoader()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Overrides:
afterPropertiesSet in class SpaceModeContextLoader
Throws:
Exception

loadApplicationContext

protected void loadApplicationContext()
                               throws Exception
Description copied from class: SpaceModeContextLoader
Loads the application context and adding specific bean factory and bean post processors. Won't load an application context if one is already defined.

Overrides:
loadApplicationContext in class SpaceModeContextLoader
Throws:
Exception

closeApplicationContext

protected void closeApplicationContext()
Description copied from class: SpaceModeContextLoader
Closes the application context. Won't close that application context if one is not defined.

Overrides:
closeApplicationContext in class SpaceModeContextLoader

refresh

public void refresh()
             throws Exception
Specified by:
refresh in interface RefreshableContextLoader
Throws:
Exception

GigaSpaces XAP 7.1 API

Copyright © GigaSpaces.