You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Jordi Salvat i Alabart <js...@atg.com> on 2003/08/29 09:35:49 UTC

Socket Factory trick not doable (at least not by me)

Hi.

I said I would research the possiblity of changing the socket factory by 
a custom one that would produce sockets capable of measuring times below 
the HTTP level (connection establishment, write time, latency, read time).

To do this, I needed to subclass, encapsulate, or reimplement the 
java.net.PlainSocketImpl class.
- Subclassing or encapsulating is not possible because the class has 
package visibility and it is illegal for common mortals to create 
classes in java.net.
- Reimplementing (by copying PlainSocketImpl source) is a bad solution, 
since that class uses native methods heavily and thus the 
reimplementation would likely be good only for one single JVM version. 
In adition, it is difficult because the original implementation 
subclasses java.net.SocketImpl and uses protected member variables in 
that class -- so I would need to partially reimplement SocketImpl too.

To make things even worse, there's no such thing as a default 
SocketImplFactory: in the default configuration, the java.net.Socket 
class creates socket implementations directly (without going through a 
factory).

In short: java.net was not designed to be extensible by common mortals, 
and a Real Java Programmer(tm) is needed for the job :-)

If you can come up with an idea to solve this (other than repackaging 
rt.jar -- that is too dirty even for me), I'll be happy to explore it.

-- 
Salut,

Jordi.



notes on Monitor for JMeter

Posted by peter lin <jm...@yahoo.com>.
I just posted some notes on the proposed monitor to jmeter wiki.

 

http://nagoya.apache.org/wiki/apachewiki.cgi?JMeterDevelopment/LongTerm

 

peter


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software