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
{
					if ( !executionContext.isCanceled( ) )
					{
						layoutEngine = createReportLayoutEngine( pagination, renderOptions );
					}
				}
				if ( layoutEngine != null )
				{
					CompositeLayoutPageHandler layoutPageHandler = new CompositeLayoutPageHandler( );
					OnPageBreakLayoutPageHandle handle = new OnPageBreakLayoutPageHandle(
												executionContext );
					layoutPageHandler.addPageHandler( handle );
					layoutPageHandler.addPageHandler( new ContextPageBreakHandler(
							executionContext ) );
					layoutEngine.setPageHandler( layoutPageHandler );
					CompositeContentEmitter outputEmitters = new CompositeContentEmitter(
							format );
					outputEmitters.addEmitter( emitter );
					outputEmitters.addEmitter( handle.getEmitter( ) );
					layoutEngine.layout( lExecutor, outputEmitters, paginate );
				}
			}
			closeRender( );
			closeFactory( );
		}
		catch ( EngineException e )
		{
			throw e;
		}
		catch ( Exception ex )