Steve Carton wrote:
I'm trying to figure out creating a client and have code which creates a new Service object as follows:
Service s = new Service();
And then creates a call and so forth. This all works okay, but it is
very slow -- the Service constructor seems to take as much as 10
seconds to complete.
Is there a better way to establish the service so that the time can be reduced?
Steve Carton
I posted the same problem last week (Bad Performance When Restarting The Server) and Mr Tony answered me that :
"The Axis servlet loads web services on request, depending on the scope. As you have session scope, the web service class will be instantiated once for each session. So the first call, in that session, will take longer than subsequent calls.
I'm not aware of any configuration that will cause Axis to instantiate the class ahead of time. With application scope, you may be able to load the web service from another servlet (other than the Axis servlet) in the application, though I'm not certain of this.
Tony"
So, if you're using the session scope, you must be in front of the same "problem" than mine but it only happens when you restart the
server. Every other calls are really quicker and this for every user (I've made tests deploying my client app on some machine of my network).
As far as I'm concerned, I don't think that it'll be a problem for the client , he'll think that its connection to the internet have a problem maybe ;-) .
Karim
