From owner-freebsd-java@FreeBSD.ORG Wed Jul 20 14:36:11 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 E4C7D16A41F for ; Wed, 20 Jul 2005 14:36:11 +0000 (GMT) (envelope-from conrad.burger@swistgroup.com) Received: from timon.swistgroup.com (timon.swistgroup.com [196.44.35.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3C2243D46 for ; Wed, 20 Jul 2005 14:36:09 +0000 (GMT) (envelope-from conrad.burger@swistgroup.com) Received: from mailnull by timon.swistgroup.com with local (Exim 4.51 (FreeBSD)) id 1DvFg5-0007am-3B for freebsd-java@freebsd.org; Wed, 20 Jul 2005 16:36:05 +0200 Received: from hermes.swistgroup.com ([172.16.6.65]) by timon.swistgroup.com with esmtp (Exim 4.51 (FreeBSD)) id 1DvFg4-0007aa-UI for freebsd-java@freebsd.org; Wed, 20 Jul 2005 16:36:04 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Wed, 20 Jul 2005 16:36:04 +0200 Message-ID: <88B5DDE8C1A06741B754B910DE2DEFBB49AA2A@HERMES.swistgroup.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Tomcat 5.5 --- tomcat55ctl --- increase max vm heap space ? Thread-Index: AcWNOFnMmpRV+N0iT52kRJvLOsnIbQ== From: "Conrad Burger" To: X-Scan-Signature: f256bee954ff391203707d79b188322e X-disclaimer: Legalsentry Subject: 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:36:12 -0000 ************************************************************ Click here to view our e-mail legal notice: http://www.swistgroup.com/email.htm or call: +27 21 888 7920 ************************************************************ Hi all=20 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. =20 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=3D ${LOG_DIR}/stderr.log AUTO_START?=3D NO STOP_TIMEOUT?=3D 5 + JAVA_VM_ARGS?=3D -Xmx512m PID_FILE=3D /var/run/${APP_SHORTNAME}.pid REPLACE_FILES=3D = ${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=20 Conrad Burger