Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Mona Mehta   on Jun 29 In Java Category.

Question Answered By: Naomi Lee   on Jun 29

This is not synchronization. You are talking about data propagation or data sharing

Re Shared memory: How do you "synchronize" access to the shared memory? here you need a "synchronization" method.

Re Messaging: If you modify your data and notify other components (possibly locally in other clusters) you might think that now everybody have the same data. Now consider that one of the receivers update the data and that should also notify others and so on. This way all the components within your system  will spend all the time notifying each other.

If you choose messaging you have two choices

1. to wrap the data and pass it along. So if someone updates it, it has to notify others again and so on
2. persist data in data source and then notify others to pick up the latest data. which again the above happens.

here are a few articles that you might find handy


apart from these, I think the best way to synchronize data access in such framework is the use of transactional syncrhonization. another method which is used within entity beans is by the use of ejbLoad and ejbStore which are called during lifetime of entity beans upon moving from state to state. and the other is by implementing SessionSynchronization interface.

initially I thought your intention is to synchronize access to the shares data (wherever it is), but now I might be confused as you are talking merely about sharing data and data propagation. am I correct?