From owner-freebsd-java Wed Mar 19 20:12: 9 2003 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 8306B37B401 for ; Wed, 19 Mar 2003 20:12:06 -0800 (PST) Received: from habanero.hesketh.net (habanero.hesketh.net [66.45.6.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DBB843F85 for ; Wed, 19 Mar 2003 20:12:05 -0800 (PST) (envelope-from brent@mutt.rcfile.org) X-Received-From: brent@mutt.rcfile.org X-Delivered-To: freebsd-java@FreeBSD.ORG X-Originating-IP: [66.57.229.60] Received: from mutt.rcfile.org (rdu57-229-060.nc.rr.com [66.57.229.60]) by habanero.hesketh.net (8.12.8/8.12.8) with ESMTP id h2K4BsVC002830; Wed, 19 Mar 2003 23:11:54 -0500 X-Spam-Filter: check_local@habanero.hesketh.net by digitalanswers.org Received: from mutt.rcfile.org (localhost [127.0.0.1]) by mutt.rcfile.org (8.12.8/8.12.7) with ESMTP id h2K4C8C4046442; Wed, 19 Mar 2003 23:12:08 -0500 (EST) (envelope-from brent@mutt.rcfile.org) Received: (from brent@localhost) by mutt.rcfile.org (8.12.8/8.12.8/Submit) id h2K4C71l046441; Wed, 19 Mar 2003 23:12:07 -0500 (EST) Date: Wed, 19 Mar 2003 23:12:07 -0500 From: Brent Verner To: Doug Poland Cc: leafy@leafy.idv.tw, freebsd-java@FreeBSD.ORG Subject: Re: Specifying jdk for tomcat 4.1.18 Message-ID: <20030320041206.GA46244@rcfile.org> References: <18118.63.104.35.130.1048108215.squirrel@email.polands.org> <3E78DDFF.7000500@cyberlifelabs.com> <32007.63.104.35.130.1048109532.squirrel@email.polands.org> <3E78E6C2.2090209@cyberlifelabs.com> <1616.172.16.1.33.1048125648.squirrel@email.polands.org> <20030320020719.GA70161@leafy.idv.tw> <1671.172.16.1.33.1048126904.squirrel@email.polands.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1671.172.16.1.33.1048126904.squirrel@email.polands.org> X-muttrc: $Id: .muttrc,v 1.10 2003/02/08 08:35:24 brent Exp $ X-uname: FreeBSD 4.8-RC #5: Sat Mar 15 20:17:35 EST 2003 root@mutt.rcfile.org:/usr/obj/usr/src/sys/MUTTS User-Agent: Mutt/1.5.3i Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [2003-03-19 20:21] Doug Poland said: | | leafy said: | > On Wed, Mar 19, 2003 at 08:00:48PM -0600, Doug Poland wrote: | >> /usr/local/bin/tomcat41ctl I see references to | >> /usr/local/jdk1.3.1. Unless I'm missing something, I think that | >> this tomcat41ctl port has the path to /usr/local/jdk1.3.1 compiled | >> into the binary and there is no way to path to a different jdk. | >> | > The same goes for jboss3ctl. If I want to switch to a different | > jdk, I have to recompile the whole thing(!). Is it possible to | > explicitly set JAVA_HOME when invoking the wrappers? Or by setting | > some configuration files for that? | > | Curious. I don't know the answer to your question. How do you | recompile with a different jdk? In the jakarta-tomcat41 Makefile it | echos $JAVA_HOME as /usr/local/jdk1.3.1 but I have no idea how it is | set. I obviously don't know enough about the port Makefile | business. | Perhaps a knoweldgeable and kind soul can enlighten us why jdk1.3.1 | is the only jdk for use in jboss3 and tomcat41. I have a patch to the daemonctl.c source that causes it to use JAVA_HOME, but this approach is not ideal, as there are other difficulties aside from which java binary to use. I'm taking over the jboss3 port (provided I find time to wrap up the loose ends), and I've been thinking that a better solution would be to have the daemonctl.c program call an appropriate shell script instead of calling the java binary directly -- the daemonctl.c program exists solely as a setuid/setgid wrapper to startup the service in question. I have begun to implement a daemonctl.c that uses a( set of xml) config file(s) to control its actions. sh$ ls -al /usr/local/bin/tomcat41ctl lrwxr-xr-x 1 root wheel 5 May 12 2002 tomcat41ctl -> jxdaemonctl sh$ ls -1 /usr/local/etc/daemonctl.d/ tomcat41ctl.xml jboss3ctl.xml jboss-tomcat.xml when called thru the tomcat41ctl symlink, the program will find the tomcat41ctl.xml config file which looks like this. www www JAVA_HOME /usr/local/jdk1.4.1 CATALINA_TMPDIR /var/tmp/tomcat41 / /usr/local/jakarta-tomcat4.1/logs/stdout.log /usr/local/jakarta-tomcat4.1/logs/stderr.log /usr/local/jakarta-tomcat4.1/bin/catalina.sh run -security /usr/local/jakarta-tomcat4.1/bin/catalina.sh stop /usr/local/jakarta-tomcat4.1/bin/catalina.sh The bits mentioned above are not complete, but I've been using a (much more simplistic) version for a couple of weeks. If this approach is sane, I'll try and finish this up over the weekend. Right now the program is using libxml2, but I'd like to implement it on top of expat, since that is already required for any of the java progs. b -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message