Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Limiting the time the IRunAndRenderTask runs
Limiting the time the IRunAndRenderTask runs [message #1282812] Wed, 02 April 2014 20:25 Go to next message
Olly   is currently offline Olly Friend
Messages: 61
Registered: June 2010
Location: Florida
Member
I am currently using Birt 3.7.1 with no option to upgrade. Currently what is happening is if I try to create a PDF report via my web application that contains anything above 5,000 records, it takes about three and a half minutes. But if a user tries to create a PDF report with 50,000 records, it takes too long and causes stuck threads on the WebLogic server where it is running. Now, I found in the IRunAndRenderTask API the setmaxrowsperquery option. This is an option for the moment, but I'd like to know if there is a way to set the engine to die or kill itself after 5 minutes or so. I didn't see this in the API. Any help is greatly appreciated. In the long run, we may create materialized views that aggregate the data, but for the short term, I need a quicker fix.
Re: Limiting the time the IRunAndRenderTask runs [message #1284334 is a reply to message #1282812] Fri, 04 April 2014 10:59 Go to previous message
donino donino is currently offline donino doninoFriend
Messages: 183
Registered: July 2011
Senior Member
All BIRT tasks such IRunAndRenderTask have a ".cancel()" method we can invoke to interrupt it.

I don't believe there is an out-of-the-box timeout feature, however this might be implemented quickly. I plan to contribute soonly to the BIRT project with a such TaskManager, here is what i have in mind:

- A method "register" allowing to store birt tasks on demand in a WeakHashMap, with the starting time
- A java.util.TimerTask, scanning periodically all tasks registered. For each entry:
- if the task is still active and maxtime is exceeded, then we invoke task.cancel()
- if the task is terminated or null then we remove the entry from the map

That's it. If you make use of the reportEngine API it should be quite fast to implement. With a such approach you could even add a "getActiveTasks()" method to inspect what's going on in your BIRT engine!

I hope it helps
Previous Topic:[solved] invoking script elsewhere then in charts
Next Topic: Convert a String like 123:34:23 to actual Time format in birt report designer
Goto Forum:
  


Current Time: Tue Apr 16 23:04:49 GMT 2024

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

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

Back to the top