<?xml version="1.0" encoding="UTF-8"?>
<!-- Illustrative Tomcat 9 server.xml skeleton, not a replacement for an installed file.
     Tomcat 10+ uses jakarta packages; compile the custom Valve against actual version.
     All numbers and context path below are examples to tune. -->
<Server port="-1">
  <Service name="Catalina">
    <!-- Must precede the Connector that references it. Bound runnable waiting work. -->
    <Executor name="obrhWorkers" namePrefix="obrh-http-"
              maxThreads="160" minSpareThreads="16" maxQueueSize="32" />
    <!-- maxConnections = sockets; acceptCount = OS backlog after connection limit.
         Executor maxThreads governs workers; a Connector maxThreads would be ignored. -->
    <Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
               executor="obrhWorkers" maxConnections="300" acceptCount="32"
               connectionTimeout="2000" keepAliveTimeout="5000" />
    <Engine name="Catalina" defaultHost="localhost">
      <Host name="localhost" appBase="webapps" autoDeploy="false">
        <Context path="/obrh" docBase="obrh-example">
          <!-- ONE instance covers business and ordinary readiness /route/dispatch.
               An earlier trusted diagnostic guard must mark restricted LB requests.
               Install the custom class in the correct Tomcat common classloader. -->
          <Valve className="example.obrh.ControlledSemaphoreValve"
                 concurrency="120" block="false" highConcurrencyStatus="503" />
        </Context>
      </Host>
    </Engine>
  </Service>
</Server>
