Discussions

EJB design: Best way to implement a transactional global object

  1. 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.

    I have heard of the singleton pattern but am unclear of its transactional integrity.

    Thanks all.
  2. DB Cache[ Go to top ]

    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.
  3. Have you considered using a clustered transactional cache, such as Coherence?

    Peace,

    Cameron Purdy
    Tangosol, Inc.
    Coherence: Easily share live data across a cluster!