|
Re: Periodic platform restart [message #650613 is a reply to message #650588] |
Tue, 25 January 2011 16:53 |
|
I do not think the engine keeps a record. The viewer implements this by
storing an id (task.getID()) for each task started by the engine. You
can use the task.getStatus() to determine when its finished.
Form the IEngineTask
static final int STATUS_NOT_STARTED = 0;
/**
* the task is running
*/
static final int STATUS_RUNNING = 1;
/**
* the task is finished with sucessful
*/
static final int STATUS_SUCCEEDED = 2;
/**
* the task is finished with errors
*/
static final int STATUS_FAILED = 3;
/**
* the task is finished by cancled
*/
static final int STATUS_CANCELLED = 4;
Jason
On 1/25/2011 11:13 AM, Lukasz Walach wrote:
> I need to schedule periodic platform restart in report generating tool,
> because of memory leaks in BIRT engine
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=302242). Is there some
> simple way of getting number of currently running tasks to not interrupt
> them?
>
> Lukasz
|
|
|
|
Re: Periodic platform restart [message #657219 is a reply to message #656722] |
Wed, 02 March 2011 00:03 |
|
Lukasz,
Does the report you are running call any external Java classes?
Jason
On 2/28/2011 4:35 AM, Lukasz Walach wrote:
> I've tried another approach:
>
> I've put RunTask and RenderTask code into try{} finally{}
>
> try{
> BirtEngine.incrementRunningTasks();
>
> // RunTask and RenderTask code
>
> int runningTasks = BirtEngine.getRunningTasks()
> if (runningTasks == 1){
> BirtEngine.destroyBirtEngine();
> }
>
> }finally{
> BirtEngine.decrementRunningTasks();
> }
>
> but it ended up with outOfMemoryException() after couple of reports and
> platform restarts. After some investigation I've found that it's because
> org.mozilla.javascript refuses to be garbage collected. Then I've added
> org.mozilla.javascript.Context.exit(); after
> BirtEngine.destroyBirtEngine();
> This time after couple more runs it was OutOfMemoryError: PermGen space.
> Then I've run into this
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=261845
> So my question is: does anyone have patched js.jar from 1.7R2 release?
> I'm trying to do this by myself but so far without success.
>
> ,
> Lukasz
>
> Jason Weathersby wrote on Tue, 25 January 2011 11:53
>> I do not think the engine keeps a record. The viewer implements this
>> by storing an id (task.getID()) for each task started by the engine.
>> You can use the task.getStatus() to determine when its finished.
>>
>> Form the IEngineTask
>>
>> static final int STATUS_NOT_STARTED = 0;
>> /**
>> * the task is running
>> */
>> static final int STATUS_RUNNING = 1;
>> /**
>> * the task is finished with sucessful
>> */
>> static final int STATUS_SUCCEEDED = 2;
>> /**
>> * the task is finished with errors
>> */
>> static final int STATUS_FAILED = 3;
>> /**
>> * the task is finished by cancled
>> */
>> static final int STATUS_CANCELLED = 4;
>>
>> Jason
>
|
|
|
|
|
|
Re: Periodic platform restart [message #657486 is a reply to message #657474] |
Wed, 02 March 2011 23:09 |
|
Can you write the scripted datasource using a Java event handler instead
of javascript?
Jason
On 3/2/2011 4:45 PM, Lukasz Walach wrote:
> Yes, I'll comment this bug. Testing without scripted data source isn't a
> problem, but still I'll have to use some javascript in report to trigger
> loading org.mozilla.javascript class. Can you suggest something?
>
> Lukasz
|
|
|
Powered by
FUDForum. Page generated in 0.06630 seconds