Skip to main content



      Home
Home » Archived » BIRT » Thread Safety of Various Report Entities
Thread Safety of Various Report Entities [message #85632] Sun, 30 October 2005 23:31 Go to next message
Eclipse UserFriend
Originally posted by: pcasey.earthlink.net

Like the title says, what's the level of synchronization required for:

ReportEngine
IReportRunnable (a report)

I'm assuming based on the architecture that ReportEngine is a
thread-safe factory class and IReportRunnable is not thread safe; is this
correct? If so, what's the wisdom of pooling and reusing report instances as
their construction seems rather expensive. Is this going to be problematic
down the road? Alternately, are reports themselves thread safe so that I can
run two RunAndRender tasks in parallel against the same report entity?

Thanks,

--- Pat
Re: Thread Safety of Various Report Entities [message #87923 is a reply to message #85632] Fri, 04 November 2005 22:13 Go to previous message
Eclipse UserFriend
Patrick:

A typical multi-threaded application that use report engine API will look
like:

1.The application creates one or more ReportEngine objects when it starts.
Each report engine object will have an EngineConfig object associated with,
in which you can specify BIRT home, logging folder, etc. In most cases, an
application will need just one ReportEngine object.

2. The application's worker threads create EngineTask, IReportRunnable using
the ReportEngine object, and run the task.
......

Based on this usage scenario, the following thread safety model is defined
for various BIRT entities:

- EngineConfig doesn't have to be thread safe. As its name indicates, the
engine configuration is set when the application starts.
- ReportEngine is thread safe. The same engine object can be shared in the
application's worker threads.
- EngineTask doesn't need to be thread safe because they are created and
used in a single worker thread.
- Similar to engine task, IReportRunnable is also created and used in a
single worker thread. Howver, constructing a IReportRunnable is an expensive
operation, most applications may want to pool/reuse the IReportRunnable
objects, so it has been designed as thread safe.

Seems there is a thread safety issue with the openReportDesign() method in
ReportEngine with current implementation, we are looking into it. For now,
you may just synchronize this method in your worker threads.

Wenbin he
BIRT designer project lead


"Patrick Casey" <pcasey@earthlink.net> wrote in message
news:dk46no$4ku$1@news.eclipse.org...
>
> Like the title says, what's the level of synchronization required for:
>
> ReportEngine
> IReportRunnable (a report)
>
> I'm assuming based on the architecture that ReportEngine is a
> thread-safe factory class and IReportRunnable is not thread safe; is this
> correct? If so, what's the wisdom of pooling and reusing report instances
as
> their construction seems rather expensive. Is this going to be problematic
> down the road? Alternately, are reports themselves thread safe so that I
can
> run two RunAndRender tasks in parallel against the same report entity?
>
> Thanks,
>
> --- Pat
>
>
Previous Topic:Chart Sub Report Example
Next Topic:ReportEngine threadsafety
Goto Forum:
  


Current Time: Sat Jun 07 12:02:03 EDT 2025

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

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

Back to the top