开发者

Stop/disable specific webservice under Apache

I have jBoss running on Linux that runs a Java SOAP webservice. I normally deal with none of those on a day-to-day basis, so can't give many specifics. The webservice is a heartbeat for another part of the sys开发者_如何学Gotem. Given the design of the system (which we are going to be changing soon, hopefully), we cannot take the server "out of rotation" to patch it. What I'm wondering is there a specific way to disable only the webservice running the heartbeat while allowing the other web stuff to continue?


It sounds like you cannot touch the WAR and there's no easy way to stop a single service in a WAR without un-deploying it or a code change. This is a bit of a shot in the dark, but you might be able to separately deploy a Tomcat Valve at the container level which intercepts http requests bound for (i.e. matching the URI) the heartbeat web service. When you want to re-enable the heartbeat, you un-deploy the valve.

It doesn't stop the heartbeat, but you can stop it from getting requests.


If it lives in its own .war, remove the .war from $tomcat_home/webapps - the service will come down (and the rest will stay up).


If there is any load balancer in the front, you might be able to temporarily block requests at that level. Or if minor code changes are possible, you could introduce a new property in properties-service.xml (BLACKOUT_PERIOD_ACTIVE or something), and have you web service check it before responding. If the blackout period is active, you can plug-in logic accordingly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜