Hi Rickard, Very good points, the life cycle of Servlet wasn't correctly propagated. In addition, we had a pending issue to propagate these events inside the Restlet routing system (from a component to the contained applications for example).
"Make start/stop usage consistent" http://restlet.tigris.org/issues/show_bug.cgi?id=761 I have just checked in the required changes in SVN trunk and fixed ServerServlet. Could you try again with the next snapshot? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Rickard Öberg [mailto:rickardob...@gmail.com] Envoyé : jeudi 22 octobre 2009 09:36 À : discuss@restlet.tigris.org Objet : Re: Trouble with ServerServlet On 2009-10-22 15.32, Rémi Dewitte wrote: > Rickard, > > I have the feeling that overriding ServerServlet is not the way to go. > AFAIR you should be able to use it out ofthebox configuring the > application in web.xml. I don't know if stop() is called either but I > think so. Overriding ServerServlet.destroy is definitely not right, but that's the only way I can get it to work. Preferably I should only have to override createApplication. But if I do that, then application.stop() is not always called, as I get cases where the Component is considered stopped, and so application.stop() is not called. I could very easily reproduce this by simply deploying, and then redeploy again immediatly, without any servlet calls having been made. The application is instantiated and started, but not stopped on destroy(), as the Component is stopped. It seems there's a logic error somewhere in the code. /Rickard ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2410097 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2412127