If you have used Flying Saucer \ HTMLRenderer jar in your code for “HTML to PDF” conversion then you have faced Thread leak in ImageLoadWorker and eventually it make your system down. Further if you will monitor your system in Java melody or Jmeter you will find out that each request for “HTML to PDF” conversion is leaving 5 threads open.
To solve this problem you just need to put a properties file( Eg : htmlrenderer.properties) some where in your system which is reachable from your application. Put below entries in properties file.
In your code at start of the application set the path of this file in system properties like given below.
//Absolute path of that file System.setProperties("xr.conf","D:\\htmlrendererconf\\htmlrenderer.properties");
As you have set workers count zero in properties file, it will generate zero unused threads and your problem is solved.
Other related posts are :
HTML to PDF conversion in JAVA | HTML to PDF example in JAVA
ThreadPoolExecutor and BlockingQueue with an example
Concept of AOP (Aspect oriented programming) every spring programmer use without knowing about it .
Top 10 spring interview questions and their answers. Spring basic concepts.
Please share this posts on Facebook,Linkeedin,Google+,Twitter by clicking on below icons.