Little more thought on this subject ;)
Like i said in a previous mail, i understand fully now what Gavin is doing
(and why he is doing it) with the ReadWriteCache implementation.
However i believe such implementation which is 100% safe got some tradeoff
( each method are synchronized ), i am under the impression (Wrong ?) that
for a web based application (only pretty short transaction / if a tx begin
at t0 it will end before a tx that started at t1) that do not manage
sensitive information like banking records such security level is a bit
overkill.
It could be usefull in such case to be able to use a lightweight version of
the ReadWriteCache that does not need to synchronize each of its method. It
will ensure the best performance and can be distributed with a jcs lateral
caching.
I am think about this:
(1) Coarse grained approach : configure hibernate to use a custom
CacheConcurrencyStrategy for every cached class:
Something like this in the hibernate properties:
hibernate.jcs_cache.read_only_concurrency_strategy
cirrus.hibernate.cache.ReadOnlyCache
hibernate.jcs_cache.read_write_concurrency_strategy
cirrus.hibernate.cache.ReadWriteCache
(2) Fine grained approach : enhance the <jcs-cache> to support a
concurrency-strategy attribute:
Something like this in the metadata info:
<class name="eg.Foo">
....
<jcs-cache usage="read-write"
concurrency-strategy="cirrus.hibernate.cache.ReadWriteCache"/>
</class>
What do you think about this ?
Regards
Chris
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel