tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: configtest
Date Wed, 03 Nov 2010 22:46:14 GMT
2010/11/4 Tim Funk <funkman@apache.org>:
> A possible nice to have is trying to "test" whether a new config will be OK
> or not.I have a patch which will allow a new arg for catalina.sh called
> "configtest".
>
> It will try to load the catalina config but log everything to standard
> output. It will try to exit with a non zero status code if "bad things
> happen". But it is not full proof, I have very quickly found ways to put in
> bad values that allows tomcat to start but I'd probably prefer it die
> instead.
>
> Anyway .. here is the patch ..
> http://people.apache.org/~funkman/configtest.patch
>
> Comments?
>

Too many unneeded whitespace changes. It is hard to read. Try
svn diff -x -w


In essence, it is
+            } else if (command.equals("configtest")) {
+                daemon.load(args);
+                if (null==daemon.getServer()) {
+                    System.exit(1);
+                }
+                System.exit(0);

where load(args) processes command line arguments, parses server.xml
and also calls  getServer().init();

I like it. My +1

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message