cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatic Invalidation of Entity Bean Cache

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

SvetoManolov
Employee
Employee
0 Kudos

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

Former Member
0 Kudos

Hi Svetoslav,

I thought about porting an application from JBoss3.2.5 to SapWeb AS. JBoss supports caching of Entiy Beans across applications. You can mark an Entity Bean as read only with the effect that the cache isn't validated until you issue a JBoss specific invalidation command.

Cheers,

Heiko

SvetoManolov
Employee
Employee
0 Kudos

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