Caching Pattern

Discussions

EJB design: Caching Pattern

  1. Caching Pattern (3 messages)

    I am trying to find a good caching design pattern that would help us in dealing with information that is updated once a day.

    We have created entity beans that cache pricing information. The prices change once a day but at unknown intervals. We would like to be able to have an external application cause these entity beans to update their cache (i.e. a java client is kicked off independently and tells the EJBs to update their cache).

    I have thought of creating a JMS topic for pricing entity beans to subscribe to and a standalone java JMS publisher that sends an "update_cache" message to all the pricing EJBs.

    Is there an existing design pattern that solves this problem? Or can anyone think of a better (maybe a non JMS) way of doing this?

    Thank you,
    Reza Golgoon

    Threaded Messages (3)

  2. Caching Pattern[ Go to top ]

    Is it critical that when the update occurs the cache is refreshed immediately?

    --
    Tinou
    www.tinou.com
  3. Caching Pattern[ Go to top ]

    I have the similar problem too, but the update is at any time.
  4. Caching Pattern[ Go to top ]

    Hi Tinou,

    Yes. The caches need to be updated as soon as the prices are final in our data sources. This is why we need a triggering mechanism.

    Reza