hazelcast / hazelcast-hibernate

A distributed second-level cache for Hibernate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Listener should be unregistered on local regions when cache shutdown

EzequielB opened this issue · comments

Describe the bug
When regions are shutdown (destroy) from hibernate side, if the hazelcast instance is not shutdown, local region listeners are still registered. This forces the hazelcast instance to keep a reference to the listener, and thus the whole local region.

Expected behavior
Local region should clear registered regions when hibernate region is shutdown.

To Reproduce
On a running app, shutdown hibernate but do not shutdown hazelcast.
Check the listeners on hazelcast.

Closed by #164