Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330522 - Connection Leak using Dynamic Parameter
Summary: Connection Leak using Dynamic Parameter
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 3.7.0   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-17 16:33 EST by shah.amar CLA
Modified: 2011-05-26 13:32 EDT (History)
1 user (show)

See Also:


Attachments
Simple Report With Dynamic parameter (7.35 KB, application/xml)
2010-11-17 16:35 EST, shah.amar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description shah.amar CLA 2010-11-17 16:33:02 EST
Build Identifier: Eclipse Helios 20100917-0705

Build Identifier: Birt 2.6.1 GA

While testing our reports with Birt 2.6.1 we found that reports that uses dynamic list parameter sees connection leak once deployed on server and accessed through Birt Engine/Viewer API.

We user BIRT Engine API IGetParameterDefinitionTask to retrieve param definition and display it on our own UI. Once custom params screen is shown, user selects params values and submit for report. Report is again generated using BIRT Engine API RunTask & RunAndRenderTask.

We see connection leak each time the report with dynamic parameter is loaded to show its custom parameter input page.

Reproducible: Always

Reproducible: Always

Steps to Reproduce:
To demonstrate and debug issue, I have attached a simple report with connection to oracle, one data set, and one dynamic parameter using data set to fetch value from database. 
Below is the sample table used for this report
CREATE TABLE TEST_DATA
(
  ID    NUMBER,
  DATA  VARCHAR2(100 BYTE)                      NOT NULL
)

Insert into TEST_DATA (ID, DATA) Values (1, 'row_1');
Insert into TEST_DATA (ID, DATA) Values (2, 'row_2');
Insert into TEST_DATA (ID, DATA) Values (3, 'row_3');
COMMIT;

Deploy this report on server side birt viewer. Access the parameter defination of this report using IGetParameterDefinitionTask 
//Code snippet to fetch parameter definations
IGetParameterDefinitionTask task = this.birtEngine
					.createGetParameterDefinitionTask(rptDesign);
Collection params = task.getParameterDefns(true);

Each time the reports parameter definitions are loaded, there is connection opened to DB which is not released.

Keep watching oracless session using below query
SELECT COUNT(*) FROM v$session
Comment 1 shah.amar CLA 2010-11-17 16:35:55 EST
Created attachment 183354 [details]
Simple Report With Dynamic parameter
Comment 2 Xiaoying Gu CLA 2010-11-18 02:49:11 EST
Have you called task.close() after executing:
Collection params = task.getParameterDefns(true);

The connections are released in the task.close().
Comment 3 Xiaoying Gu CLA 2010-11-18 21:59:45 EST
Set as invalid based on comment#2.

Please feel free to reopen if there is any further issues.
Comment 4 Xiaoying Gu CLA 2010-11-18 22:00:02 EST
update status.