0 Replies Latest reply on Jun 11, 2012 8:28 PM by Hugh Bragg

    MessageCount changed from Integer to Long in HornetQ 2.1.2 to 2.2.5 upgrade

    Hugh Bragg Newbie

      I'm trying to access the message count via jmx and I've written a client to do this in version 2.1.2 standalone.

      Since upgrading to 2.2.5 this no longer works. I have to rewrite the client so that it now reports messageCount as a Long or I get a conversion error originating from the way jmx uses reflection to access the interface. (java.lang.Integer cannot be cast to java.lang.Long)

       

      My problem is that I have to maintain both implementations of the hornetq for legacy reasons.

       

      I'm wondering if there is some way to implement this in a single client or is the only solution to implement 2 sepearate clients access each interface as I've done for the jms queue.

       

      How can I programatically detect the hornetQ version and then load the appropriate libraries?

       

      Is there a smarter way or must I deploy both version of the hornetQ libraries?

       

      Maybe I can use the same solution for accessing the jms queue.