Hello,

I apologize if this problem is a repeat. I found nothing that I could relate
to as being the same issue.

I have a working Axis 2 version 1.2 client that I am now trying to make
reuse an HTTP connection.
If I set the REUSE_HTTP_CLIENT to false all is good and messages are sent
and retrieved, but when I set REUSE_HTTP_CLIENT to true I get two
connections made, two responses received and then the client hangs with the
top of the stack trace being:

Object.wait(long) line: not available [native method]   
MultiThreadedHttpConnectionManager.doGetConnection(HostConfiguration, long)
line: 509
...

I am guessing connections aren't returned to a pool for some reason. Is this
a known issue or am I doing something wrong? The following is the code
snippet.

                Options communicationOptions = new Options();
                communicationOptions.setTo( targetEPR );
                communicationOptions.setTransportInProtocol( 
Constants.TRANSPORT_HTTP );
                communicationOptions.setProperty( 
HTTPConstants.REUSE_HTTP_CLIENT, true );

                HttpClient httpClient = new HttpClient( new
MultiThreadedHttpConnectionManager() );
                ConfigurationContext context;
                try
                {
                        context = ConfigurationContextFactory.
createConfigurationContextFromFileSystem(null, null);
                        context.setProperty( HTTPConstants.CACHED_HTTP_CLIENT, 
httpClient );
                }
                catch (AxisFault e)
                {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }


Jayke

-- 
View this message in context: 
http://www.nabble.com/REUSE_HTTP_CLIENT-as-%27true%27-causes-client-to-hang-tf3868379.html#a10959700
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to