Re: jetty restart failing

2014-09-18 Thread Wilker
Nice tricks, thanks again :) --- Wilker LĂșcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Tue, Sep 16, 2014 at 7:51 PM, James Reeves wrote: > On 16 September 2014 17:06, Herwig Hochleitner > wrote: > >> 2014-09-16 17:28 GMT+02:00 James Reeves : >> >>> On 16 September

Re: jetty restart failing

2014-09-16 Thread James Reeves
On 16 September 2014 17:06, Herwig Hochleitner wrote: > 2014-09-16 17:28 GMT+02:00 James Reeves : > >> On 16 September 2014 10:13, Herwig Hochleitner >> wrote: >> >>> >>> The thing I do on startup: (doseq [l (.getConnectors >>> jetty)] (.getLocalPort l)), is my solution to wait until it's come f

Re: jetty restart failing

2014-09-16 Thread Herwig Hochleitner
2014-09-16 17:28 GMT+02:00 James Reeves : > On 16 September 2014 10:13, Herwig Hochleitner > wrote: > >> >> The thing I do on startup: (doseq [l (.getConnectors >> jetty)] (.getLocalPort l)), is my solution to wait until it's come fully up. >> > > Why would this work? As far as I'm aware, both .g

Re: jetty restart failing

2014-09-16 Thread James Reeves
On 16 September 2014 10:13, Herwig Hochleitner wrote: > > The thing I do on startup: (doseq [l (.getConnectors > jetty)] (.getLocalPort l)), is my solution to wait until it's come fully up. > Why would this work? As far as I'm aware, both .getConnectors and .getLocalPort are unblocking. - James

Re: jetty restart failing

2014-09-16 Thread Herwig Hochleitner
2014-09-16 8:36 GMT+02:00 Wilker : > Thank you very much Herwig! The (.join jetty) did the trick :D > Cool! The thing I do on startup: (doseq [l (.getConnectors jetty)] (.getLocalPort l)), is my solution to wait until it's come fully up. -- You received this message because you are subscribed

Re: jetty restart failing

2014-09-15 Thread Wilker
Thank you very much Herwig! The (.join jetty) did the trick :D --- Wilker LĂșcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Mon, Sep 15, 2014 at 8:50 PM, Herwig Hochleitner wrote: > Feel free to steal from my jetty component: > https://github.com/webnf/webnf/blob/maste

Re: jetty restart failing

2014-09-15 Thread Herwig Hochleitner
Feel free to steal from my jetty component: https://github.com/webnf/webnf/blob/master/server/src/clj/webnf/server/component.clj 2014-09-15 10:42 GMT+02:00 Sven Richter : > > > Am Montag, 15. September 2014 00:20:21 UTC+2 schrieb Wilker: >> >> I felt that was too much for me, but I'm digging into

Re: jetty restart failing

2014-09-15 Thread Sven Richter
Am Montag, 15. September 2014 00:20:21 UTC+2 schrieb Wilker: > > I felt that was too much for me, but I'm digging into his source codes to > learn more, and he seems to do a more robust way to shut down the server: > https://github.com/juxt/modular/blob/master/modules/netty/src/modular/netty.cl

Re: jetty restart failing

2014-09-14 Thread Wilker
Thanks for the info Sven. I also found out something, after watching this presentation: https://vimeo.com/100977463 I felt that was too much for me, but I'm digging into his source codes to learn more, and he seems to do a more robust way to shut down the server: https://github.com/juxt/modular/b

Re: jetty restart failing

2014-09-14 Thread Sven Richter
Hi Wilker, I have been going the same way and never really found out why this happens (I am using http-kit instead of jetty). However, one thing that I did not knew was that a refresh will delete references of vars. So if you keep your stop function somewhere and call refresh before the stop fu

Re: jetty restart failing

2014-09-13 Thread Wilker
I forgot to post before, here is the actual error: BindException Address already in use sun.nio.ch.Net.bind0 (Net.java:-2) Also, adding a (Thread/sleep 1000) seems to increase the success rate, but would be nice to be able to really wait on Jetty to shutdown instead of using arbitrary sleep. Th

jetty restart failing

2014-09-13 Thread Wilker
Hi, I'm trying to apply the ideas from the component library: https://github.com/stuartsierra/component My problems is being about stop/start the Jetty server, for that purpose I created this component: (defrecord WebServer [app port join? jetty log] component/Lifecycle (start [c]