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

Martin Jakob mj-mailinglist at gmx.de
Wed Jul 6 18:33:07 GMT 2005


Hello Herve,

Since i found some time to work on my pet-port, i implemented some of your
suggestions, see below.

> Hi Martin,
> 
> ...
> So my plan for now is the following:
> 
> - Rework the sysutils/jakarta-commons-daemon port and add it in the
>   ports tree.
> - Add a rcNG/Tomcat port: sysutils/jakarta-tomcat-rncg. This port would
>   be bound to (but not depend on -- see below) a particular Tomcat port
>   (which user may pick at build/install), and would set an according
>   PKGNAMESUFFIX (e.g.  "50", "55") so that we could install several
>   startup scripts for the many installed Tomcat ports.

I untangled the jakarta-tomcat-daemon port into two seperate ports:

- jakarta-commons-daemon
- jakarta-tomcat55-launcher

(as always the names are open for suggestions :)

As the number says the script is intended for Tomcat 5.5, but when the
proper variables are changes, it could be used for Tomcat > 4.0 (but not
tested).
As i understand it, Tomcat 3 lacks the daemon interface, so this port would
still use the current way. 
With symlinking /usr/local/sbin/jscv to tomcat55, tomcat50 etc. it is
possible to use multiple installations of Tomcat. The symlinking is done to
let rcNG find the correct process(es) to stop via their names, instead of
simply all running jscvs.

> - Have each Tomcat port in the tree depend on an according
>   jakarta-tomcat-rncgXX port. That's why we don't want the tomcat-rcng
>   ports to depend on a particular Tomcat port (cyclic dependency).

I must confess i have not thought a lot about dependencies.
In the current implementation:

jakarta-commons-daemon no dependency on Tomcat.
jakarta-tomcat55-launcher -> jakarta-commons-daemon but also no Tomcat
dependency.

> ...
> The PKGNAMESUFFIX and "multiple tomcat launchers" approach described in
> step 2 means that there will be different configuration settings, each
> specific to one tomcat version (e.g. "tomcat50_enable",
> "tomcat55_javahome"...).

Yes, i used this idea in my approach.

> However, we need to discuss the patch-jsvc-unix.c issue. I don't think
> it is good to disable some FreeBSD-specific code in a generic utility
> port such as jakarta-commons-daemon. But you seem to think this is
> useful in our Tomcat/rcNG case. Hence, here again I need feedback and/or
> contribution or we will probably have to have two distinct ports
> (jakarta-commons-daemon and jakarta-tomcat-launcher), possibly with the
> later importing stuff from the former.

I am uneasy with this patch myself, but it was the only way i found to use
the already implemented rcNG functions for stop, status and poll.
BTW, stopping the daemon takes really a long time, but i do not have an idea
why this is the case :(
I will look further into it, but ideas about the cause of this behaviour are
welcome.

> ... 

> Herve

I hope the attached shars make it unharmed to the list.

--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jakarta-commons-daemon.shar
Type: application/octet-stream
Size: 4312 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20050706/1d6df312/jakarta-commons-daemon.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jakarta-tomcat55-launcher.shar
Type: application/octet-stream
Size: 9718 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20050706/1d6df312/jakarta-tomcat55-launcher.obj


More information about the freebsd-java mailing list