Hi Thomas,
Thanks for your quick response. Should i download the source
code again to get this patch or should i just copy the
below synchronized code and replace it in cleared() method
of SoftRefKey class.?
Thank you,
Vijay
On Tue, 01 Feb 2005 08:24:50 -0500, Thomas DeWeese
<[EMAIL PROTECTED]> wrote:
> Hi Vijay,
>
> I think the following patch will fix the problem. Please
> report back if it does! This would be a very odd case to happen
> but if your server was very busy I could see it happening.
>
> Index: sources/org/apache/batik/util/SoftReferenceCache.java
> ===================================================================
> RCS file:
> /home/cvs/xml-batik/sources/org/apache/batik/util/SoftReferenceCache.java,v
> retrieving revision 1.8
> diff -w -u -r1.8 SoftReferenceCache.java
> --- sources/org/apache/batik/util/SoftReferenceCache.java 18 Aug
> 2004 07:15:50 -0000 1.8
> +++ sources/org/apache/batik/util/SoftReferenceCache.java 1 Feb
> 2005 12:36:38 -0000
> @@ -174,11 +174,17 @@
> if (cache == null) return; // Can't really happen.
> synchronized (cache) {
> Object o = cache.map.remove(key);
> - if (this != o)
> + if (this == o) {
> + // Notify other threads that they may have
> + // to provide this resource now.
> + cache.notifyAll();
> + } else {
> // Must not have been ours put it back...
> // Can happen if a clear is done.
> cache.map.put(key, o);
> }
> +
> + }
> }
> }
> }
>
> Vijay Kumar V wrote:
>
> > We are using batik api to generate images from svg content.
> > However, when we issue a multi threaded request to generate the
> > images, it is getting blocked in
> >
> > org.apache.batik.util.SoftReferenceCache.requestImpl method ( According
> > to the stack trace)
> >
> > Im attaching the stack trace with this email...
> >
> > Please let me know what needs to be done.
> >
> > Im using batik 1.5.1 on windows 2000 machine.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]