aspose file tools*
The moose likes Web Services and the fly likes Handling of Requests by Apache Axis 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Handling of Requests by Apache Axis 2" Watch "Handling of Requests by Apache Axis 2" New topic
Author

Handling of Requests by Apache Axis 2

Sumukh Deshpande
Ranch Hand

Joined: Feb 17, 2008
Posts: 87

Hello,

Does anyone has any idea on : How Apache Axis2 handles simultaneous requests?

What I mean is if I have a WebService which helps to insert Student Record in Student Enrollment Application then what if 1000 student try to enroll at the same time through the WebService?

Please also let me know if I am supposed to read some manuals or links for this.

Thanks in advance,
Sumukh.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
It's not so much Axis handling requests in parallel, as the underlying servlet container handling simultaneous requests. If those requests use a shared resource (like the same DB tables), then you should pay attention to resource congestion there. For a DB, that would be things like table-level locking vs. row-level locking, and transaction handling. Not sure if that answers your question, which is rather broad; maybe you can narrow it down to something more specific.
Sumukh Deshpande
Ranch Hand

Joined: Feb 17, 2008
Posts: 87

Tim Moores wrote:It's not so much Axis handling requests in parallel, as the underlying servlet container handling simultaneous requests. If those requests use a shared resource (like the same DB tables), then you should pay attention to resource congestion there. For a DB, that would be things like table-level locking vs. row-level locking, and transaction handling. Not sure if that answers your question, which is rather broad; maybe you can narrow it down to something more specific.


Tim,

What I want to ask is : Is there any configuration level change available in Axis 2 which will allow it to follow multithreaded model?

Right now what I observe is unless the first request is finished second is not initiated.

Please correct if I am wrong.

Thanks,
Sumukh.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
This seems highly relevant: http://www.mail-archive.com/axis-user@xml.apache.org/msg17545.html (5th result I got by searching for "axis multithreading", by the way).

Please correct if I am wrong.

Well, if that is what you are observing, then I assume that you are not wrong :-)
Sumukh Deshpande
Ranch Hand

Joined: Feb 17, 2008
Posts: 87

Tim Moores wrote:This seems highly relevant: http://www.mail-archive.com/axis-user@xml.apache.org/msg17545.html (5th result I got by searching for "axis multithreading", by the way).


Tim,

By any chance do you how to set the scope as Request or Application or Session and also how to disable pipe lining in Axis?

Thanks,
Sumukh.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
If it's not a setting in the Axis Admin web app then it's something in the deployment descriptor. Either way, the Axis documentation should cover it.

HTTP pipelining is a client-side issue. Are you using the same HTTP connection for both requests? If not, then pipelining wouldn't happen to begin with.
Sumukh Deshpande
Ranch Hand

Joined: Feb 17, 2008
Posts: 87

Tim Moores wrote:If it's not a setting in the Axis Admin web app then it's something in the deployment descriptor. Either way, the Axis documentation should cover it.

HTTP pipelining is a client-side issue. Are you using the same HTTP connection for both requests? If not, then pipelining wouldn't happen to begin with.



Tim ,

We are doing something like this http://<some-machine>:6565/axis2/services/API?wsdl and all requests are consumed using the same URL.

So is pipelining come in picture here?

Thanks,
Sumukh.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
As I said, pipelining is a client-side feature. So it depends on how the client code accesses the WS.
Sumukh Deshpande
Ranch Hand

Joined: Feb 17, 2008
Posts: 87

Tim,

I tried changing the scope in service.xml and finding some ways to make Axis multithreaded.

But I see sequential execution of requests. Do you have any other resource to tweak in for the same?

Thanks,
Sumukh.

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Have you checked that this is not a factor:

Tim Moores wrote:As I said, pipelining is a client-side feature. So it depends on how the client code accesses the WS.


Apart from that, and assuming that all server-side settings are correct, I don't know what else to try.
Sumukh Deshpande
Ranch Hand

Joined: Feb 17, 2008
Posts: 87

Tim,

To be more clear I am expecting multithreading support at server side .

What I want to say is, Servlet container handles all the requests multithreaded, same way SOAP engine or some responsible container in Axis 2 doing that.

I was looking into how the engine or container functions.

The question arose because I could see in logs that requests are completing one after another and we assumed that it may not be supporting multithreading.


May be what I assumed is wrong entirely.


Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Tim Moores wrote:Have you checked that this is not a factor:

Tim Moores wrote:As I said, pipelining is a client-side feature. So it depends on how the client code accesses the WS.
 
Consider Paul's rocket mass heater.
 
subject: Handling of Requests by Apache Axis 2