We want to implement a overload mechanism on our axis Web Service.
Basically we want to reject the incoming the SOAP requests when the TPS(Transactions Per Second) value reaches a specified value say 100 or 150.
To make this we need to count the number of requests received and the number of responses sent.
Could you please suggest me on where to start for this implementation? How to count the requests and responses?
Many Thanks,
Sekhar
I think you should implement the message counting and dropping in a handler. Here’s a good description in the Axis documentation of how to write and register handlers in your web service: Using handlers in JAX-WS Web services.
Basically, what you do code-wise: You create a handler class implementing
javax.xml.ws.handler.soap.SOAPHandler. In thehandleMessage(...)method, you count the incoming messages and, as the Javadoc for the Handler interface indicates, returnfalseif the overload limit is reached.Hope this helps you to get started!