So I viewed the example and decided to create instances of AxisService using AxisService.createClientSideAxisService. I store the AxisService object in a static map and use the wsdl url as the key. This way the AxisService object is created once per wsdl and the AxisService is used to create the ServiceClient.
Is the AxisService thread-safe or does it make the concurrent requests serialized? Thanks -jay Michele Mazzucco-2 wrote: > > You can reuse the same ServiceClient instance (but be careful -- it's > not thread safe) or create new instances by reusing the same > ConfigurationContext (if you use commons-sender be sure to cache the > HttpClient and use a custom connection manager). How to set up the > second case is shown here [1]. > > Michele > > [1] http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/ > integration/test/org/apache/axis2/async/AsyncService2Test.java > > > On 6 Mar 2008, at 22:41, jaybytez wrote: > >> >> I have not run a profiler to determine if there are any points >> within my Axis >> usage that I could optimize through caching...so this question is a >> shot in >> the dark. >> >> Is there any recommended thread-safe caching to improve performance >> and >> overhead? Would that be done through caching something like the >> AxisService/AxisConfiguration and creating new ServiceClients from >> these >> cached service and configuration or can I cache the ServiceClient? >> I am not >> totally sure what types of resources are attached to these objects >> and if >> caching them would cause any issues. Any recommendations? >> >> Thanks, >> >> Jay >> -- >> View this message in context: http://www.nabble.com/Caching- >> ServiceClient-or-AxisService-or-AxisConfiguration- >> tp15885373p15885373.html >> Sent from the Axis - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> 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] > > > -- View this message in context: http://www.nabble.com/Caching-ServiceClient-or-AxisService-or-AxisConfiguration-tp15885373p17742111.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]