Oct 23, 2014

Infinispan listener event owner

It took me a while to find this, it exists from version 5.3 of infinispan.

I have a cluster and i want that only the instance which got that event and insert it into the cache will handle - in my case, save it to the db. Other replicated instances caches listeners won't work because in this particular event they aren't the owners .

You just need to annotate this above your listener : @Listener(primaryOnly = true)

See this for further information