You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apache Geode prematurely closes all cache objects and pulls the rug out from any application, framework and tool's feet.
Geode registers a JVM Shutdown Hook that closes all cache objects (e.g. Regions) before a framework, such as Spring, has an opportunity to perform resource clean up, such as in Spring Container Lifecycle callbacks, such as DisposableBean. This is potentially dangerous and definitely naive on Geode's part.
Fortunately, Geode uses a JVM System Property to control the registration of the JVM Shutdown Hook, and prevent the hook from prematurely closing the cache so that application/framework/tools have an opportunity to perform or resource release and clean up tasks that Geode unaware of.
The text was updated successfully, but these errors were encountered:
Unfortunately, this (dumb) block of code requires Spring to somehow intercept or set the JVM System Property before Geode's InternalDistributedSystem class is loaded!
Currently exploring the feasibility of Spring Boot'sAutoConfigureBefore annotation(s)...
This will need to be in something like a Spring FrameworkBeanFactoryPostProcessor, or more appropriately, a Spring BootEnvironmentPostProcessor since this (Geode) JVM System Property needs to be set early (before a class load on InternalDistributedSystem which happens when the cache is created)!
jxblum
added a commit
to jxblum/spring-boot-data-geode
that referenced
this issue
Jun 8, 2020
Apache Geode prematurely closes all cache objects and pulls the rug out from any application, framework and tool's feet.
Geode registers a JVM Shutdown Hook that closes all cache objects (e.g. Regions) before a framework, such as Spring, has an opportunity to perform resource clean up, such as in Spring Container Lifecycle callbacks, such as
DisposableBean
. This is potentially dangerous and definitely naive on Geode's part.Fortunately, Geode uses a JVM System Property to control the registration of the JVM Shutdown Hook, and prevent the hook from prematurely closing the cache so that application/framework/tools have an opportunity to perform or resource release and clean up tasks that Geode unaware of.
The text was updated successfully, but these errors were encountered: