I construct a timer, addNotificationListener, addNotification with no errors or nothing suspicious. I never see the call to my handleNotification method. What else do I need to do?
environment: JBoss 4.0.3 Win 2003, HSQLDB
import javax.management.Notification;
import javax.management.NotificationListener;
import javax.management.timer.Timer;
....
timer=new Timer();
timer.addNotificationListener(this, null, myObject); // null, no filter
timer.addNotification("ExpectedUsage", "ExpectedUsage", myObject, nextExpire, periodMs);
....
public void handleNotification(Notification notif, Object myObject)
{
System.out.println("timer fired");
}
My mistake - moved to Beginners Corner.
Too bad I cannot delete my own entry!