ports/38020: www/jakarta-tomcat4: stop tomcat via java -jarbootstrap.jar stop

Jonathan Chen jonc at chen.org.nz
Tue Apr 5 01:57:36 PDT 2005


On Mon, Apr 04, 2005 at 08:12:33PM +0800, Kang Liu wrote:
> A draft version of daemonctl.c for tomcat has been submitted to ports/75143,
> which can solve this issue.
> http://www.freebsd.org/cgi/query-pr.cgi?pr=75143

There's a bit of code in here that doesn't look right:

	[...]
 	if (pid2 == 0) {
 		arguments = malloc(sizeof(char*) * 6 );
 		arguments[0] = "%%JAVA_HOME%%/%%JAVA_CMD%%";
 		arguments[1] = "-jar";
 		arguments[2] = %%JAVA_ARGS%%;
 		arguments[3] = "%%APP_HOME%%/%%JAR_FILE%%";
 		arguments[4] = "stop";
 		arguments[5] = NULL;
	[...]
	}
 
Having the %%JAVA_ARGS%% substitution follow "-jar" doesn't look
correct to to me. Shouldn't the jar-file follow the "-jar" argument?

A possible alternative is pick up the code from java/jboss4; remove the
"jbossArgs" code in daemonctl.c, make the right substitutions in the
Makefile and you'll have a daemonctl program that does accept JVM
arguments, as well as having a RCng-fied startup script as well.

Cheers.
-- 
Jonathan Chen                      |      To do is to be  -- Nietzsche
<jonc at chen.org.nz>                 |      To be is to do  -- Sartre 
                                   |      Scooby do be do -- Scooby


More information about the freebsd-java mailing list