I’ve followed the guibe to embedding Clover (2.9.3) http://wiki.cloveretl.com/doku.php?id=embedding_clover but am having problems executing my graph multiple times. It will execute fine the 1st time but it goes into a loop the second time. I have tried using both
Yes I tried that but it still goes into a loop when the 2nd threadManager.executeWatchDog(watchDog); is called. This also happens when I tried your example.
The only way I could get it to work was to add a sufficient sleep time between executeGraph() calls.
Future<Result> result = runGraph.executeGraph(graph, runtimeContext);
sleep(5000);
graph.reset();
result = runGraph.executeGraph(graph, runtimeContext);
Adding the sleep() using the threadManager method did not work, it still looped.
you need to create a watchdog instance for each separete graph run
Let me know if the example on wiki page is not comprehensive. More detailed piece of code is also available at our junit test org.jetel.graph.ResetTest.
All mentioned above is totally right from release 3.0 which is not still public But you can download it from our svn trunk, it should be already pretty stable. We are going to release it in few days.
For older clover release I still recommend to be inspired by org.jetel.graph.ResetTest junit test (should be part of each source distribution).