Getting started Community Training Tutorials Documentation APIs, AI & Tools
<munit:dynamic-port propertyName="a.dynamic.port"/>
Dynamic Ports
Dynamic Ports
You're viewing an older version of the documentation. You can switch to the latest version or use the version selector in the left navigation.
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"/>