What is the best way to implement a transactional global object that is accessible to multiple sessions/clients. For example, I have a large amount of clients that need have a synchronized view of a few tables in the DB. I want to store those tables in an XML data structure (essentially caching the up to date data) thus avoiding multiple database hits from the client everytime another client updates data.
- Posted by: mark greene
- Posted on: August 18 2003 15:18 EDT
I have heard of the singleton pattern but am unclear of its transactional integrity.
- DB Cache by Ian Mitchell on August 18 2003 18:24 EDT
- Best way to implement a transactional global object by Cameron Purdy on August 19 2003 09:35 EDT
As per the RMI singleton pattern discussed recently, there isn't any.
You can check to see if your DB supports caching natively. In a sense this is where it belongs (i.e. on the DB server, not the app server). Having said that, the recent trend is away from caching altogether and towards clustering. For example, Oracle pulled their DB caching capability from Oracle9iAS in favour of a clustering approach or DB replication.
Have you considered using a clustered transactional cache, such as Coherence?
Coherence: Easily share live data across a cluster!