It works with tomcat from trunk now. I opened a bug and attached a patch for the new code. License and author specified as you said. Please review.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44199 On Jan 10, 2008 11:47 AM, Andrew Skiba <[EMAIL PROTECTED]> wrote: > Hi Peter, thanks for your reply, > > The name of Harish appears in the code by mistake. I started from > DefaultSocketFactory written by Harish, but nothing remained from the > original. So I am the author and I will include Apache license in the code. > > You are correct, it works only with java 5, and I checked it only with > tomcat 5.5. I will check it with tomcat 6 as well. > > I will open a bug and attach the fixed code. > > Andrew. > > > On Jan 10, 2008 11:30 AM, Peter Rossbach <[EMAIL PROTECTED]> wrote: > > > HI Andrew, > > > > good idea, but why you can contribute a code from Harish Prabandham > > ([EMAIL PROTECTED]). > > We can only accept contributions from orignal author and with Apache > > 2 license included! > > > > I seems that this only work with java 5 and the code is designed for > > JIO HTTP tomcat 5.5. > > > > Open a bug report, then we can discuss your contribution. > > > > Regards, > > Peter > > > > > > Am 10.01.2008 um 09:47 schrieb Andrew Skiba: > > > > > Hello, > > > > > > I want to contribute a custom SocketFactory allowing to analyze the > > > utilization of acceptConnection attribute of a Connector. In a > > > properly configured production system, there should be rare > > > situations where connections wait for a worker thread to be > > > handled. Our client complained on high latency of web requests, but > > > the measurement on servlet did not show high latency. So we wanted > > > to know the number of connections which wait in socket backlog and > > > were not accepted yet. > > > > > > I solved this problem by writing a custom SocketFactory, which > > > accepts connections immediately and puts it in my queue until a > > > call to accept() will take them. So the number of waiting > > > connections can be monitored via JMX. > > > > > > To activate this factory, the declaration of the corresponding > > > Connector in server.xml should be changed like in the following > > > example. > > > > > > <Connector port="8080" maxHttpHeaderSize="8192" > > > maxThreads="10" minSpareThreads="5" maxSpareThreads="7" > > > > > enableLookups="false" redirectPort="8443" > > > acceptCount="10" > > > connectionTimeout="2000" disableUploadTimeout="true" > > > > > > > > > socketFactory="org.apache.tomcat.util.net.BacklogMeasuringServerSocket > > > Factory"/> > > > > > > > > > No changes in existing classes are required. > > > > > > Please review the code in the attachment. > > > > > > > > > Andrew Skiba. > > > <BacklogMeasuringServerSocketFactory.java> > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >