I use Mathematica with JLink for a research project, which involves a lot of computation. Mathematica is used as a graphical frontend for entering the parameters, and later plotting the results. The actual algorithms are located in Java Classes, which are called via JLink.
The "link" is an instance named evalFrontend. On the press of a button, something like this is executed:
RunEvaluation[] := (
success = False;
results = evalFrontend@run[];
eval = evalFrontend@getEvaluation[];
success = eval@success[];
Return[results];
)
If the computation needs more than 10 seconds, a dialog is displayed:
Abort Dynamic: The kernel is not responding to a dynamic evaluation. You can either choose to abort and restart the kernel or continue waiting. [..]
While this is displayed, Java is still running. However, after some more time, another dialog is displayed:
Disable Dynamic: On or more dynamic objects are taking excessively long to finish evaluating. You may eitehr disable further dynamic evaluations or continue waiting[...]
When this appears, the Java process is terminated.
How can I prevent this from happening? Any hints would be appreciated.