I have a CXF-based web service with a one-way method say:
Service.report()
While a report() from a client is being processed, I want to make another incoming report() from the same client IP wait till the first request is processed. Seen from a client, report() is an atomic operation and successive calls to report() should be processed sequentially.
How can I best implement this locking mechanism? Will I need to implement a per-client queue or is there a simple way to accomplish this?
You don’t need a full blown queue for this. A simple object synchronisation should work