Tomcat Shutdown

  • michael lee

    michael lee - 2004-12-21


    I have modified struts-config.xml to use the XkinsPlugin. After this, i cannot shutdown tomcat completely. Tomcat stopped but the process still alive under linux. (I need to use KILL to terminate the process) From tomcat user forum, this problem seems to be related to the thread not being daemon thread. (a thread running autoloader exist) If i remove the plugin from configure file, tomcat can be shutdown normally.

    Any suggestion or workaround?

    Thanks & Regards,

    • Guillermo Meyer

      Guillermo Meyer - 2004-12-22

      The XkinsLoader class starts a new thread at startup (AutoReloader). This thread is in charge to verify if some template file change in order to reload it. Though it could be useful while modifying the templates in development, you should turn it off in production, testing or QA.
      Disabling this AutoReloader have no impact on Xkins normal usage.
      To disable it, modify the plugin configuration like this:
      <set-property property="autoReload" value="0"/>

      If you need to reload the templates with autoreload in 0, you could use the XkinsServlet.
      Or just restart the struts plugin.

      Hope this help and let me know if you have further problems.


      • michael lee

        michael lee - 2004-12-23


        Thanks you for your reply. I'll try and see whether it work or not.

        However, can we modify the XkinsLoader class and add setDaemon(true) in following statement

        if(this.getAutoReload()>0 && ! ConfigFilesTimeStamp().isEmpty())
           (new AutoReloader()).start();


    • Guillermo Meyer

      Guillermo Meyer - 2004-12-24

      For sure, I think that this could solve the problem. You can modify it and send it to me to add for next version.

      Thanks for your collaboration.

      Merry Christmas!



Log in to post a comment.