[ 
http://issues.ops4j.org/browse/PAXWEB-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12139#action_12139
 ] 

Alin Dreghiciu commented on PAXWEB-126:
---------------------------------------

I looked in the approach of using the port=0 to let Jetty find a free port. 
That works even now. The only thing I do not like is that the free port is not 
a very user friendly one as in 58706. This may not be important for some so it 
can be an acceptable solution, maybe it can be the one we should use for now. I 
will also look if there is no customization available like to specify a range 
of ports to search.
Another one I was thinking about is an utility that we already have used in Pax 
Exam and which it will discover a free port starting from a given value for a 
number of ports to be tested. This has a disadvantage that even if the the 
utility finds an free port till the moment we pass it to jetty connector the 
port to be already taken by some other.

Anyhow I have also to verify if Jetty allows me to get the found port, 
otherwise I can not set it to service properties.

> Pax Web should find a free port and use it
> ------------------------------------------
>
>                 Key: PAXWEB-126
>                 URL: http://issues.ops4j.org/browse/PAXWEB-126
>             Project: Pax Web
>          Issue Type: New Feature
>          Components: HttpService, WebContainer
>            Reporter: Heiko Seeberger
>            Assignee: Alin Dreghiciu
>             Fix For: 0.5.3
>
>
> Currently the port for the HttpService is specified via System property or 
> Config Admin service. The latter offers a lot of flexibility, but even then 
> it may happen that the given port is not "free".
> Therefore it would be valuable if Pax Web would scan/try for free ports until 
> if can find and use one.
> I am not sure what would be the best strategy. The most simple one would 
> increrase port numbers starting from the default port or the one specified 
> via the System property or Config Admin. But maybe it could make sense to 
> have a "port scan service" which produces and remembers the port numbers and 
> has additional methods to get the used/successful port number for any given 
> Http Service (maybe identified by service id).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to