Hi. In order to write a web service for AXIS , you code a Java class and deploy it into AXIS (which is in turn deployed in a web container). My question is : Is this class ready for concurrent access (like Servlets) ? What about 10 or even 100 requests trying to access this service ? In J2EE 1.4 we can code web services using two approaches , EJB and Servlets , what about AXIS ?
Axis is implemented as a servlet, which largely determines its runtime concurrency characteristics. I think it instantiates the WS class for each call, so as long as you don't use static fields in a thread-unsafe way, the code should be fine.
I'm not sure what you mean by the last sentence of your question - can you elaborate?
My last sentence means , in order to code a web service in J2EE , we can code it as an EJB or a Servlet (a special Servlet called Endpoint, as far as I remember). So in AXIS we just code a simple plain class (not extending any special AXIS class or interface) and it is ready for real-world job ?
Joined: Mar 22, 2005
That's correct. You simply declare certain public methods to be WS-accessible in the deployment descriptor, and Axis does the rest.