Re: [jruby-user] Re: Gracefully shutting down JRuby app on Tomcat

Christian MICHON <[email protected]> Tue, 7 Apr 2015 08:52:14 +0200
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CACx2yF9d7SFUccDWnph7QQbLYg4srJs7F+Gs6jgz-_iLeLjKDg@mail.gmail.com>
--f46d043749a5c7b4b705131cda05
Content-Type: text/plain; charset=UTF-8

(sorry for the late reply: long Easter weekend)

I usually do not trust the container to stop properly a jruby/war applet.
Catching a TERM signal is not very clean to me.

Instead I usually have a special route, with either a DELETE or HEAD verb,
coupled with encrypted token in the header, allowing me through a curl
request to properly stop the webapp.

I had to do this as too many times the webapp closed without releasing the
persisted database files (I'm on Windows using embedded databases). You
might want to explore this path.

Good luck!


On Thu, Apr 2, 2015 at 7:18 PM, Jose R. <[email protected]> wrote:

> Many reasons. :) One reason is maintenance on the server. Yep I have a
> logger and a backtrace.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>


-- 
Christian

--f46d043749a5c7b4b705131cda05
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">(sorry for the late reply: long Easter weekend)<div><br></=
div><div>I usually do not trust the container to stop properly a jruby/war =
applet. Catching a TERM signal is not very clean to me.</div><div><br></div=
><div>Instead I usually have a special route, with either a DELETE or HEAD =
verb, coupled with encrypted token in the header, allowing me through a cur=
l request to properly stop the webapp.</div><div><br></div><div>I had to do=
 this as too many times the webapp closed without releasing the persisted d=
atabase files (I&#39;m on Windows using embedded databases). You might want=
 to explore this path.</div><div><br></div><div>Good luck!</div><div><br></=
div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu,=
 Apr 2, 2015 at 7:18 PM, Jose R. <span dir=3D"ltr">&lt;<a href=3D"mailto:li=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> w=
rote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex">Many reasons. :) One reason is main=
tenance on the server. Yep I have a<br>
logger and a backtrace.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
Posted via <a href=3D"http://www.ruby-forum.com/" target=3D"_blank">http://=
www.ruby-forum.com/</a>.<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe from this list, please visit:<br>
<br>
=C2=A0 =C2=A0 <a href=3D"http://xircles.codehaus.org/manage_email" target=
=3D"_blank">http://xircles.codehaus.org/manage_email</a><br>
<br>
<br>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>=
<div class=3D"gmail_signature">Christian<br></div>
</div>

--f46d043749a5c7b4b705131cda05--