Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Data sources with non-serializable data and data set caching
Data sources with non-serializable data and data set caching [message #491785] Thu, 15 October 2009 20:16 Go to next message
Andreas Mayer is currently offline Andreas MayerFriend
Messages: 32
Registered: July 2009
Member
Hi,

I am using a home-made ODA driver, which provides data sources for EMF
models. The driver makes use of the newly added Java Object type [1] to
return the original model objects, which enables you to access them in
JavaScript expressions. For example, you can write row["type"].name to
avoid more complex constructions to navigate the model. So far so good.

Under certain circumstances BIRT serializes query results to cache them
during report generation (see [2]). It seems the cache kicks in as soon
as a data set is used more than once in a report -- even if both
instances use different parameter bindings and yield different results.
The problem is that EMF model objects are usually not serializable and
BIRT's caching mechanism throws an exception in this case.

However, in my opinion it doesn't make much sense to cache data from an
in-memory model to disk. Therefore, I would like to disable the data set
caching to avoid this problem. The best would be if the ODA driver could
provide BIRT with a hint that it should not cache its data at all. Is
there a way to do this? I haven't found one.

Browsing through BIRT's code [3] I've seen some indications which imply
that the caching meachnism is configurable. Unfortunately the
corresponding settings seem not to be available in the report designer.
Is there any other way to disable caching per data source, data set, or
report out of the box/without using the API?

[1] https://bugs.eclipse.org/285108

[2] https://bugs.eclipse.org/178897#c14

[3] DataSourceQuery.execute(), DataSetCacheManager, DataSetCacheConfig, ...
--
Andreas
Re: Data sources with non-serializable data and data set caching [message #501385 is a reply to message #491785] Wed, 02 December 2009 03:32 Go to previous messageGo to next message
Lin Zhu is currently offline Lin ZhuFriend
Messages: 72
Registered: July 2009
Member
Hi There,

So far it is not configurable for the data set caching. A would around would be define data set with different names, the data of which is however same, and use each data set only once in the report design. This will automatically switch off the data set caching.

On the other hand, data set w/ different parameter value should not be cached. What is the version of BIRT you are using? It seems a bug.

Thanks.
Lin
Re: Data sources with non-serializable data and data set caching [message #501788 is a reply to message #501385] Thu, 03 December 2009 19:11 Go to previous messageGo to next message
Andreas Mayer is currently offline Andreas MayerFriend
Messages: 32
Registered: July 2009
Member
Hi,

Lin Zhu wrote:
> So far it is not configurable for the data set caching. A would around
> would be define data set with different names, the data of which is
> however same, and use each data set only once in the report design.
> This will automatically switch off the data set caching.

There are still situations, in which BIRT insists on persisting the
result sets. For example, the web viewer seems to rely on a disk cache
no matter if data sets are used more than once.

> On the other hand, data set w/ different parameter value should not be
> cached. What is the version of BIRT you are using? It seems a bug.

The class EngineExecutionHints uses only the names of the data sets to
decide whether the result sets need to be cached (in which case the
result will be persisted and therefore has to be serialized). However,
later on DataSetCacheManager uses both, the name and the parameter
hints, to decide whether the persisted result is actually re-used.

But these are not the only places in BIRT's code concerned with
caching/persisting. Therefore, I don't know if working around this one
solves my issue once and for all.

I use BIRT 2.5.1. I've just attached my driver and an example report to
[1]. So you may see for yourself.

[1] https://bugs.eclipse.org/132958
--
Andreas
Re: Data sources with non-serializable data and data set caching [message #501855 is a reply to message #501788] Fri, 04 December 2009 05:37 Go to previous message
Lin Zhu is currently offline Lin ZhuFriend
Messages: 72
Registered: July 2009
Member
Hi There,

For the default open source viewer of BIRT, it will always first create the report document against the report design, then render the HTML result. So you are right that we will always try to save the query results to disk.

To change this behavior, you must write your own viewer, using BIRT report engine RunAndRenderTask to generation the html output directly w/o create report document on the fly.

Directly preview report in BIRT designer "preview" tab which locate in layout control would simply call RunAndRenderTask so that it will not result in report document generation.

Basically, all the query result data that used in the BIRT should be serializable. Otherwise they may not function as expected.

Thanks.
Lin
Previous Topic:ScalarParameterDefn.getUserPropertyValue
Next Topic:Tree Structured reports in Birt
Goto Forum:
  


Current Time: Fri Apr 26 06:59:56 GMT 2024

Powered by FUDForum. Page generated in 0.03771 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top