Basically, EJB was not made for read-only data. EJB provides a transactional framework 
for data access. Using the weblogic ReadOnly concurrency strategy, you�re basically 
saying you don�t gie a damn whether or not the data in the cache is stale. There is no 
way of knowing whether the data in the cache is updated 'by other means'.

You could however, if your database supports it, lookup the cached home and call 
invalidate() (see wls docs) on it, inside a trigger.

Hi Pedro,

I don't think there is a "Read Mostly" cache for JBoss.  I am using Weblogic
8.1 and they have a "ReadOnly" feature that provides a cluster-wide cache.
For JBoss, you can use the Seppuku pattern
(http://dima.dhs.org/misc/readOnlyUpdates.html). However, read-only pattern
is difficult to implement if you have other applications that update the
same database at the same time.  For those who use read-only patterns, how
do you invalidate the cache if some external systems update the database?
Do you use database triggers?

Hopes this help,

Vincent

-----Original Message-----
From: Pedro Salazar [mailto:[EMAIL PROTECTED]
Sent: Friday, November 14, 2003 7:54 PM
To: [EMAIL PROTECTED]
Subject: how to implement "READ MOSTLY" CACHE


Greetings,

I'm using XDOCLET to generate my EJB descriptors and I would like to
know how can I define a polite of "read mostly" cache for my entity
beans?

I now that I should have my entity beans mapped as xxxRO and xxxRW.
However, I don't know if I have to *duplicate* my beans java classes,
and I don't know also how to define the commit isolation level for my
entity beans (CMP).

Any hints would be very appreciated :-)

I'm using JBOSS...

regards,
Pedro.
--
PS
[EMAIL PROTECTED]
PGP:0E129E31D803BC61

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to