-
Bug
-
Resolution: Won't Fix
-
P3
-
7
-
b37
-
generic
-
generic
As of JDK 7 b37.
This is possibly another flavor or a side effect of the 6759624.
Please consider the following sequence:
EventClient eventclient = new EventClient(getClient());
NotificationListener listener = new SimpleListener();
ObjectName pattern = new ObjectName("*:*");
RankFilter filter = new RankFilter(discardedNotificationRank);
// SUBSCRIBE WITH FILTER AND HANDBACK
eventclient.subscribe(pattern, listener, filter, pattern);
// SUBSCRIBE WITH SAME NAME AND PATTERN BUT NO FILTER NOR HANDBACK
eventclient.subscribe(pattern, listener, null, null);
// UNSUBSCRIBE WITH SAME NAME AND PATTERN
eventclient.unsubscribe(pattern, listener);
// ==> AT THAT POINT NO LISTENER SHOULD BE LISTED (am I right ?)
// SUBSCRIBE AGAIN WITH SAME NAME, PATTERN, FILTER AND HANDBACK
eventclient.subscribe(pattern, listener, filter, pattern);
// CALL TO getListeners PRINTS:
[SQE] *:*_javasoft.sqe.jmx.test.functional.EventClientTest2$SimpleListener@14d55de_javasoft.sqe.jmx.share.RankFilter@15fd251_*:*_true
[SQE] *:*_javasoft.sqe.jmx.test.functional.EventClientTest2$SimpleListener@14d55de_null_null_true
Why do I have 2 listeners listed ?
Later on my listener doesn't receive notifications twice as it should if the two listeners listed above were really warm and alive.
Does it mean the second one in the list is somewhat a hollow ?
This is possibly another flavor or a side effect of the 6759624.
Please consider the following sequence:
EventClient eventclient = new EventClient(getClient());
NotificationListener listener = new SimpleListener();
ObjectName pattern = new ObjectName("*:*");
RankFilter filter = new RankFilter(discardedNotificationRank);
// SUBSCRIBE WITH FILTER AND HANDBACK
eventclient.subscribe(pattern, listener, filter, pattern);
// SUBSCRIBE WITH SAME NAME AND PATTERN BUT NO FILTER NOR HANDBACK
eventclient.subscribe(pattern, listener, null, null);
// UNSUBSCRIBE WITH SAME NAME AND PATTERN
eventclient.unsubscribe(pattern, listener);
// ==> AT THAT POINT NO LISTENER SHOULD BE LISTED (am I right ?)
// SUBSCRIBE AGAIN WITH SAME NAME, PATTERN, FILTER AND HANDBACK
eventclient.subscribe(pattern, listener, filter, pattern);
// CALL TO getListeners PRINTS:
[SQE] *:*_javasoft.sqe.jmx.test.functional.EventClientTest2$SimpleListener@14d55de_javasoft.sqe.jmx.share.RankFilter@15fd251_*:*_true
[SQE] *:*_javasoft.sqe.jmx.test.functional.EventClientTest2$SimpleListener@14d55de_null_null_true
Why do I have 2 listeners listed ?
Later on my listener doesn't receive notifications twice as it should if the two listeners listed above were really warm and alive.
Does it mean the second one in the list is somewhat a hollow ?
- relates to
-
JDK-6759624 Clarify when EventClient.unsubscribe throws a ListenerNotFoundException
- Closed