You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Branko Peteh <br...@sidestep.com> on 2004/09/08 06:30:31 UTC
How to get one object per thread?
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
Re: How to get one object per thread?
Posted by to...@gsk.com.
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