-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 1.0
-
Component/s: core-svc
-
None
-
1.0
-
sparc
-
generic
-
Verified
When I run following test:
for (int i=0; i<2; i++) {
mserver.addNotificationListener(delegateName, dummyListener, null, s1);
mserver.addNotificationListener(delegateName, dummyListener, null, s2);
mserver.addNotificationListener(delegateName, dummyListener, null, s3);
mserver.removeNotificationListener(delegateName, dummyListener);
try {
mserver.removeNotificationListener(delegateName, dummyListener, null, s1);
System.out.println("Failed to remove a listener.");
return false;
} catch (ListenerNotFoundException lne) {
// As expected.
}
}
the first cycle is well passed, but since second cycle, the main thread is blocked for a while when adding the listener second time.
The test is passed, but it takes long time
for (int i=0; i<2; i++) {
mserver.addNotificationListener(delegateName, dummyListener, null, s1);
mserver.addNotificationListener(delegateName, dummyListener, null, s2);
mserver.addNotificationListener(delegateName, dummyListener, null, s3);
mserver.removeNotificationListener(delegateName, dummyListener);
try {
mserver.removeNotificationListener(delegateName, dummyListener, null, s1);
System.out.println("Failed to remove a listener.");
return false;
} catch (ListenerNotFoundException lne) {
// As expected.
}
}
the first cycle is well passed, but since second cycle, the main thread is blocked for a while when adding the listener second time.
The test is passed, but it takes long time