i am using jboss-3.0.6 + tomcat-4.1.18,and register Timer Mbean by modify /jboss_tomcat_home/server/default/conf/jboss-service.xml
in my application,as follow
public void startTimer(){
Timer timer1 = new Timer();
Listener listener = new Listener();
timer1.addNotificationListener(listener, null, null);
timer1.start();
}
and the listener is :
public class Listener
implements NotificationListener {
public Listener () {
}
public void handleNotification(Notification notification, Object obj) {
System.out.println("--------------- hi,hi,Listener's handleNotification");
String type = notification.getType();
}
}
but when i startTimer,the listener's method of handleNotification can't be invoked.
why,what wrong with my application.
thanks.
where's your addNotification(type, message, date) call?