I had a look at the java.jmx code and worked out and tested s simple
fix:
diff --git a/src/main/clojure/clojure/java/jmx.clj b/src/main/clojure/
clojure/java/jmx.clj
index 128e516..3d291a3 100644
--- a/src/main/clojure/clojure/java/jmx.clj
+++ b/src/main/clojure/clojure/java/jmx.clj
@@ -203,9 +203,16 @@
(into-array (map name attrs)))))
(.getAttribute *connection* (as-object-name n) (name attrs))))
+(defn- array-chk
+ "Check if v is Java array and if so, convert it to vector"
+ [v]
+ (if (.isArray (class v))
+ (vec v)
+ v))
+
(def ^{:doc "Read one or more mbean properties."}
read
- (comp objects->data raw-read))
+ (comp array-chk objects->data raw-read))
user=> (require '[clojure.java.jmx :as jmx])
nil
user=> (jmx/read "java.lang:type=Threading" :AllThreadIds)
[11 10 6 3 2 1]
This also makes sure that values returned by read and mbean functions
are immutable.