axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tushar Kapila <tgkp...@gmail.com>
Subject Re: need : java 8 transactional web app Axis2 client sample
Date Sat, 09 Sep 2017 16:48:11 GMT
thank you, i purposely did not write in detail about the errors, as I want
to rewrite the code anyway. So was looking a good sample to follow.

Want to make sure sockets are being shared across invocations. That the
initialization code is once. Right now its all in one method. and seems
that unneccessary initialization is happening. On the other hand since some
of the classes are not thread safe, wondering what a good way to do it?
ObjectPool ? Or some thing else?



On Fri, Sep 8, 2017 at 6:47 PM, Thorsten Schöning <tschoening@am-soft.de>
wrote:

> Guten Tag Tushar Kapila,
> am Freitag, 8. September 2017 um 12:28 schrieben Sie:
>
> > This leads to socket issues.
>
> You should describe those issues more detailed, like what exactly
> happens, providing concrete exceptions or such. At least for me it's
> not clear what your actual problem is.
>
> I have the strong feeling it's about not being able to execute more
> than X parallel connections to your remote endpoint from the client?
> Would fit to your mention of "MultiThread...". If so, that's because
> Axis2 uses a connection manager which by default only allows two
> connections to the same host at the same time. So depending on how
> your client actually works, if it needs to serve multiple parallel
> requests the same time, because itself is a server, there might be
> some bottleneck.
>
> That connection manager can be configured:
>
> https://axis.apache.org/axis2/java/core/docs/http-transport.
> html#setting_cached_httpclient_object
> http://wso2.com/library/3316/
> http://wso2.com/library/3316/#cachedClient
> http://wso2.com/library/3316/#connectionManager
>
> >         private void initHttpConnectionManager(ConfigurationContext
> cfgCtx)
> >         {
> >                 MultiThreadedHttpConnectionManager connMgr = (
> MultiThreadedHttpConnectionManager) cfgCtx.getProperty(
> HTTPConstants.MULTITHREAD_HTTP_CONNECTION_MANAGER);
> >
> >                 // Wenn es noch keine Instanz gibt, erzeugen und
> speichern wir selbst eine,
> >                 // die dann mit unseren Optionen gefüttert werden kann.
> >                 if (connMgr == null)
> >                 {
> >                         connMgr = new MultiThreadedHttpConnectionMan
> ager();
> >                         cfgCtx.setProperty(HTTPConstants.MULTITHREAD_HTTP_CONNECTION_MANAGER,
> connMgr);
> >                 }
> >
> >                 HttpConnectionManagerParams connMgrParams =
> connMgr.getParams();
> >                 connMgrParams.setMaxConnectionsPerHost(
> HostConfiguration.ANY_HOST_CONFIGURATION, 100);
> >                 connMgrParams.setMaxTotalConnections(100);
> >         }
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail: Thorsten.Schoening@AM-SoFT.de
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Regards
Tushar Kapila

Mime
View raw message