Yes, request will do it. It is just very expensive. What I would really need
is per-thread instantiation, because the instantiation is, in this particular
case, very expensive, so doing it repeatedly on every request is just
wasteful (CPU, resources, memory etc.).

How about creating a specialized servlet (by extending AxisServlet) for a
particular service? The init method would instantiate the object. What would
I need to do send the request to this object? I'll start tracing from
doPost/doGet methods, but am asking just in case there someone knows of a
good method to override (reportServiceInfo, invokeEndpointFromGet etc.?).

Thank you,
Branko

-----Original Message-----


I wouldn't expect session scoped services to get created for each thread,
since they need to stay around for the life of the user session (which may
span multiple requests). Request scope seems to be the one you want. Servlets
create a new thread for each request and, with request scope, each request
causes a new service object to be created. 

Tony 



Hi,

There are three choices for deployscope attribute of the axis-wsdl2java ant
task. Those are "Application", "Session" and "Request".

When "Application" is chosen, the SOAP implementation class is a singleton,
i.e. there is only one instance for all axis servlet threads.

"Session" and "Request" choices cause instantiating of the SOAP
implementation class on demand -- as they should.

Is there a way to get the SOAP implementation class instantiated once per
axis servlet thread? I hoped that "Session" might do this, but it doesn't.

Many thanks,
Branko

Reply via email to