Bug 50949 - Allow configuration of service name, AJP port, server port.
Allow configuration of service name, AJP port, server port.
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Native:Packaging
5.5.33
PC All
: P2 enhancement with 4 votes (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-03-20 11:40 UTC by Guido Leenders
Modified: 2011-08-22 17:30 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Leenders 2011-03-20 11:40:49 UTC
I am using Tomcat to deploy a software application. Some customers run Windows and want Tomcat to run servlets.

For this, we use the installer provided on the site. In two situations, the standard installer does not work well enough:

1. The customer wants two installations on the same server, and therefore needs two services. For instance, one for development/test/acceptance and one for production. This can be achieved but requires manual interaction instead of just next, next, enter something finish.
2. The customer installs software for Sonicwall, also based on Tomcat. They include the standard installer and just overwrite any current service name for Tomcat 6 or 7.

To solve these deployment issues, I would like to be able to configure:

* The name and code of the Windows service to be created. For my own installations, I can then use something different of the standard name. That avoids that less intelligent installers hijack the service later, leading to a service request to me.
* The port for AJP and server. Currently, you can enter the HTTP port. That is very handy when for instance IIS is also running on the same machine. But when two Tomcat instances are running, the AJP and server port in a standard installation must also differ.

I have looked into res\tomcat.nsi. It seems to be responsible for the creation of the service and files.

In trunk around line 202 and 306 I see that the service name and display name are currently hardcoded. That would require some form of adaption.

The additional ports can probably be handled by Function configure.

I also saw that stuff is registered in the registry under SOFTWARE\Apache Software Foundation\Tomcat\@VERSION_MAJOR_MINOR@. That probably would require adaptation too to allow multiple installs without interfering them with each other. I do not know to handle that.

For the two scenarios, I think I can ask one customer to invest some amount of money, because in the long run it would save him the effort to learn administrator to use tomcat*.exe with options such as //ms.
Comment 1 jan van engelen 2011-05-06 13:51:26 UTC
The possibility to have multiple Tomcat installations on the same server without manual interference, just as part of the installation process, would be welcomed much. 
As result of that it should be possible to give the created windows service a different name and code.
Going to follow this issue with interest!
Comment 2 Mark Thomas 2011-06-24 16:43:44 UTC
This has been fixed in 7.0.x and will be included in 7.0.17 onwards.
Comment 3 Mark Thomas 2011-06-24 18:57:41 UTC
This has been proposed for back-port to 5.5.x and 6.0.x.
Comment 4 Mark Thomas 2011-08-11 09:40:18 UTC
This has been applied to 6.0.x and will be included in 6.0.33 onwards.
Comment 5 Mark Thomas 2011-08-22 15:57:10 UTC
This has been fixed in 6.0.x and 5.5.x.

It is included in 6.0.33 onwards and will be included in 5.5.34 onwards.
Comment 6 Guido Leenders 2011-08-22 17:30:45 UTC
Hi Mark,

fantastic that it even has been backported!

Rgds,

Guido Leenders
Invantive
http://www.invantive.com