 
 (defn- handle-invoke [operation]
   (fn [request]
-    (jmx/with-connection {:host jmx-remote-host :port jmx-remote-port}
+    (jmx/with-connection {:host @jmx-remote-host :port @jmx-remote-port}
       (let [mbean (get-in request [:params :bean])
             args (get-in request [:params :args])]
         (if (string? args)


(def app
  (-> app-routes
      (wrap-with-logger)
      (wrap-json-response)
      (wrap-defaults api-defaults)))



(defn- handle-list-beans []
  (fn [request]
    (jmx/with-connection {:host @jmx-remote-host :port @jmx-remote-port}
      (identifier-string (doall (list-beans @object-pattern))))))

(defroutes app-routes
  (GET "/list" [] (handle-list-beans))
