codahale/dropwizard — pull request #201 by Hellblazer (2012-11-01 01:15:27+00:00)
Title: Dynamic port configuration for both admin and main ports

This patch allows either or both of the http ports to be configured to 0, which means that Jetty will dynamically allocate the configured port. If the configured port is not 0, the previous port range constraints apply (i.e. 1025 <= port <= 65536).

Additionally, the service has the running Jetty server injected into it, so the service can query the server for the dynamically allocated ports, or whatever else it may wish to do with the server instance.