You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2011/05/18 08:39:00 UTC

DO NOT REPLY [Bug 51150] Add DecimalFormatCache.clean() method to prevent memory leak with Tomcat

https://issues.apache.org/bugzilla/show_bug.cgi?id=51150

--- Comment #1 from Unlogic <un...@unlogic.se> 2011-05-18 06:39:00 UTC ---
I checked out the code from the FOP 1.0 tag and looked at the
DecimalFormatCache.

>From what I can see this type of caching using ThreadLocal will not work well
any environment where thread pools are used and where applications can be
deployed and undeployed in runtime such as J2EE web applications.

A workaround until a fix is out is to create a new thread for each PDF
generation and the let the thread from the thread pool call the join() method
on the new thread. This resolves the memory leak but on other hand makes the
cache essentially pointless.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.