Home
Analytics
Birt JDBC database Connection
amitshende
hi i am using hibernate database and Birt 3.7 indigo.
i have created Data source and Data set for my report Design.
how do i close my JDBC database connection after completing .rptdesign report design ???
if i open report design 10 times in birt viewer will it hit JDBC database 10 times ?????
is birt automatically close JDBC connection ???
Thnx.
Find more posts tagged with
Comments
JasonW
If you are using the JDBC connection it should close automatically. You have the option to use JNDI as well. For every separate report a new connection will be used.
Jason
amitshende
Thnx Jason
Suppose i do not close a report and keep opening more reports
So, for every report i open, there will be new connection and the previous connection would get close or the previous connections will still be open???
is there any way other than JNDI to restrict BIRT JDBC connections ???
CBR
Hi,
report generation with BIRT is opening all database connections producing the output (as html or pdf) and closing the connection. Thse steps are done each time you let BIRT generate a report. Generating a report is something like a atomic action (in sense of the BIRT API). It's not possible to pause the generation. That's why BIRT can't even let the connection open while you are viewing a report.
If you don't want to let BIRT open a connection to your database you can use JNDI (that's what Jason mentioned). When using JNDI database connections are pooled by a container and injected into the report generation phase. Opening and closing connections will be done by the container but nevertheless each report generation process will request a connection from the container which will be used by just this process. After the process finished report generation it will just give back the connection to the pool.
CBR
Hi,
report generation with BIRT is opening all database connections producing the output (as html or pdf) and closing the connection. Thse steps are done each time you let BIRT generate a report. Generating a report is something like a atomic action (in sense of the BIRT API). It's not possible to pause the generation. That's why BIRT can't even let the connection open while you are viewing a report (report generation already ended the time you see the first bit of your report output).
If you don't want to let BIRT open a connection to your database you can use JNDI (that's what Jason mentioned). When using JNDI database connections are pooled by a container and injected into the report generation phase. Opening and closing connections will be done by the container but nevertheless each report generation process will request a connection from the container which will be used by just this process. After the process finished report generation it will just give back the connection to the pool.
legolas
As far as my knowledge goes, the datasets are populated first and the rendering kicks off.
When there are 4 data sets in a report, are the datasets populated sequentially or are they populated paralelly ?
I am using a connection pool to access the database.
CBR
From my knowledge datasets are populated the time they are used (the time BIRt has to process a element that is bound to the dataset). If you add 10 datasets to a report and not using a single one there is no sql statement executed on your database. (i m not sure but i even think that birt does not connect to the database because it simply has no need to do that...but that might be wrong)
legolas
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="84246" data-time="1318937804" data-date="18 October 2011 - 04:36 AM"><p>
From my knowledge datasets are populated the time they are used (the time BIRt has to process a element that is bound to the dataset). If you add 10 datasets to a report and not using a single one there is no sql statement executed on your database. (i m not sure but i even think that birt does not connect to the database because it simply has no need to do that...but that might be wrong)<br /></p></blockquote>
Thanks for the comment. I went back and looked at the basics and i realized i got it wrong.<br />
<br />
The report body processing is done from the top level report item and continues from the top to bottom and left to right. This information can be seen in the OUTLINE section of the rpt under BODY. <br />
<br />
<strong class='bbc'>"So a dataset is hit only when a report item binded to it comes up for processing. The datasets are populated sequentially there is no parallell processing involved in birt !!! "</strong><br />
<br />
Please let me know if i am wrong with my last statement
Trace11
hi, sorry my question is little bit different to this thread but i am trying to run Eclipse+BIRD on Windows and get it connect to Linux server where CiviCRM is. i installed MySQL Connector/J JDBC driver from
http://dev.mysql.com/downloads/connector/j/5.1.html
[nofollow] set JAVA_HOME and CLASSPATH, restarted Windows box just in any case. but i keep getting "org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: com.mysql.jdbc.Driver" when i try to test connection in Data Source using Driver Class: com.mysql.jdbc.Driver. would you have any hint for me that would get me out of this?
johnw
Did you copy the JDBC driver JAR to the <eclipse>/plugins/org.eclipse.birt.report.data.oda.jdbc_<version number>/drivers folder?