怎么实现在axis中定义一个全局变量?
我想要在服务端实现当有用户请求时,这个全局变量就加1.另外再向大家请教一个问题,当客户端每次访问我的webservice服务时,是不是服务器端的服务类总是要实例化一个对象,而不象在web应用中的servlet在第一次请求是实例化对象,以后的请求只是它的线程而已.那么在axis中的服务类中能实现多线程么?谢谢!!!!!! 问题点数:20、回复次数:4Top
1 楼georgehoul(啊哈)回复于 2006-07-18 11:24:52 得分 0
mark 一下Top
2 楼zgysc(翠湖寒)回复于 2006-07-18 14:36:57 得分 0
写一个静态变量Top
3 楼slaser(沧海月明)回复于 2006-07-21 11:05:29 得分 0
这个可能可以配置的。Top
4 楼slaser(沧海月明)回复于 2006-07-21 17:39:32 得分 0
Scoped Services
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 <parameter> to your service like this (where "value" is request, session, or application):
<service name="MyService"...>
<parameter name="scope" value="value"/>
...
</service>Top




