You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Johan Basson <Jo...@ariel.co.za> on 2001/02/27 12:58:19 UTC
Static Variables in a soap Object
Hi
We are using soap to comunicate between a delphi and a java application. The
java application
is using another application for storing and retrieving documents (Lets call
it application B). The problem is , when their is more than two request from
the java application to application B at the same time, then the java
application returns a error or crash. We have esstablished that this is
caused by the other application (Application B). We need to keep track of
the current requests from the soap server that is being processed and handle
them.
My questions is this:
1.When a object is instantiated inside the soap server, when is this object
destroyed in terms of
the soap handler?
2.Does soap instantiate more objects for each request or does it use the
same object all over again?
Thanks.
Johan.
RE: Static Variables in a soap Object
Posted by Yoann Pannier <yo...@fluxus.net>.
from what i have seen in SOAP source code, it depends on the scope you specified in your DeploymentDescriptor.xml for your SOAP
service provider. You can specify an 'Application', a 'Session' or a 'Request' scope.
if you specified 'Application', then your object is instanciated only once, stored and reused for every request you do.
if you use a Request scope, instances are not stored at all and you will get a fresh object for each request.
note: if you make a change in your deployment descriptor file, you have to re-deploy your service.
yop
> -----Original Message-----
> From: Johan Basson [mailto:JohanB@ariel.co.za]
> Sent: Tuesday, February 27, 2001 12:58 PM
> To: soap-user@xml.apache.org
> Subject: Static Variables in a soap Object
>
> [...]
>
> 1.When a object is instantiated inside the soap server, when is this object
> destroyed in terms of
> the soap handler?
> 2.Does soap instantiate more objects for each request or does it use the
> same object all over again?
>
> [...]
RE: Static Variables in a soap Object
Posted by Yoann Pannier <yo...@fluxus.net>.
from what i have seen in SOAP source code, it depends on the scope you specified in your DeploymentDescriptor.xml for your SOAP
service provider. You can specify an 'Application', a 'Session' or a 'Request' scope.
if you specified 'Application', then your object is instanciated only once, stored and reused for every request you do.
if you use a Request scope, instances are not stored at all and you will get a fresh object for each request.
note: if you make a change in your deployment descriptor file, you have to re-deploy your service.
yop
> -----Original Message-----
> From: Johan Basson [mailto:JohanB@ariel.co.za]
> Sent: Tuesday, February 27, 2001 12:58 PM
> To: soap-user@xml.apache.org
> Subject: Static Variables in a soap Object
>
> [...]
>
> 1.When a object is instantiated inside the soap server, when is this object
> destroyed in terms of
> the soap handler?
> 2.Does soap instantiate more objects for each request or does it use the
> same object all over again?
>
> [...]