atom feed10 messages in org.apache.tomcat.devRe: Embeded Tomcat using a Connector ...
FromSent OnAttachments
Olivier LamyOct 9, 2011 7:08 am 
Mark ThomasOct 9, 2011 9:39 am 
Olivier LamyOct 9, 2011 10:37 am 
Konstantin KolinkoOct 9, 2011 3:58 pm 
Olivier LamyOct 14, 2011 1:27 am 
Henri GomezOct 14, 2011 1:34 am 
Konstantin KolinkoOct 14, 2011 4:33 am 
Mark ThomasOct 14, 2011 4:35 am 
Olivier LamyOct 14, 2011 5:40 am 
Konstantin KolinkoOct 14, 2011 5:57 am 
Subject:Re: Embeded Tomcat using a Connector with a random port (port 0)
From:Konstantin Kolinko (knst@gmail.com)
Date:Oct 14, 2011 5:57:14 am
List:org.apache.tomcat.dev

2011/10/14 Mark Thomas <mar@apache.org>:

If binding to a random port is to be supported I think it needs to be an explicit choice - e.g. by setting a special value such as "auto" - and ideally needs to be supported by all connectors.

2011/10/14 Olivier Lamy <ola@apache.org>:

Do we agree on the fact that after been started, the protocol handler will update the connector.port field to make the real port used available for use ?

If it were port=0 then you would better define a separate getLocalPort() property.

The "auto" value... how can that be? Connector.setPort() accepts integer, and it can also be accessed through JMX.

There are several layers, and if you say "update its port number", which of them will update its member variable and which not, and what happens if connector is restarted e.g. through JMX?

Also I would like to introduce support for "-1" value for port number, as I mentioned above, but that would be a separate feature.

I have opened https://issues.apache.org/bugzilla/show_bug.cgi?id=52028 and will try to propose a patch next week.