2 Replies Latest reply on Sep 9, 2005 6:22 PM by schachi

    stop message-delivery

    schachi

      i try to stop "message-delivery from a queue".

      DocImportProcessorEJB:

      onMessage(Message m) {
       if (...) {
       ObjectName objectName =
       new ObjectName("jboss.j2ee:binding=message-driven-bean,
       jndiName=local/DocImportProcessorEJB,
       plugin=invoker,service=EJB");
       MBeanServer server = MBeanServerLocator.locateJBoss();
       server.invoke(objectName, "stopDelivery", new Object[] {}, null);
       }
      }


      error:
       [exec] 22:34:36,937 INFO [STDOUT]
       javax.management.InstanceNotFoundException:
       jboss.j2ee:binding=message-driven-bean,
       jndiName=local/DocImportProcessorEJB,
       plugin=invoker,service=EJB is not registered.
      


      jmx-console:
      Domain Name: jboss.j2ee
      service: EJB
      plugin: invoker
      binding: message-driven-bean
      jndiName: local/DocImportProcessorEJB@15425661
      


      local/DocImportProcessorEJB@15425661? is this the name of the instance?
      however, its dynamic. it changes with every jboss-restart.

      what would be the correct objectname to reference the mbean?

      thank you for reply (and sorry for my english)
      marc