Hello,
Thank you for the tipps.
1.)How can i set the document back to the canvas ?
canvas.setDocument(canvas.getDocument()); ?? => what is the canvas in this
case ? is this the JSVGComponent itself ?
2.)adding a try cache block to the Runnable Queue ?!
Where exactly shoud i do this ? at the point where the
IllegalStateException is thrown ?! Or where i call invokeLater ?!
At the meantime i searched for the modification Methods and call them in an own
class an ask if the current Thread is a UpdateManager's RunnableQueue Thread ??
if not i print a Stack Trace.
if (Thread.currentThread() ==
ag.getUpdateManager().getUpdateRunnableQueue().getThread()) {
parentNode.replaceChild(newElement,oldElement);
} else {
logger.fatal("[replaceChild] node -was not called in the UpdateManagers
RunnableQueue.");
printCallStack();
}
Mit freundlichen Grüßen Michael Kerschbaum
DI (FH) Michael Kerschbaum
PKE Electronics AG
Zentrale Wien / Entwicklung
Computerstraße 6
A - 1101 Wien
TEL: +43 (0) 50 150 - 1210
[EMAIL PROTECTED]
www.pke.at <http://www.pke.at/>
Aktiengesellschaft mit dem Sitz in Wien
Firmenbuchnummer 103264i
HG Wien, DVR 0159701
Johann Helf - Vorsitzender des Vorstandes
Bruno Faustka - Mitglied des Vorstandes
Christian Prelz - Vorsitzender des Aufsichtsrates
________________________________
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 09. Oktober 2008 12:16
An: [email protected]
Cc: [email protected]
Betreff: Re: Watching the UpdateManagerThread if dead of alive ?! Restart,
Stopping etc.. Watchdog ?
Hi Michael,
"Kerschbaum Michael " <[EMAIL PROTECTED]> wrote on 10/09/2008 04:31:15 AM:
> The Problem is now that the application itself wont't work anymore.
> Is there a possibility to restart or watch the RunnableQueue, and in
> case of such an error?!
The simplest way to reboot the RunnableQueue would be to
set the document back to the canvas:
canvas.setDocument(canvas.getDocument());
You can know the runnnablequeue is dead by
calling 'getThread()' on the UpdateManager's RunnableQueue
if it returns null then it has died.
> I mean i have to find the modification of the dom tree outside of
> the updateManager, but I would like to have a fail back, and a quick
> solution to this problem ?
A slightly better short term solution would be to
protect the RunnableQueue from runnableInvoked throwing
an exception (adding a try cache block to the RunnableQueue).
BTW to find the problem you might try instrumenting the
DOM so that various methods check the current thread to see
if it matches the UpdateManager's RunnableQueue Thread
(assuming an UpdateManager is associated with the DOM).
I would add the code to batik.dom.AbstractElement.setAttribute
and setAttributeNS, as well as batik.dom.AbstractParentNode.appendChild
That should check the most likely problems.