[Bug 52028] Embeded Tomcat using a Connector with a random port (port 0)

2016-01-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=52028 --- Comment #3 from Konstantin Kolinko --- Backported to Tomcat 6 (r1723545, r1723551) and will be in 6.0.45 onwards. -- You are receiving this mail because: You are the assignee for the bug. -

DO NOT REPLY [Bug 52028] Embeded Tomcat using a Connector with a random port (port 0)

2011-11-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52028 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

DO NOT REPLY [Bug 52028] Embeded Tomcat using a Connector with a random port (port 0)

2011-10-28 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52028 --- Comment #1 from Mark Thomas 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

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-14 Thread Konstantin Kolinko
2011/10/14 Mark Thomas : > 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 : > Do we agree on the fact that after been star

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-14 Thread Olivier Lamy
2011/10/14 Mark Thomas : > On 14/10/2011 09:27, Olivier Lamy wrote: >> 2011/10/10 Konstantin Kolinko : >>> 2011/10/9 Olivier Lamy : tomcat.getConnector().setPort( 0 ); >>> >>> 1) Look at how TomcatBaseTest assigns subsequent port numbers, >>> starting with 8001. >>> >>> http://svn.apache.org/v

DO NOT REPLY [Bug 52028] New: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52028 Bug #: 52028 Summary: Embeded Tomcat using a Connector with a random port (port 0) Product: Tomcat 7 Version: trunk Platform: All OS/Version: All

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-14 Thread Mark Thomas
On 14/10/2011 09:27, Olivier Lamy wrote: > 2011/10/10 Konstantin Kolinko : >> 2011/10/9 Olivier Lamy : >>> tomcat.getConnector().setPort( 0 ); >> >> 1) Look at how TomcatBaseTest assigns subsequent port numbers, >> starting with 8001. >> >> http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-14 Thread Konstantin Kolinko
2011/10/14 Henri Gomez : >>> 3) There are several Connector/Endpoint implementations in Tomcat. >>> While java.net.ServerSocket does support port number of "0",  I am not >>> sure that APR-based implementation does allow it. >> Sure but the use case is just to start a http/https (apr can be >> omit

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-14 Thread Henri Gomez
>> 3) There are several Connector/Endpoint implementations in Tomcat. >> While java.net.ServerSocket does support port number of "0",  I am not >> sure that APR-based implementation does allow it. > Sure but the use case is just to start a http/https (apr can be > omitted) connector on any random f

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-14 Thread Olivier Lamy
2011/10/10 Konstantin Kolinko : > 2011/10/9 Olivier Lamy : >> tomcat.getConnector().setPort( 0 ); > > 1) Look at how TomcatBaseTest assigns subsequent port numbers, > starting with 8001. > > http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?view=markup#l

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-09 Thread Konstantin Kolinko
2011/10/9 Olivier Lamy : > tomcat.getConnector().setPort( 0 ); 1) Look at how TomcatBaseTest assigns subsequent port numbers, starting with 8001. http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?view=markup#l84 2) While the proposed feature may have

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-09 Thread Olivier Lamy
2011/10/9 Mark Thomas : > On 09/10/2011 15:08, Olivier Lamy wrote: >> Hello, >> I'd like to be able to use a random port when using embedded Tomcat in >> unit tests to test servlets. >> Currently it's "locked" by a test in Connector#startInternal. >> Is it intentional ? > > svn blame would have ans

Re: Embeded Tomcat using a Connector with a random port (port 0)

2011-10-09 Thread Mark Thomas
On 09/10/2011 15:08, Olivier Lamy wrote: > Hello, > I'd like to be able to use a random port when using embedded Tomcat in > unit tests to test servlets. > Currently it's "locked" by a test in Connector#startInternal. > Is it intentional ? svn blame would have answered that for you. > I'd like to

Embeded Tomcat using a Connector with a random port (port 0)

2011-10-09 Thread Olivier Lamy
Hello, I'd like to be able to use a random port when using embedded Tomcat in unit tests to test servlets. Currently it's "locked" by a test in Connector#startInternal. Is it intentional ? I'd like to be able to do simply something like : Tomcat tomcat = new Tomcat(); tomcat.setBaseDir(System.get