wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Synchronizing RMI and JMS communication channels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Synchronizing RMI and JMS communication channels" Watch "Synchronizing RMI and JMS communication channels" New topic
Author

Synchronizing RMI and JMS communication channels

Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
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
 
 
subject: Synchronizing RMI and JMS communication channels
 
Similar Threads
RMI v/s JMS
how to get message property Using Spring JMS?
Object replication
Will a JIT optimize away a class?
JMS vs. RMI vs. EJB vs. ...