An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Restarting Railo with Ant

November 10, 2009 ·

On Twitter, Marc Esher just asked if my Scala compile-deploy process also included restarting Railo to pick up the new JAR file. Yes. I do it via Ant as follows:
<target name="restartrailo" description="Restarts the Railo server.">
      <loadfile property="restart.status" srcFile="${www}/test/command/restart_output.txt"/>
      <echo message="Restart status: ${restart.status}"/>
      <delete file="${www}/test/command/restart_output.txt"/>
restart_server.cfm looks like this:

      <cfset status = "RESTARTED"/>
   <cfcatch type="any">
      <cfset status = "FAILED: #cfcatch.message# (#cfcatch.type#)"/>
A failure to restart Railo does not cause the build to fail (but it probably should - I ought to set the HTTP status to 500 if I get an exception to cause the Ant get task to fail).

Tags: railo

0 responses