You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/10/28 19:52:55 UTC
DO NOT REPLY [Bug 52028] Embeded Tomcat using a Connector with a
random port (port 0)
https://issues.apache.org/bugzilla/show_bug.cgi?id=52028
--- Comment #1 from Mark Thomas <ma...@apache.org> 2011-10-28 17:52:55 UTC ---
Created attachment 27861
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27861
v1 patch for discussion
I have started to look at this and it looks doable. port=0 works for all
connectors for 64-bit Windows.
The problem is with MBean names, JMX MBean registration and logging info.
The port number is not available at the point where the JMX registration
occurs. If bindOnInit="false", the port number may change multiple times during
the life of the connector.
With multiple connectors using port="0" there will be a naming clash as the
connectors need to be registered before the the ports are known.
I see two options.
1. Use auto-1, auto-2 instead of the port number in the JMX names (with a
static, thread-safe counter).
2. Re-register the connector and related components when the port number
changes.
I'm leaning towards one as it is a heck of a lot simpler.
Thoughts?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org