RFC: New port for using Tomcat with jakarta-commons-daemon (jscv)

Martin Jakob mj-mailinglist at gmx.de
Sun Jun 26 12:01:44 GMT 2005


Hello Herve,

> ...
> Anyway, your current port provides a good base to work on. There are
> several other approaches to the "Tomcat launcher and run-time argument
> passing" that have been suggested or implemented so far. I am not a true
> user of Tomcat myself, so I can't really comment on their respective
> ease of use, and viability. So I would be glad if all people concerned
> by such issue could report on the various approaches so far.
> 
> IMHO, the point is that we need a separate port to implement this Tomcat
> launcher so that we don't replicate the work in each Tomcat port.
> Moreover, having such a separation (tomcat / tomcat-launcher) would
> allow for several kinds of launcher to be part of the ports tree, in
> case we would not agree on a particular one.

I agree. Splitting it in a generic port (jakarta-commons-daemon) and a
"specialized" one, to start tomcat is a 

better solution. The tomcat-launcher port  (hm, maybe a suitable  name?) 
would then only consist of the tomcat 

startscript for /usr/local/etc/rc.d

> I will test your patch and comment on it ASAP.

Thanks, i am looking forward to it. Any suggestions are very welcome!

> 
> FYI, PRs related to this issue:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/38018
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/38020
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/59571
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/74344
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/75143
> 
> Please report if any is missing from the list...

I must confess, i did not search the PR database, only the mailing list
archives. So this PRs are new to me. 

Extending the tomcatctl programm is interesting, but i have not tried the
patches. I did try to use the Java 

Service Wrapper from http://wrapper.tanukisoftware.org, but i could not get
it to run. So i concentratet on the 

solution from the Apache people, where i had your port as a starting point.

--
Martin

> On Sun, Jun 19, 2005 at 02:45:25PM +0200, Martin Jakob wrote:
> 
> > Hi,
> > 
> > I hope this is the correct list to post this message, because it has
tomcat
> > as
> > its main topic, but well, its also about creating/improving a port,
so...
> > 
> > Since i had to start tomcat with different jdks and/or
startup-parameters,
> > i sat down and tried to use the jscv from 
> > http://jakarta.apache.org/commons/daemon/jsvc.html
> > I found the port from Herve Quiroz, extended it a bit and added a rcNG 
> > tomcat.sh controll-script.
> > 
> > The port works quite well on my test system, so maybe its usefull for
other
> > people as well. I tested it with jdk1.4.2, jdk1.5.0, jakarta-tomcat-5.0
and
> > the new jakarta-tomcat-5.5.9 port. Just changing the variables in
rc.conf
> > and
> > restart the daemon switches the used jdk (and other parameters).
> > 
> > I am sure there are more glitches in the port, but here are some points
> > where i need input and ideas from other people:
> > 
> > - the name
> > "jakarta-tomcat-daemon" is not an official name, i used it for the
tests.
> > Any better ideas?
> > 
> > - the patch "patch-jsvc-unix.c"
> > its more or less a hack to show the complete path of the process in ps.
I
> > added
> > this, so that i could use the builtin rcNG functions for
> > stop/restart/status.
> > Maybe someone with better knowledge of C can comment on this hack?
> > 
> > - dependencies
> > at the moment there are no tomcat dependencies regarded in the Makefile.
> > 
> > - shutdown time
> > it really takes some time after /usr/local/etc/rc.d/tomcat.sh
(stop|restart)
> > is
> > executed to stop/restart the process. Again, any ideas what could cause
> > this?
> > 
> > Credits:
> > Based on the ports/scripts from Herve Quiroz and clement (apache2)
> > 
> > So, now have fun with this port :)
> > 
> > --Martin



More information about the freebsd-java mailing list