Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing web services with AXIS

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this question to the Web Services forum, where the Axis experts hang out. Find it there to continue the discussion!
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's correct. You simply declare certain public methods to be WS-accessible in the deployment descriptor, and Axis does the rest.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic