1 Reply Latest reply on May 2, 2014 9:38 AM by Justin Bertram

    How to destroyTopic and remove its subscribers?

    Alex Don Newbie



      I tried some posibilities to destroy a Topic with removing of its subscribers, but I did not find the right invocation. It should be a function, which takes also a boolean to control the removing the subsribers.


      Here is my code with some variants:



      mBeanServer = (MBeanServer) javax.management.MBeanServerFactory


           try {

                     on = ObjectNameBuilder.DEFAULT.getJMSServerObjectName();

                     mBeanServer.invoke(on, "destroyTopic" , new Object[] { topicName, true }, new String[] {"java.lang.String" });

                     v.2//mBeanServer.invoke(on, "destroyTopic" , new Object[] { topicName, true }, new String[] {"java.lang.String" , boolean.class.getName()});                                          ERROR: javax.management.ReflectionException:    Signature    mismatch for operation destroyTopic: (java.lang.String, java.lang.Boolean) should be (java.lang.String)

                      v.3//mBeanServer.invoke(on, "destroyTopic" , new Object[] { topicName, true }, new String[] {"java.lang.String" ,"java.lang.Boolean"}); ERROR: smth, like too many parameters


               } catch (Exception e) {




      no one works. Can somebody help me please?