Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
extra threads after RunAndRenderTask
liaojinmei
I am running visual VM to observe the thread count change of my web app with Birt. I found after I called the following method, my thread count is up by 2. Is this as expected? Is there anyway that I can kill those two threads before I uninstall my extension? Here is the method. It simply opens up a design and run and render it. After that, I closed the task. I would expected all the resources released and threads ended after I call the task.close. But apparently not:
public void runReport(String reportName, HttpServletResponse resp) throws Exception{
IReportRunnable design = Plugin.reportEngine.openReportDesign(context.getRealPath("/reports")+"/"+reportName+".rptdesign");
IRunAndRenderTask task = Plugin.reportEngine.createRunAndRenderTask( design );
Map appContext = task.getAppContext();
Connection con = db.getConnection();
appContext.put("OdaJDBCDriverPassInConnection", con);
//set output options
HTMLRenderOption options = new HTMLRenderOption();
options.setImageHandler(new HTMLServerImageHandler());
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);
options.setOutputStream(resp.getOutputStream());
options.setBaseImageURL("images");
options.setImageDirectory(context.getRealPath("/images"));
task.setRenderOption(options);
//add the connection object to the map
//run report
task.run();
task.close();
}
Find more posts tagged with
Comments
There are no comments yet