You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by Shahzad Younas <sh...@bananacomputers.com> on 2005/03/17 18:13:18 UTC

Instance Problem..

Hi,
 
I was wondering, lets say I have a method in my service class:
 
class Service
{
    private int tmp=1;
 
    ResponseDocument addOne(RequestDocument)
    {
        tmp++;
        return new ResponseDocument(with a field containing "tmp")
    }    
}
 
if i call this method once (for a given resource ID) (by call, i mean send a
SOAP Request containing the RequestDocument) , i will get a value of 2
returned.
Ifi call it again, with the same resource ID, will i get a value of 3
returned? IE by state, do we mean that all variables for the service are
preserved for each resource ID?
 
I am abit confused. I know ResourceProperties should hold stateful values,
but I need for the service private variables to be maintained too.
 
Thanks
Shahzad