Hello,
I'm migrating from Wildfly 30.0.1 to 33.0.2. I've two Wildflies in standalone mode on different machines in cluster. I've cache with the following listener:
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryExpired;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryModified;
import org.infinispan.notifications.cachelistener.event.CacheEntryCreatedEvent;
import org.infinispan.notifications.cachelistener.event.CacheEntryExpiredEvent;
import org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent;
@Listener
public class ClusterCacheListener {
UpdaterLocalCache updater;
String cacheName;
public ClusterCacheListener (UpdaterLocalCache updater) {
this.updater = updater;
this.cacheName = updater.getClass().getSimpleName();
}
@CacheEntryCreated
public void entryCreated(CacheEntryCreatedEvent<ClusterKey, QValue> event) {
if (event.isPre()) return;
if (event.isOriginLocal()) {
//...
} else {
updater.updateLocalCacheFromClusterCache(event);
}
}
@CacheEntryModified
public void entryModified(CacheEntryModifiedEvent<ClusterKey, QValue> event) {
if (event.isPre()) return;
if (event.isOriginLocal()) {
//...
} else {
updater.updateLocalCacheFromClusterCache(event);
}
}
@CacheEntryExpired
public void entryExpired(CacheEntryExpiredEvent<ClusterKey, QValue> event) {
//...
}
}
During startup of Wildfly after invoking addLister on cache I get the following error:
00:38:45,800 WARN [org.infinispan.notifications.cachelistener.CacheNotifierImpl] (ServerService Thread Pool -- 217) ISPN000133: Attempted to register listener of class class ClusterCacheListener, but no valid, public methods annotated with method-level event annotations found! Ignoring listener
I've already tried changing the annotation to clustered, turning of sync. Tried to change the return of the annotated methods to CompletionStage<Void>
but nothing changed - still the same WARN in logs and the methods are not being invoked.
Please help, any advice would be great.