• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Synchronizing RMI and JMS communication channels

 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic