Skip to Content
author's profile photo Former Member
Former Member

Programmatic Invalidation of Entity Bean Cache

Hi,

I wonder if there is a way to trigger the invalidation of the WASs Entity Bean cache from a Java program.

Does anybody know anything regarding this issue?

Regards,

Heiko

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 23, 2005 at 10:52 AM

    Hi Heiko,

    in fact the CMP Entity beans' cache is tracking the transactional changes, i.e. no data is cached in memory after a transaction commit/rollback. A new transaction always reads the last committed data from the database.

    With this architecture there is no need of cache invalidation. The only thing that has to be done is transaction rollback and the transaction's changes cached in the memory will be lost.

    Does this answer your question? What do you exactly need from invalidation of the cache?

    Regards,

    Svetoslav

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Heiko,

      the SAP EJB container does not support such kind of caching. We support a kind of "read only" entity beans, but you can mark a bean as "read only" only if it will never be updated. Any attempt for update will produce an exception. As a comparison, the JBoss "read only" options can be set for beans that are rarely updated.

      This explains why there is no invalidation command in SAP Web AS as well.

      We plan the implementation of a similar entity beans cache for the next releases.

      I hope this is not a showstopper for your porting project. This kind of caching is usually used with performance reasons, so the fall-back variant would be to define the entity beans as "regular" instead of "read only".

      HTH

      Regards,

      Svetoslav

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.