Jayke,

you set the HTTPConstants.REUSE_HTTP_CLIENT property in the wrong place.
You should set it into the conf. context, not into the options.

Michele

On Mon, 2007-06-04 at 15:20 -0700, chaoticinc wrote:
> 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
> 


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

Reply via email to