Diego Lovison created ISPN-9211:
-----------------------------------
Summary: CacheListener must be annotated with
org.infinispan.notifications.Listener
Key: ISPN-9211
URL:
https://issues.jboss.org/browse/ISPN-9211
Project: Infinispan
Issue Type: Bug
Reporter: Diego Lovison
Why I need to add @Listener in the following java class?
I @ClientListener is a listener.
It seems redundant
{code:java}
@ClientListener
public class CacheListener {
@CacheEntryCreated
public void entryCreated(CacheEntryCreatedEvent<String, LocationWeather> event)
{
if (!event.isOriginLocal()) {
System.out.printf("-- Entry for %s modified by another node in the
cluster\n", event.getKey());
}
}
}
{code}
Without the @Listener annotation it will fail with the following error:
{noformat}
Exception in thread "main"
org.infinispan.notifications.IncorrectListenerException: Cache listener class
com.github.diegolovison.example.infinispan.listener.CacheListener must be annotated with
org.infinispan.notifications.Listener
{noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)