I'm not sure that java.jmx should be attempting to do any conversion of the values returned over jmx. I think it should be the application's responsibility to convert types appropriately for how they are needed.
On Wed, Feb 22, 2012 at 7:47 PM, zoka <ztomi...@gmail.com> wrote: > I was trying to convert result of JMX attributes query to JSON, and > encountered problem while reading one particular attribute value of > java.lang:type=Threading. Here is the REPL transcript: > > demo.server=> (require '[clojure.java.jmx :as jmx]) > nil > demo.server=> (jmx/read "java.lang:type=Threading" :AllThreadIds) > #<long[] [J@1bd97d0d> > demo.server=> > > This seems to be Java long array reference, > > The jmx/mbean function that returns all attribute name as keywords > associated with their values carries this value through. Attempt to > convert such map to JSON string causes exception, since in this case > a clojure vector of longs would be expected instead of Java array. > > This particular piece information (list of application ThreadIs) is > not of particular interest to me anyway, so it is easy just to remove > the offending map entry as a workaround. > > I have noticed some recent activity in clojure.java.jmx github repo, > so I thought it would be appropriate to rise this issue, since it may > be affecting some other attributes as well. > > Regards > Zoka > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en