   component/Lifecycle
 
   (start [component]
+    (println ";; Starting database")
     ;; In the 'start' method, initialize this component
     ;; and start it running. For example, connect to a
     ;; database, create thread pools, or initialize shared


(defrecord AnotherComponent [component-a component-b])

(defn another-component []
  (component/using
    (->AnotherComponent nil nil)
    [:component-a :component-b]))

(defrecord AnotherSystem [component-a component-b component-c])




;; Local Variables:
;; clojure-defun-style-default-indent: t

  component/Lifecycle

  (start [this]
    (println ";; Starting ExampleComponent")
    ;; In the 'start' method, a component may assume that its
    ;; dependencies are available and have already been started.
    (assoc this :admin (get-user database "admin")))

  (stop [this]
    (println ";; Stopping ExampleComponent")
    ;; Likewise, in the 'stop' method, a component may assume that its
    ;; dependencies will not be stopped until AFTER it is stopped.
    this))
