Thursday, February 01, 2007

Eclipse BIRT 2.2 Webinar

Just wanted to drop a reminder that we will be doing a BIRT Webinar next week.
We will cover creating and deploying a BIRT Report. In addition we will be discussing and demonstrating some of the the 2.2 Features. For more information check out Eclipse Webinars.

Friday, January 19, 2007

BIRT 2.2 Milestone 4 Features

The BIRT Team released milestone 4 of the BIRT 2.2 release a this week.
The project is proceeding well. In this milestone we now have a BIRT tag library that allows embedding the BIRT Viewer in an existing web application complete with the ability to create a custom requestor page. This feature along with the BIRT Web Project should help with deployment of BIRT reports.

BIRT now leverages the WTP XML editor to display the XML for a report design within the Designer perspective. It is nice to see project cross-pollination in action.

The Word Emitter is now available for review. It is still early, but this project is shaping up well. Download the M4 release and have a look. Remember M4 requires the Eclipse 3.3 stack, which has a minimum requirement of Java 1.5.

To read more about the Milestone 4 release, read the
New and Notable.

Tuesday, January 16, 2007

BIRT Connection Pooling Continued

Since writing a post on using a supplied connection with BIRT, many changes have occurred in the BIRT Project. Specifically connection pooling has been addressed with a JNDI property. This property can be set when using a JDBC data source.




To see how this can be used with Tomcat, see the
BIRT Wiki

If this does not meet your needs, the Data Tools project now supplies an extension point that can be used to alter the behavior of the standard BIRT JDBC driver. This extension point named org.eclipse.datatools.connectivity.oda.consumer.driverBridge can be implemented to intercept calls made to the JDBC driver and override the standard ODA calls like getConnection. If a user did not wish to use JNDI for connection pooling, but wanted to supply a connection through another means, this could be implemented using this extension point.

The driverTye and bridgeId attributes must be supplied for the extension point. The driverType specifies the ODA driver to which the bridge is applied. For the JDBC driver this should be set to org.eclipse.birt.report.data.oda.jdbc.OdaJdbcDriver.
The bridgeId specifies the element id of the extension that implements the ODA runtime. When using this to change the behavior of the JDBC driver this should be an extension that extends the JDBC runtime.

If you are using the Report Engine API to run reports, a connection object can be passed to engine using the application context as follows:


//Report Engine API snippet
HashMap contextMap = new HashMap();
contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT, renderContext );

//add the connection object to the map
contextMap.put( "org.eclipse.birt.report.data.oda.subjdbc.SubOdaJdbcDriver", myconnectionobject );

task.setAppContext( contextMap );








A plug-in could then be created that implements the driverBridge extension point
to retrieve and use this connection. This plug-in would implement two extension points. The first should be the driverBridge and have values similar to the following:

<extension
id="org.eclipse.birt.report.data.testjdbc"
point="org.eclipse.datatools.connectivity.oda.consumer.driverBridge">

<bridge
driverType="org.eclipse.birt.report.data.oda.jdbc.OdaJdbcDriver"
bridgeId="org.eclipse.birt.report.data.testjdbc">
</bridge>
</extension>




The driverType specifies that the bridge will be applied to the BIRT JDBC driver.
The bridgeId specifies an element id of testjdbc, which can be defined in the same plug-in.

<extension
point="org.eclipse.datatools.connectivity.oda.dataSource">
<dataSource
odaVersion="3.0"
driverClass="org.eclipse.birt.report.data.testjdbc.MyJdbcDriver"
defaultDisplayName="Sample Driver Bridge"
setThreadContextClassLoader="false"
id="org.eclipse.birt.report.data.testjdbc"/>
</extension>




This extension must implement the org.eclipse.datatools.connectivity.oda.dataSource
extension point. This is the runtime portion of an ODA driver. Because this bridge is being applied to the BIRT JDBC driver we can just extend the OdaJdbcDriver and change the behavior of the setAppContext and getConnection methods. The code below illustrates retrieving the connection from the application context. If the connection object does not exist in the application context, the default JDBC driver is used to retrieve the connection. This will allow the plug-in to be used within the designer using the credentials supplied in the Data Source editor and when deployed to an application that supplies the connection through the application context.


package org.eclipse.birt.report.data.testjdbc;
import java.sql.Connection;
import java.util.HashMap;
import java.util.Properties;

import org.eclipse.birt.report.data.oda.jdbc.*;
import org.eclipse.datatools.connectivity.oda.IConnection;
import org.eclipse.datatools.connectivity.oda.OdaException;

public class MyJdbcDriver extends OdaJdbcDriver {

private Connection passedInConnection;


public void setAppContext( Object context ) throws OdaException
{
HashMap ctx = (HashMap)context;
passedInConnection = (java.sql.Connection)ctx.get("org.eclipse.birt.report.data.oda.subjdbc.SubOdaJdbcDriver");

}

public IConnection getConnection(String connectionClassName) throws OdaException
{
if( passedInConnection != null){
return new appContextDBConnection();
}else{
return new org.eclipse.birt.report.data.oda.jdbc.Connection();
}
}



private class appContextDBConnection extends org.eclipse.birt.report.data.oda.jdbc.Connection
{


public void open(Properties connProperties) throws OdaException
{
super.jdbcConn = passedInConnection;

}

public void close( ) throws OdaException
{
if ( jdbcConn == null )
{
return;
}
//should have call to return connection to the pool
jdbcConn.close();
jdbcConn = null;
}



}
}





The source for this plug-in is available here.

Thursday, December 21, 2006

BIRT 2 Milestone Features

The BIRT Team released milestone 2 of the BIRT 2.2 release a couple of weeks ago. With this milestone several new features were added that are very cool. We now have a BIRT Web Project Wizard that uses WTP technology to deploy the Web Viewer. Deployment is often stumbling block and ranks as one of the top questions on the BIRT News Group. Web integration will get more updates in later milestones. One in particular is the BIRT tag library, which will allow customized parameter pages and viewer attributes modifications.

Another very interesting project is the new ODA Project Wizards. Open Data Access drivers form the heart of data retrieval for the BIRT engine and are implemented using Data Tools Platform (DTP) project technology. Coding an ODA can be quite daunting to the initiate. These new wizards stub out a working sample ODA that can be customized to your needs. We will be blogging some more on this topic in the coming weeks.

These are just two of the projects in the 2.2 Project plan. Dynamic cross tabs and a new JavaScript editor are on the way. To read more about Milestone 2 features, take a look at the New and Notable Features for BIRT 2.2 Milestone 2

Saturday, December 02, 2006

EclipseCon Long Tutorials

EclipseCon 2007 is in March next year. This is a great chance to go out and learn about the various Eclipse projects and to meet the people that are working to build the Eclipse Framework. The content for that program is selected through an open process using a modified version of Bugzilla named EclipseZilla.

Reporting has been given five slots for long talks (one hour presentations). Unfortunately we have 10 really good looking proposals. If you are interested in helping to determine which reporting topics will be presented at EclipseCon, please go to EclipseZilla and vote for your favorites.

Wednesday, November 22, 2006

Eclipse BIRT Awareness survey

The BIRT team is looking to better provide information about BIRT to the community and is looking for the feedback in the form of an Eclipse BIRT Awareness survey.
Please take a few minutes to fill this out. Thank you!

Wednesday, November 15, 2006

EclipseCon 2007

EclipseCon 2007 is scheduled for March of this year.  The planning for the presentations is well under way.  I have been involved in the planning process and have been completely over-whelmed by the quantity and quality of the material that has been suggested for the conference.  At this point, the only categories that are formalized are the tutorial tracks.   

Tutorials will be offered on the first day of the conference.  They are divided into two categories, short tutorials are a two hour in-depth look at a particular subject.  The long tutorials are full day presentations with a 'hands-on' component.  For those of you who do not like conferences because they do not go into enough details, you should consider the EclipseCon tutorials.  Looking at the submissions, we have had:

- 18 long tutorial proposals for 7 slots 
- 63 short tutorial presentations for 39 slots

In terms of BIRT and the reporting project, there are five tutorial presentations that may be of interest:

The BIRT Long Tutorial is a full day demo/lab on how to work with the BIRT report development environment. 

Building Reports with BIRT 

 

The short tutorials include are all focused on in-depth BIRT topics to either extend or integrate BIRT into web or stand-alone applicatons.

Eclipse Chart Engine API and Integration  

Report Integration - The BIRT API's 

Extending BIRT 

Open Data Access - Extension framework for adding Custom Data Sources

 

Get Involved - Short and Long Talks

The EclipseCon committee will now be turning our attention on the content for the Long Talks (one hour) and Short Talks (10 minutes).  The BIRT team has been given 5 long talk slots and 6 short talk slots.  I would love to see talk proposals from our user community for both the long and short talks.  If you are using BIRT and would like to share your experience, please submit a talk HERE.