Application Scope in Axis

Posted: September 22nd, 2004 | No Comments »

I finally found out to create a singletong shared object in Axis. From the Axis User Guide:

Axis supports scoping service objects (the actual Java objects which implement your methods) three ways. “Request” scope, the default, will create a new object each time a SOAP request comes in for your service. “Application” scope will create a singleton shared object to service all requests. “Session” scope will create a new object for each session-enabled client who accesses your service. To specify the scope option, you add a to your service like this (where “value” is request, session, or application):

&lt;service name="MyService"...&gt;<br />
  &lt;parameter name="scope" value="<em>value</em>"/&gt;<br />
  ...<br />
&lt;/service&gt;

Comments are closed.