You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mladen Turk <mt...@mappingsoft.com> on 2002/11/21 11:04:21 UTC

[TOMCAT] Disabling Server shutdown port?

Hi,

Can we disable the server shutdown port?
I was thinking if I set the port to 0, then the StandardServer shouldn't
create the shutdown socket.
The reason for that is cause the embedded TC doesn't really need that if
the JNI is the only communication channel.
Server could be shut down from 'inside'.
This will enable multiple TC instances too, using the same server.xml
file.
Of course the await() needs to be refactored so it will not fail in that
case.

Thoughts?

MT.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [TOMCAT] Disabling Server shutdown port?

Posted by Costin Manolache <cm...@yahoo.com>.
+1 

I don't know if this is known - the socket channel has a feature
to specify  a "range" - if the port is taken it'll try the next one.
This allows a single config file to be used for a pool of tomcats
( i.e. simpler config for load-balancing ). 

Costin

Mladen Turk wrote:

> 
> 
>> -----Original Message-----
>> From: Remy Maucherat [mailto:remm@apache.org]
>> 
>> You should use the BootstrapService class instead of
>> Bootstrap.
> 
> Silly me ... ;-(.
> 
> What about ChannelSocket can it be disabled too ?
> Something like:
> 
>     public void init() throws IOException {
>         // Find a port.
>         if (startPort == 0) {
>             port = 0;
>             log.info("JK2: ajp13 disabling channelSocket");
>             running = true;
>             return;
>         }
> 
> 
> If the connector port is set to 0 then no listening socket will be
> created (cause one doesn't want to listen on this server).
> 
> 
> MT.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [TOMCAT] Disabling Server shutdown port?

Posted by Mladen Turk <mt...@mappingsoft.com>.

> -----Original Message-----
> From: Remy Maucherat [mailto:remm@apache.org] 
> 
> You should use the BootstrapService class instead of 
> Bootstrap.

Silly me ... ;-(.

What about ChannelSocket can it be disabled too ?
Something like:

    public void init() throws IOException {
        // Find a port.
        if (startPort == 0) {
            port = 0;
            log.info("JK2: ajp13 disabling channelSocket");
            running = true;            
            return;                    
        }


If the connector port is set to 0 then no listening socket will be
created (cause one doesn't want to listen on this server).


MT.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [TOMCAT] Disabling Server shutdown port?

Posted by Remy Maucherat <re...@apache.org>.
Mladen Turk wrote:
> Hi,
> 
> Can we disable the server shutdown port?
> I was thinking if I set the port to 0, then the StandardServer shouldn't
> create the shutdown socket.
> The reason for that is cause the embedded TC doesn't really need that if
> the JNI is the only communication channel.
> Server could be shut down from 'inside'.
> This will enable multiple TC instances too, using the same server.xml
> file.
> Of course the await() needs to be refactored so it will not fail in that
> case.
> 
> Thoughts?

You should use the BootstrapService class instead of Bootstrap. In 5.0, 
this has been refactored in a single class (with a flag to trigger the 
await).

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>