• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Thread safety of Axis client classes

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a web service deployed in WAS on one machine and I have used the WSDL file to generate Axis 1.1 client classes using the Axis WSDL2Java tool. I want to run a client app from another machine where the client will be a servlet running in Tomcat or possibly JRun. The generated code includes the usual *ServiceLocator and *ServiceBindingStub classes. If I wanted to instantiate these classes, say from inside a servlet (the client using the service) can these generated client classes be instantiated once in the init() of the servlet and used in a thread-safe manner?


Thanks in advance for any input.
[ August 20, 2005: Message edited by: M Streit ]
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends on whether your Webservice classes are thread safe or not. For example in Axis it is possible to specify the scope of service object - Application , Session and Request.
http://ws.apache.org/axis/java/user-guide.html

For WAS , please read the docs.
 
M Streit
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WAS server is not the issue. The question is again, running Axis client stub classes from within a simple servlet that is part of the client application talking to a web service running somewhere else, possibly WAS. The server end is not in question. It is the CLIENT side of the equation that may be at issue.

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic