Hello Lars,

1) For isolation level:  The data in the cache is considered to be
read-only, and is only refreshed when expired and therefore reretrieved.  So
the isolation level of the underlying DBMS will apply.  In fact, writes may
be slightly *more* isolated from reads, due to the small latency in cache
expiration that may occur.

In this pattern, writes are not made based on reads from the cache.  "Read
with intention to write" requires a DB read, precisely so that we do not
have to write isolation level code at this level.  Most bang for the buck.

2) That is a very good point, one that I forgot to include!  All this
caching is optional (data can always be read from DB) so implicit GCing is
fine, helps us manage cache size.

----- Original Message -----
From: "Lars Fredrik Smedberg" <[EMAIL PROTECTED]>
To: "'Lawrence Bruhmuller'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 11:41 PM
Subject: RE: New J2EE design pattern


> Hi!
>
> How do you handle the following topics:
>
> 1) Lets say the DAO is involved in a transaction with a isolation level
that
> means that data should not be visible to clients outside the transaction
> until the transaction is commit? The solution to this could be to let the
> cache implement XAResource and use transaction that span the jdbc calls
and
> the calls to update the cache.
>
> 2) To decrease the impact on the heap space the cache could use a map that
> extends abstractmap and uses SoftReferences.
>
> Thanx
>
> Lars-Fredrik Smedberg
> Senior Architect, Mynta Management & IT AB
>
> -----Original Message-----
> From: Lawrence Bruhmuller [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 06, 2001 02:38 AM
> To: [EMAIL PROTECTED]
> Subject: New J2EE design pattern
>
>
> Hello all, I just wanted to call your attention to a new J2EE design
pattern
> that I have posted on TheServerSide.com, dealing with strategies for
caching
> business data and thereby speeding up your application.
>
> Please don't hesitate to provide any feedback (either to me directly or
> using the forum at TSS).
>
> http://www.theserverside.com/patterns/thread.jsp?thread_id=10610
>
> Regards,
>
> Lawrence Bruhmuller
>
>
===========================================================================
> 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