Hi,

I created this simple class

public class MyService
{
   int c;
    MyService(){
     c=0;

    }
    public int serviceMethod()
    {
        c++
        return c;
    }
}

And I deployed it into axis using this descriptor

<deployment xmlns="http://xml.apache.org/axis/wsdd/";
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

 <service name="MyService" provider="java:RPC">
  <parameter name="className" value="MyService"/>
  <parameter name="allowedMethods" value="*"/>
  <parameter name="scope" value="Application"/>

 </service>

</deployment>

The axis user Guide mentions that scope="Application" implies that all
the request would be served from the singleton object.

"Application" scope will create a singleton shared object to service
all requests"

However every time I call the service the value returned is 1 which
means that a new object is being created every time.
Please suggest.

Thanks and Regards
Gaurav

Reply via email to