我想为应用程序管理员创建一个功能,以便能够停止并从前端启动web服务,而不必关闭整个应用程序。春季 - 如何从Web应用程序中停止并启动Webserice?
该应用程序有各种其他接口,屏幕和作业,需要运行的所有时间。 Web服务必须关闭以进行一些数据维护工作,并且在完成后需要重新启动。网络服务被少数第三方应用程序占用。
应用程序使用Spring 3.0.5构建。
我需要以某种方式获取控制器中的web服务对象(?)并触发停止/启动。
春天-config.xml中
<wss:binding url="/wss/shipRequest.wss">
<wss:service>
<ws:service bean="#shipRequestWS">
</ws:service>
</wss:service>
</wss:binding>
<bean id="shipRequestWS" class="com.xxx.ShipRequestService">
<property name="shipRequestBO" ref="shipRequestBO" />
</bean>
服务
@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)
public interface ShipRequestService extends java.rmi.Remote {
WebService methods...
}
谢谢Arne。我通过ClassPathXmlApplicationContext创建上下文并能够启动/停止 –