2 Replies Latest reply on Apr 22, 2002 6:51 AM by gunnam

    error "addNotification could not be found"

    gunnam

      Hi,

      I am getting "addNotification could not be found" when I am trying to invoke the MBeanServer.invoke .

      The actual code that I have here is

      Integer actualSchedule = (Integer) _lServer.invoke ( lTimer.getObjectName (), "addNotification",
      new Object []
      {"I will knock u again",
      null, new Date( new Date().getTime() + 1000 ),
      new Long (10000)},
      new String[] {
      "".getClass().getName(),
      "java.lang.Object",
      Date.class.getName (),
      Long.TYPE.getName ()}
      );

      Can anyone tell what is wrong in this. Any help in this regards is greatly appreciated.

      Also can any one explain what all operations can one invoke on a MBeanServer ??

      Awaiting ur help.

      Regards,
      Gunnam

        • 1. Re: error "addNotification could not be found"
          squirest


          Assuming you're trying to invoke() on a timer, have you consulted the javadoc to see what the arg list for TimerMBean.addNotification is supposed to be?

          Your arguments appear wrong (missing a String).

          I believe it's String, String, Object, Date [long [,long]]

          As for explaining "all operations" one can invoke on and MBeanServer I would recommend that the best place to look is the specificatin and javadocs.

          Additionally, Juha's book is very clear and comes highly recommended.

          Trevor

          Trevor

          • 2. Re: error "addNotification could not be found"
            gunnam

            Thanx a lot dude. It works fine after I have incorporated the changes recommended by u.

            Thanx a ton Trevor for the prompt reply.

            Regards,
            Prasad