Hi Ted,
Out of interest, what os/jvm are you using?
Thanks,
David

On 20/02/07, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
Ted,

if you want more control you can use OperationClient, but it won't give
you more control over connections. Instead you could try something like
this:

// inititalization code

ConfigurationContext multiThreadedConfigurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, 
null);

MultiThreadedHttpConnectionManager connectionManager = new
MultiThreadedHttpConnectionManager();

HttpConnectionManagerParams params = new HttpConnectionManagerParams();

// you can tune these values
params.setDefaultMaxConnectionsPerHost(5);
params.setMaxTotalConnections(200);
params.setStaleCheckingEnabled(true);
connectionManager.setParams(params);

HttpClient httpClient = new HttpClient(connectionManager);

multiThreadedConfigurationContext.setProperty(
HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
multiThreadedConfigurationContext.setProperty(
  HTTPConstants.CACHED_HTTP_CLIENT, httpClient);






ServiceClient sender = null;
try {
        new ServiceClient(multiThreadedConfigurationContext, null);
        // set options end send message
} finally {
        if (sender != null) {
                try {
                    sender.cleanup();
                } catch (AxisFault e) {
                    // take the most appropriate action
                }
        }
}


Michele

On Tue, 2007-02-20 at 11:01 +0000, [EMAIL PROTECTED]
wrote:
> Hi,
>
> thanks for fast reply, yes I'm using a ServiceClient to send my messages. I 
tryed out the connection reuse and I called the clean() method after each service 
call. It doesn't show any affects, the error is still present and there are still 
to many open connections wich leads to the address already in use error. Is there 
a way, not to use the ServiceClient for the calls to avoid this Problem and have 
more control over the connections?
>
> Thanks again,
> Ted
>
> ----- Ursprüngliche Mail ----
> Von: Michele Mazzucco <[EMAIL PROTECTED]>
> An: axis-user@ws.apache.org
> Gesendet: Dienstag, den 20. Februar 2007, 11:21:59 Uhr
> Betreff: Re: [Axis2] To many open connections
>
> Ted,
>
> supposing you're using a ServiceClient object so send your messages, do
> you call the cleanup() method in a finally block?
> BTW, try to have a look here http://wso2.org/library/87 and here
> http://wso2.org/library/165
>
> Hope this helps,
> Michele
>
> On Tue, 2007-02-20 at 10:11 +0000, [EMAIL PROTECTED]
> wrote:
> > Hi,
> >
> > trying to stress an Axis2 implemented application after round about 3960 calls an 
"Address already in use" error occours, because of the huge bunch of open 
connections. Is there a way to instruct Axis to close these connections?
> >
> > Thanks a lot
> > Ted
> >
> >
> >
> >
> >
> >
> >
> > ___________________________________________________________
> > Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
>
> ___________________________________________________________
> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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




--
David Illsley - IBM Web Services Development

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

Reply via email to