Re: concurrency problem with #include as template

"Carl H. Sayres" <[email protected]> Sun, 05 Feb 2006 09:03:31 -0500
Newsgroups gmane.comp.java.webmacro.user
Organization Data Representations, Inc.
Message-ID <[email protected]>
I tried adding the following to WebMacro.properties:

PropertyOperator.CacheManager=org.webmacro.resource.TrivialCacheManager

The error still occurs.

Carl


Eric B. Ridge wrote:

> My theory is that SimpleCacheManager.java is broken (http:// 
> cvs.sourceforge.net/viewcvs.py/webmacro/webmacro/src/org/webmacro/ 
> resource/SimpleCacheManager.java?rev=1.2&view=markup)
>
> It seems the get(query, helper) function would allow concurrent  
> readers to load and put the same resource in the _cache at the same  
> time.  Obviously, in the end we'd only have one entry in the map, but  
> we'd be loading the template twice.
>
> But I don't see how this explains getting the *wrong* template back.   
> I would think that concurrent.jar's ConcurrentHashMap would have to  
> be broken in order for this to happen.
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642