Last active
May 2, 2020 09:25
-
-
Save ivos/92bda51c2f5ae857169065900f8e24c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns backend.support.java-melody | |
(:import (net.bull.javamelody MonitoringProxy) | |
(net.bull.javamelody.internal.model Counter))) | |
(defn- call-method | |
[klass method-name params obj & args] | |
(-> klass | |
(.getDeclaredMethod (name method-name) | |
(into-array Class params)) | |
(doto (.setAccessible true)) | |
(.invoke obj (into-array Object args)))) | |
(def ^Counter ejb-counter | |
(let [ejb-counter (call-method MonitoringProxy "getEjbCounter" [] nil)] | |
(doto ejb-counter | |
(.setDisplayed true) | |
(.setUsed true)) | |
ejb-counter)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment