     (dorun (map #(.register jersey %) resources))
     env))
 
+
+(defn add-managed-object [^Environment e ^Managed m]
+  (.manage(.lifecycle e) m)
+  )
+
 (defn register-resource [app resource]
   (register-resources (env-from-app app) [resource]))
 

           [io.dropwizard Application]
           [io.dropwizard.setup Environment]
           [io.dropwizard.jersey.setup JerseyEnvironment]
           [com.codahale.metrics.health HealthCheckRegistry]))

(defprotocol ApplicationSetup
  (initialize [this bootstrap])

(defn register-healthcheck [^Environment env hc-name hc]
  (add-healthcheck-to-registry (.healthChecks env) hc-name hc) env)



(defn register-jackson-module [^Environment env mod]
  (.registerModule (.getObjectMapper env) mod)
  env)
