简体   繁体   中英

Hazelcast : shutting down a particular member from hazelcast cluster

I am using hazelcast with spring MVC and loading the instance with context. Now because of a bug in spring code sometimes my context gets reloaded.

And whenever spring context reloads hazelcast creates a new member in its cluster. I am working to solve the bug in spring but till than i wanted to know that how can i close particular member of hazelcast cluster without affecting rest of the members.

Thanks.

I have faced this problem recently. My only solution was to create a servlet context listener associated with spring servlet dispatcher and shutdown hazelcast instance on "contextDextroyed" event.

Hope this helps.

您需要做的就是在上下文初始化时创建一个关闭挂钩,并在上下文退出时调用shutdown方法(请阅读手册)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM