You can initiate the database connection via middleware, or use defonce to
ensure that your database connection isn't overwritten by a reload.

- James


On 4 August 2014 19:59, Joseph Guhlin <joseph.guh...@gmail.com> wrote:

> I'm sure this may be desired functionality for many, but I use the :init
> fn to connect to the database. When files are reloaded, this is never
> called again and my database connection is lost. Is there another way or is
> it possible to check for connection from the handler itself?
>
>  :ring {:handler UTR-import.query-server/handler
>          :port 6789
>          :init UTR-import.query-server/dev-init
>          :auto-reload? true
>          :auto-refresh? true
>          }
>
> Thanks,
> --Joseph
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to