2 Replies Latest reply on Nov 29, 2010 4:05 PM by Aspi Engineer

    Request for enhancements to JMSServerControl

    Aspi Engineer Newbie

      I wanted to suggest some enhancements to the "org.hornetq.api.jms.management.JMSServerControl" class. Alternately if someone would like to suggest alternate means to achieve the same results, that too would be fine.

       

       

      a)

      JMSServerControl.createQueue and JMSServerControl.createTopic do not throw any exceptions if the JMS queue or JMS topic already exist. This should be changed. A call to "create" should fail if the object already exists.

       

      b)

      JMSServerControl.destroyTopic does not throw an exception if the JMS topic does not exist. This is inconsistent with the behavior of JMSServerControl.destroyQueue which does throw an exception (see below). Can we change JMSServerControl.destroyTopic to throw an exception if the JMS topic does not exist.

       

       

      Exception from JMSServerControl.destroyQueue if the JMS queue does not exist:

       

      Exception in thread "main" HornetQException[errorCode=100 message=No such queue jms.queue.PUT_DEV_JMX_QUEUE]

       

          at org.hornetq.core.server.impl.HornetQServerImpl.destroyQueue(HornetQServerImpl.java:706)

       

          at org.hornetq.jms.server.impl.JMSServerManagerImpl.destroyQueue(JMSServerManagerImpl.java:633)

       

          at org.hornetq.jms.management.impl.JMSServerControlImpl.destroyQueue(JMSServerControlImpl.java:318)

       

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

       

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

       

          at java.lang.reflect.Method.invoke(Method.java:597)

       

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)

       

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)

       

          at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)

       

          at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)

       

          at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)

       

          at javax.management.StandardMBean.invoke(StandardMBean.java:391)

       

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)

       

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)

       

          at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)

       

          at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)

       

          at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)

       

          at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1359)

       

          at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)

       

          at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)

       

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

       

          at java.lang.reflect.Method.invoke(Method.java:597)

       

          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)

       

          at sun.rmi.transport.Transport$1.run(Transport.java:159)

       

          at java.security.AccessController.doPrivileged(Native Method)

       

          at sun.rmi.transport.Transport.serviceCall(Transport.java:155)

       

          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)

       

          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)

       

          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)

       

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

       

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

       

          at java.lang.Thread.run(Thread.java:619)

       

      Thanks

      Aspi Engineer

      Putnam Investments