Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Fw: How to set acceptor count on Server connector

Can someone point me whats wrong.

Following is my jetty-http.xml and it well follows api doc  
Note: If we remove the factories arg below it goes fine.
 

<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ServerConnector">
        <Arg name="server">
          <Ref refid="Server"/>
        </Arg>
        <Arg name="acceptors" type="int">
          <Property name="http.acceptors" default="-1"/>
        </Arg>
        <Arg name="selectors" type="int">
          <Property name="http.selectors" default="-1"/>
        </Arg>
        <Arg name="factories">
          <Array type="org.eclipse.jetty.server.ConnectionFactory">
            <Item>
              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
                <Arg name="config">
                  <Ref refid="httpConfig"/>
                </Arg>
              </New>
            </Item>
          </Array>
        </Arg>
        <Set name="host">
          <Property name="jetty.host"/>
        </Set>
        <Set name="port">
          <Property name="jetty.port" default="8080"/>
        </Set>
        <Set name="idleTimeout">120000</Set>
        <Set name="acceptQueueSize">4096</Set>
      </New>
    </Arg>
  </Call>
</Configure>



On Friday, October 10, 2014 7:06 PM, Monish Gandhi <monishgandhi@xxxxxxxxx> wrote:


I use 9.2.2.v20140723 and need to set the acceptor count on my ServerConnector. I need to set server and factories apart from the acceptor count, and realize that there is no constructor for same. There isn't a setter either on ServerConnector (or its parent hierarchy). 

Tried as configured in http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/plain/jetty-server/src/main/config/etc/jetty-http.xml as well but i get an Exception on context startup "Caused by: java.lang.IllegalStateException: No suitable constructor: <New class="org.eclipse.jetty.server.ServerConnector">" 

What could i be possibly missing?

Regards
Monish


References below:




<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ServerConnector">
        <Arg name="server"><Ref refid="Server" /></Arg>
        <Arg name="factories">
          <Array type="org.eclipse.jetty.server.ConnectionFactory">
            <Item>
              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
                <Arg name="config"><Ref refid="httpConfig" /></Arg>
              </New>
            </Item>
          </Array>
        </Arg>
        <Set name="host"><Property name="jetty.host"  /></Set>
        <Set name="port"><Property name="jetty.port" default="$(yjava_jetty__port:8080)"  /></Set>
        <Set name="idleTimeout">$(yjava_jetty__idleTimeout:30000)</Set>
        <Set name="acceptQueueSize">$(yjava_jetty__http_accept_count:100)</Set>
        <xi:include href="" xpointer="xpointer(/root/*)" xmlns:xi="http://www.w3.org/2001/XInclude">
        <xi:fallback>
        </xi:fallback>
        </xi:include>
      </New>
    </Arg>
  </Call>

</Configure>



Back to the top