@ -714,22 +714,20 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
@@ -714,22 +714,20 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
logger.debug("Stopping Spring-managed lifecycle beans before JVM checkpoint");
stopForRestart();
@ -737,11 +735,24 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
@@ -737,11 +735,24 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
logger.trace("Exception from stepToRestore barrier",ex);
}
logger.info("Restarting Spring-managed lifecycle beans after JVM restore");
restartAfterStop();
// Barrier for prevent-shutdown thread not needed anymore
this.barrier=null;
// Unlock barrier for afterRestore to shutdown "prevent-shutdown" thread
try{
this.finishRestore.await();
}
catch(Exceptionex){
logger.trace("Exception from stepToRestore barrier",ex);
}
if(!checkpointOnRefresh){
logger.info("Spring-managed lifecycle restart completed (restored JVM running for "+
@ -749,11 +760,9 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
@@ -749,11 +760,9 @@ public class DefaultLifecycleProcessor implements LifecycleProcessor, BeanFactor
}
}
privatevoidawaitPreventShutdownBarrier(){
privatevoidwaitBarrier(CyclicBarrierbarrier){
try{
if(this.barrier!=null){
this.barrier.await();
}
barrier.await();
}
catch(Exceptionex){
logger.trace("Exception from prevent-shutdown barrier",ex);