From owner-freebsd-java@FreeBSD.ORG Wed Jul 20 14:47:58 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D25AE16A41F for ; Wed, 20 Jul 2005 14:47:58 +0000 (GMT) (envelope-from achill@matrix.gatewaynet.com) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF59243D46 for ; Wed, 20 Jul 2005 14:43:19 +0000 (GMT) (envelope-from achill@matrix.gatewaynet.com) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id j6KEVmmj032584; Wed, 20 Jul 2005 17:31:48 +0300 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id j6KEVmvH032580; Wed, 20 Jul 2005 17:31:48 +0300 Date: Wed, 20 Jul 2005 17:31:48 +0300 (EEST) From: Achilleus Mantzios To: Conrad Burger In-Reply-To: <88B5DDE8C1A06741B754B910DE2DEFBB49AA2A@HERMES.swistgroup.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT Cc: freebsd-java@freebsd.org Subject: Re: Tomcat 5.5 --- tomcat55ctl --- increase max vm heap space ? X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 14:47:59 -0000 O Conrad Burger έγραψε στις Jul 20, 2005 : > ************************************************************ > Click here to view our e-mail legal notice: > http://www.swistgroup.com/email.htm or call: +27 21 888 7920 > ************************************************************ > Hi all > > I needed to increase the maximum allowed heap space for the vm tomcat is running > on. This was achieved by using the -Xmx switch (eg. -Xmx512m). > > >From what I can see there is no way to add this switch if you want to use > "tomcat55ctl". > > Modified the daemonctl.c and Tomcat 5.5 Makefile to get it working. > > My question... I don't want to perform this "hack" operation every time I > install tomcat on a machine or update the ports tree. > Would it be possible to add some variable, where passing arbitrary vm arguments > to the tomcat vm can be done at port build time? > > Eg. Tomcat5.5/Makefile > > --- Makefile Wed Jul 20 16:12:59 2005 > *************** > *** 45,50 **** > --- 45,51 ---- > STDERR_LOG= ${LOG_DIR}/stderr.log > AUTO_START?= NO > STOP_TIMEOUT?= 5 > + JAVA_VM_ARGS?= -Xmx512m > PID_FILE= /var/run/${APP_SHORTNAME}.pid > REPLACE_FILES= ${PORTSDIR}/www/jakarta-tomcat4/files/daemonctl.c \ > ${PORTSDIR}/www/jakarta-tomcat4/files/daemonctl.1 \ > *************** > *** 109,114 **** > --- 110,116 ---- > -e "/%%STOP_TIMEOUT%%/s//${STOP_TIMEOUT}/g" \ > -e "/%%USER%%/s//${USER}/g" \ > -e "/%%WARP_PORT%%/s//${WARP_PORT}/g" \ > + -e "/%%JAVA_VM_ARGS%%/s//${JAVA_VM_ARGS}/g" \ > $f > ${WRKDIR}/`basename $f` > @${ECHO_MSG} " [ DONE ]" > .endfor > > > Eg. daemonctl.c > --- daemonctl.c Wed Jul 20 13:06:57 2005 > *************** > *** 425,431 **** > file using pipe(2) */ > > /* Execute the command */ > ! execl("%%JAVA_HOME%%/%%JAVA_CMD%%", > "%%JAVA_HOME%%/%%JAVA_CMD%%", "-jar", %%JAVA_ARGS%% "%%JAR_FILE%%", %%JAR_ARGS%% > NULL); > > fprintf(stderr, "%%CONTROL_SCRIPT_NAME%%: Unable to start > %%APP_TITLE%% %%PORTVERSION%% since '%%JAVA_HOME%%/%%JAVA_CMD%% -jar > %%JAR_FILE%%' in %%APP_HOME%%: "); > perror(NULL); > --- 425,431 ---- > file using pipe(2) */ > > /* Execute the command */ > ! execl("%%JAVA_HOME%%/%%JAVA_CMD%%", > "%%JAVA_HOME%%/%%JAVA_CMD%%","%%JAVA_VM_ARGS%%", "-jar", %%JAVA_ARGS%% > "%%JAR_FILE%%", %%JAR_ARGS%% NULL); > > fprintf(stderr, "%%CONTROL_SCRIPT_NAME%%: Unable to start > %%APP_TITLE%% %%PORTVERSION%% since '%%JAVA_HOME%%/%%JAVA_CMD%% -jar > %%JAR_FILE%%' in %%APP_HOME%%: "); > perror(NULL); > > > Cheers > Conrad Burger I have probably missed something, but why can't tomcat be started as a shellscript as jboss does? > > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > -- -Achilleus