Hi
How can I stop a class method execution ?
I have been reading and the most similar solution I found is use Threads....is there another solution ?
Im working with jasperreports, In order to generate report I just call single method to start the report print and another method to read database. How can I stop a job if time is more than 60 seconds?....
public class MiRunnable implements Runnable
{
private boolean terminar = false;
public void setTerminar (boolean terminar)
{
this.terminar=terminar;
}
public void run ()
{
while (!terminar)
{
// Alguna tarea a realizar
}
}
}