Hi,

I am trying to use the Timer MBean to notify
parts of my application. Sun tells me about the expected
behaviour:

 If the timer notification to be inserted has a date that is before the
current date, the method behaves as if the specified date were the
current date. The first notification is delivered immediately and the
subsequent ones are spaced as specified by the period parameter.

source:
http://java.sun.com/j2ee/1.4/docs/api/javax/management/timer/TimerMBean.html

If I call addNotification as follows

mbServer.invoke(timerService.getObjectName(),
                "addNotification",
                new Object[] {
                "grobiChangeNotification",
                "I call you once",
                null,
                new Date(new Date().getTime() - 10000) },

                new String[] {
                "".getClass().getName(),
                "".getClass().getName(),
                "java.lang.Object",
                Date.class.getName()});

I get the following exception:

RuntimeException in MBean operation
'addNotification(java.lang.String,java.lang.String,
java.lang.Object,java.util.Date)


Please tell me I am doing something wrong, because
this feature is very important to me, and I would
hate to work-arround it.

Thanks,

Stefan


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to