My simple web app
(http://blog.mired.org/2010/11/x10-controller-in-clojure.html) has
some stuff that needs to happen just once (in this case, opening the
serial port). It's not clear how to get this to happen using ring. If
I do it inside my ring handler, then it gets run on every request, and
I have to check to make sure it's not run multiple times. If I run it
outside the handler, then it gets run when I do "lein uberwar", which
is simply wrong.
When the deployment platform activates the war would seem to be the
right time to run this ("war load time"?). So maybe this is a question
that depends on the deployment platform, or war? However, a quick
google search didn't turn up anything that looked interesting.
Anyone got suggestions on how to set up code to be run when Jetty (or
tomcat, or ...)?
thanks,
<mike
--
Mike Meyer <[email protected]> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en