Contact Us 1-800-596-4880

Dynamic Ports

The Dynamic Ports global element allows you to bind a free port to a property. It searches for a free port available and can be narrowed to a specific range.

For example, a dynamic port would look something like this:

<munit:dynamic-port propertyName="a.dynamic.port"/>

And it can be used in the http configuration:

<http:request-config name="httpRequestConfig">
    <http:request-connection host="localhost" port="${a.dynamic.port}"/>
</http:request-config>

Additionally you can set min and max values from where to get the port:

<munit:dynamic-port propertyName="a.dynamic.port" min="6000" max="7000"/>