此内容已被标记为最终。 显示 4 条回复
If your node is run by using DefaultCacheServer then this is what you expect to happen.
As far as I know using the shutdown method in JMX does not actually kill the Java process, it will just shutdown the services on the node. When DefaultCacheServer is running it has a loop which continually ensures that all the services which have autostart set to true in the configuration are running (every 5 seconds by default) and it is this loop which will restart the services. When the services restart they will rejoin the cluster if you have any other nodes already running.
Thanks for your reply.
I was suspecting "autostart=true"...
Then, what is the best way to stop a Coherence node ?
Invoking a service on this node for executing "Cluster.shutdown() + System.exit(0)" ?
Hi Dominique,1 位用户发现它有用
If you are talking about some "invocable" way of shutting down a node then yes, an Invocable that does System.exit will do the trick (or a custom MBean if you want to do this from JMX). Alternatively just kill the process - which is what a lot of places I have worked at do.
Don't call System.exit from an Invocable.1 位用户发现它有用
Call DefaultCacheServer.shutdown() from the Invocable-s to shut down DefaultCacheServer instances.
It is more polite as that method was introduced for just that purpose.