File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Is it possible to tell Axis to reuse a connection? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Is it possible to tell Axis to reuse a connection?" Watch "Is it possible to tell Axis to reuse a connection?" New topic
Author

Is it possible to tell Axis to reuse a connection?

Yuriy Zilbergleyt
Ranch Hand

Joined: Dec 13, 2004
Posts: 429
Hello,

I have a java program, written by someone else, that uses Axis generated stubs to invoke methods on a web service. The problem is that there is a large loop, and a method gets invoked with each iteration, creating a new connection each time. Is there a way to make subsequent iterations reuse the same connection?

Here is the general structure of the loop and the code it executes:

where it all begins:


MyThread.run():


MyProxy.invoke:


MyPortBindingStub.receiveEvent(...) (mostly auto-generated):


As you can see, the code tries to keep no more than 20 invocations going on at once. I know that since there's no synchronization it's possible for more than 20 calls to happen concurrently, but that's no big deal. The problem is, how to make sure that all the calls in the for loop reuse the same connection? I'm assuming that even if proxy.invoke() uses the same Port stub for every call, a new connection will still be created each time.

Could someone familiar with Axis offer any advice?

Thank you,
Yuriy
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Is it possible to tell Axis to reuse a connection?
 
Similar Threads
Axis 1.4 Problem with DIME attachment
Axis 1.4 username/password auth with stubs
org.apache.axis.client.Call 's invoke method
Exception using Web Client
Retrieving an SOAP Attachement with Axis