This content has been marked as final.
Show 1 reply
-
1. Re: A Simple Question
manik Aug 26, 2009 11:27 AM (in response to evpgud)You could implement this using a mix of a JMS queue and Infinispan.
E.g., incoming requests check infinispan for the state. If it is not there it puts a request on the queue with all the necessary parameters. You then have a MDB which processes this queue. As the MDB reads stuff off the queue, it first checks the cache to see if the key is present. If it is, it continues as per normal. Otherwise, it retrieves state from the web service and adds this to the cache with a strict timeout (to make sure the state expires and doesn't live in the cache forever). Your request threads, in the meanwhile, have registered a listener on the cache so is notified of the added key and is then able to proceed.