Currently, the tomcat-6 startup script in /etc/init.d contains the following value for pidfile: --pidfile /var/run/tomcat-6.pid We suggest changing these to --pidfile /var/run/${SVCNAME}.pid With this, multiple instances of tomcat can be run on one box by copying/symlinking the tomcat-6 files in /etc/init.d and /etc/conf.d E.g. ln -s /etc/init.d/tomcat-6 /etc/init.d/tomcat.instance cp /etc/conf.d/tomcat-6 /etc/conf.d/tomcat.instance gives you the init script and config for a new instance. After changing the conf.d file, you can start a second instance by rc-config add tomcat.instance default without further changint the init script.
Created attachment 263791 [details, diff] Patch to change tomcat-6 to ${SVCNAME}
Changing this to an enhancement request vs bug. Its really not a complete request either, patch is not really usable. It will require much more than a simple change to the init script and pid file name, to provide full support for multiple instances of tomcat on gentoo.
I agree that it is only the first (small) step towards a full solution. However, it will allow people to use Gentoo's init script as part of their solution vs. having to patch it. It also does not break current installations.
I am closing this bug as wontfix. There are enough problems with the Tomcat package, this is not a complete solution. It will only serve to confuse users in ways which I cannot support and have no plans to support any time soon. I went out of my way to remove the partially complete profiling support that existed in Tomcat years ago. http://www.gentoo-wiki.info/Tomcat_Gentoo_ebuild Once all bugs on Tomcat are closed, which there is presently a considerable amount, I can start to consider enhancing it with features such as profiling/multi-instance. FYI no one used the profiling ability when it was implemented. Just the init script and other things lacked support for that. The parts I did not finish, and there was no user interest at that time. Thus even once all bugs are closed, and I get around to considering such. Unless there are lots of users wanting such a feature and will use it. I will likely expend the time in other areas and ways.