All I have a static factory that I am using to maintain a socket connection. 
Each sample does the following when it starts


    public final SampleResult sample() {

        initSession();
    }

in the initSession we just have

if(!sessionFactory.isConnected()) {
        //connect
}

Now that works fine the sampler starts up, connects to the remote host and send 
the data.
When the samplers ends

        @Override
        public void testEnded() {
                this.sessionFactory.shutDown();
        }

in the session factory we try and close the socket. But it does not close. And 
no error is thrown.
When I try and debug via eclipse I see a null pointer buy no errors just 
stepping through
jmeter code.

Is this the correct way of doing this.


Reply via email to