[Logo]
Forums Register Login
Synchronizing RMI and JMS communication channels
My trading application is working as follows:
When a user "logs in" (I'm using this as a generic term for initiating interest in a particular data set), an RMI call is made to the EJB server to get a snapshot of the data set.
Changes to the data set (e.g. add/remove) are communicated through JMS. The client registers as a JMS listener just before making the above RMI call.
Clearly there is a synchronization issue. If I get the remove message before I get the item in data set, I'll ignore the remove message, and subsequently have an entry which will never be removed.
Surely there is a pattern for avoiding this. Anyone fmailiar with it?
I could save all update messages between when I send the first registration message, and when I actually get the data (by which point I'm confident that I will be receiving updates) and simply "replay" them once the data set has been retrieved, but this seems like a band aid. Any other ideas?
--Mark
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss


This thread has been viewed 570 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 22, 2018 14:38:41.