Bug 171640 Opened db connection after report generation
1. Use report engine for rendering report (not under eclipse ide) 2. Use JNDI to obtain JDBC connection. My app now working under JBoss appserver. But using of JNDI to obtain db connection not an important to reproduce its bug. 3. After calling myRunAndRenderTask.run(), engine opens new db connection and after run() call has been finished db conection still open.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RunAndRenderTask.java
{
			IContentEmitter emitter = createContentEmitter( );
			Report reportDesign = executionContext.getReport( );
			ReportExecutor executor = new ReportExecutor( executionContext,
					reportDesign, null );
			IReportExecutor lExecutor = new LocalizedReportExecutor(
					executionContext, executor );
			executionContext.setExecutor( executor );
			initializeContentEmitter( emitter, executor );
			
			if ( ExtensionManager.NO_PAGINATION.equals( pagination ))
			{
				HTMLTableLayoutNestEmitter tableLayoutEmitter = new HTMLTableLayoutNestEmitter(
						emitter );
				lExecutor.execute( reportDesign.getReportDesign( ),
						tableLayoutEmitter );
			}
			else
			{
				String format = executionContext.getOutputFormat( );
				boolean paginate = true;
				if ( FORMAT_HTML.equalsIgnoreCase( format ) ) 
				{
					if ( renderOptions instanceof HTMLRenderOption )
					{
						HTMLRenderOption htmlOption = (HTMLRenderOption) renderOptions;
						paginate = htmlOption.getHtmlPagination( );
					}
				}
				synchronized ( this )