Bug 22222 - Timeout for Driver.run() method
Summary: Timeout for Driver.run() method
Status: CLOSED WONTFIX
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.5
Hardware: All All
: P3 enhancement
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-07 16:12 UTC by Frank Spies
Modified: 2012-04-01 13:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Spies 2003-08-07 16:12:40 UTC
It should be possible to 
* set a timeout on the Driver.run() method or
* to stop a Driver object and make it stop execute its run() method.

Sometimes the rendering process lasts longer than you want to wait, but there is
no way to cancel a running driver in a clean way.
Comment 1 Glen Mazza 2003-10-17 23:34:19 UTC
I'm unsure about this.  FOP of course takes considerable memory while running.  
To be able to cleanly reset itself at anytime during processing may be very 
difficult for us to do, may not be worth the effort--I don't believe even Xalan 
attempts to offer this feature.

You should be able to set your program to cancel the thread (and do whatever 
app-specific handling necessary) that the Driver object runs on should FOP take 
too long to generate your document.  That is probably the fastest way for 
memory recollection, even if you do have to reinitialize a driver object on a 
subsequent run.  Timeout handling is most robust when done from the calling 
application anyway--i.e., even if FOP had these functions you'd probably want 
to resort to multithreading on your side anyway.

Also, to provide the feature directly within Driver would require Driver itself 
to run multi-threaded--probably unneeded complexity given that frequently 
whatever is calling Driver (servlets, etc.) is itself already running 
multithreaded.

So I'm setting this to WONTFIX, unless others on the team see this issue 
otherwise...
Comment 2 Frank Spies 2003-10-20 15:08:33 UTC
Okay.
I was asking because we are running multiple fop in a multithreaded environment,
and since Thread.stop() has been deprecated the only thing we could when one
Thread was hanging was to shut down the entire JVM, and thats not so nice.
Recently, I heard that there are plans to include "Isolates" in Java 1.5, which
will allow us to let our Threads run in different isolates and shut down the one
that hangs without affecting the others. That will be fine, so I think waiting
for 1.5 will be just fine.
Comment 3 Glen Mazza 2003-10-21 21:26:12 UTC
Thanks for the information on the new features of 1.5--we'll refer to them 
should this issue arise again!

Glen
Comment 4 Glenn Adams 2012-04-01 13:53:30 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs