May 8th, 2012, 07:39 AM
Performing pre close actions
I want one of my beans to persist certain data in the cache if application with the bean closes. My bean implements Lifecycle interface. Unfortunately when the stop method is called the cache is already close. I get an exception:
org.springframework.data.gemfire.GemfireCancellati onException: The cache is closed.; nested exception is com.gemstone.gemfire.cache.CacheClosedException: The cache is closed.
I tried to use "depends-on" property on my bean and point it to gemfire-cache bean/template bean/region bean. It didn't do anything it seems as I got the same exception about cache being close. Is it possible to write some data into the cache pre close? Can you advise, please?
I'm using spring-gemfire 1.1.0