Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 75469 invoked from network); 29 Mar 2007 02:52:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Mar 2007 02:52:51 -0000 Received: (qmail 5660 invoked by uid 500); 29 Mar 2007 02:52:57 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 5629 invoked by uid 500); 29 Mar 2007 02:52:57 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 5603 invoked by uid 99); 29 Mar 2007 02:52:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 19:52:57 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ole.ersoy@gmail.com designates 64.233.162.239 as permitted sender) Received: from [64.233.162.239] (HELO nz-out-0506.google.com) (64.233.162.239) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 19:52:49 -0700 Received: by nz-out-0506.google.com with SMTP id i28so35636nzi for ; Wed, 28 Mar 2007 19:52:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=cqcSMQJfJc+NaCGbJdIWE0gMIzCTQSE2cmETT6Aviz/c6Jtzw6OEzViNqxaS+kr0AXqWrKoOJVJCacoUeJBmDetvw3OMmJ97aWMCT6ufap5nZQ1PTZPt1g7u0/43OpmgJFIly4n6jCCpA6jZfh5AgcXiShkbZm7seXGFmVU2u4A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=h+RZQeY33o+Zq/NLb4pXm6A7hm2DSuzqW8x14a9CVAAmQ8Ony7EvZC04pJMIl7644aWk7VVjTxktNoBOoYBIMcPT9DWxFaa1hNSTqTLPitPexweDa14EQT1Ukk6/WjgHAEPH9YA7k6shV8R3Ahxc8IB27yq4Oxe6H8mAWnVQcLg= Received: by 10.65.194.13 with SMTP id w13mr444399qbp.1175136747972; Wed, 28 Mar 2007 19:52:27 -0700 (PDT) Received: from ?192.168.1.24? ( [24.13.179.233]) by mx.google.com with ESMTP id 34sm62810nza.2007.03.28.19.52.26; Wed, 28 Mar 2007 19:52:27 -0700 (PDT) Message-ID: <460B2949.9090904@gmail.com> Date: Wed, 28 Mar 2007 21:49:45 -0500 From: Ole Ersoy User-Agent: Thunderbird 1.5.0.10 (X11/20070302) MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: [RPM Installer] Generic start/stop shell script References: <4601D52D.1080003@gmail.com> <4609E8BE.3070004@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I wonder if this might fix things? http://jakarta.apache.org/commons/launcher/ It says it could be used to pass JVM arguments post startup. So if that's the case maybe we can set the -Xmx and -Xms parameters in the configuration file...and alles gut. Has anyone played with this? Cheers, - Ole Alex Karasulu wrote: > Post startup? Hmmm I don't think so since these parameters are needed > to initialize the > different memory pools for various memory models. However I could be > wrong. > > Regards, > Alex > > > On 3/28/07, *Ole Ersoy* > wrote: > > Yeah - Would be nice if the server.xml file could contain default > alternatives. > > Anyone know if we can inject min/max heap size parameters into the > JVM > post startup? > > Thanks, > - Ole > > > Alex Karasulu wrote: > > We might want to look at making some things like the min max heap > > sizes variable with defaults. However this we can do > > later after getting everything working. > > > > Alex > > > > > > On 3/21/07, *Ole Ersoy* > > >> wrote: > > > > I've tried to reduce our start/stop shell script to a > minimum needed > > for RPM (I think Solaris, Mac, *NIX in general). > > > > I still need to test it out of coarse, but I thought I'd > throw it out > > here in case anyone has a chance to kick it. > > > > Just substitute apacheds for ${name} (It's a pseudo template > - The > > final > > one will be a jet template....) > > > > > > #!/bin/bash > > # > > # chkconfig: - 91 35 > > # description: Starts and stops ${name} server. > > # > > # Shell script to start/stop ${name} > > # If you want to change ${name} service settings please > modify the > > server.xml > > # file. > > # > > > > > > # Source function library. > > if [ -f /etc/init.d/functions ] ; then > > . /etc/init.d/functions > > fi > > > > # Source networking configuration. > > if [ -f /etc/sysconfig/network ] ; then > > . /etc/sysconfig/network > > fi > > > > # Check that networking is up. > > if [ ! -z "$NETWORKING" ] ; then > > if [ "$NETWORKING" = "no" ] ; then > > exit 0 > > fi > > fi > > > > prog=$"${name} server" > > StringUtils.toUpperCase > (${name})_HOME=/usr/share/${name}-${version} > > #So for ApacheDS this would be > > # APACHEDS_HOME = /usr/share/apacheds-1.0.1 > > > > if [ -z "$JAVA_HOME" ] ; then > > echo "Error: JAVA_HOME environment variable is not set." > > echo "You will need to set the JAVA_HOME environment > variable to" > > echo "the the path of the root java installation directory." > > echo "See the installation guide for further instructions." > > else > > echo JAVA_HOME=$JAVA_HOME > > fi > > > > > > DAEMON_HOME=$APACHEDS_HOME/bin > > CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar > > > > #The statement below will probably be shortened to > > #$DAEMON_HOME/bootstrapper.jar > > #when we figure out how to use the daemon and logger from > > /usr/share/java instead. > > > > > CLASSPATH=$CLASSPATH:$DAEMON_HOME/bootstrapper.jar:$DAEMON_HOME/logger.jar:$DAEMON_HOME/daemon.jar > > > > > echo CLASSPATH=$CLASSPATH > > StringUtils.toUpperCase(${name})_USER=$USER > > > > TMP_DIR=/var/tmp/${name}-${version} > > PID_FILE=/var/run/${name}-${version}/server.pid > > > > cd $StringUtils.toUpperCase(${name})_HOME > > > > case "$1" in > > start) > > # > > # Start apacheds > > # > > echo -n $"Starting $prog: " > > ulimit -S -c 0 >/dev/null 2>&1 > > RETVAL=0 > > > > $DAEMON_HOME/apacheds \ > > -user $StringUtils.toUpperCase(${name})_USER \ > > -home $JAVA_HOME \ > > -Djava.io.tmpdir=$TMP_DIR \ > > > > > -Dlog4j.configuration=file://etc/conf/${name}-${version}/log4j.properties\ > > -Xms384m -Xmx384m \ > > -pidfile $PID_FILE \ > > -outfile /var/log/${name}-${version}/${name}- stdout.log \ > > -errfile /var/log/${name}-${version}/${name}-stderr.log \ > > -cp $CLASSPATH \ > > org.apache.directory.daemon.JsvcBootstrapper \ > > $StringUtils.toUpperCase(${name})_HOME start > > > > [ "$RETVAL" -eq 0 ] && success $"apacheds server startup" > || \ > > failure $"${name} server start" > > echo > > if [ -d /var/lock/subsys ] ; then > > [ "$RETVAL" -eq 0 ] && touch > > /var/${name}-${version}/apacheds.lock > > fi > > > > exit $RETVAL > > ;; > > > > stop) > > # > > # Stop ${name} > > # > > echo -n $"Shutting down $prog: " > > RETVAL=0 > > > > $DAEMON_HOME/${name} \ > > -stop \ > > -pidfile $PID_FILE \ > > > > - > > > Dlog4j.configuration=file://etc/conf/${name}-${version}/log4j.properties\ > > org.apache.directory.daemon.JsvcBootstrapper stop > > > > [ "$RETVAL" -eq 0 ] && success $"apacheds server > shutdown" || \ > > failure $"apacheds server shutdown" > > echo > > if [ -d /var/lock/subsys/apacheds ] ; then > > [ "$RETVAL" -eq 0 ] && rm > $APACHEDS_HOME/var/apacheds.lock > > fi > > > > exit $RETVAL > > ;; > > > > debug) > > # > > # Debug ${name} > > # > > echo -n $"Starting $prog in debug mode: " > > ulimit -S -c 0 >/dev/null 2>&1 > > RETVAL=0 > > > > if [ -z "$2" ] ; then > > echo > > echo > ======================================================== > > echo "Warning: the debug port is not set. Using 5005 > default." > > echo > ======================================================== > > echo > > DEBUG_PORT=5005 > > else > > DEBUG_PORT="$2" > > fi > > > > $JAVA_HOME/bin/java\ > > > > > -Dlog4j.configuration=file://$StringUtils.toUpperCase(${name})_HOME/conf/log4j.properties\ > > > -Xms384m -Xmx384m \ > > -Dcom.sun.management.jmxremote \ > > -Xdebug -Xnoagent -Djava.compiler=NONE\ > > > > > -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$DEBUG_PORT\ > > -jar $DAEMON_HOME/bootstrapper.jar \ > > $StringUtils.toUpperCase(${name})_HOME start > > ;; > > > > *) > > echo "Usage ${name} [start|stop|debug]" > > exit 1;; > > esac > > > > > > > > > >