Commit 6cbeb3ff authored by Philippe Merle's avatar Philippe Merle
Browse files

Removed some TODO related to stopping components before calling bindFc().

parent a9b25716
......@@ -68,13 +68,16 @@ public class RunnerTest
// Get the Runnable service of component D.
Runnable runnableD = (Runnable)componentD.getFcInterface("Runnable");
// TODO: This is strange: bindFc() could be invoked without calling stopFc() before.
// Fractal.getLifeCycleController(componentRunnerMultiple).stopFc();
//
// With Julia then Tinfi, the method bindFc of BindingController can be invoked on a started component.
// However here, we stop the component before calling bindFc() in order to be sure that
// no business activities are run inside the component during the binding reconfiguration.
//
Fractal.getLifeCycleController(componentRunnerMultiple).stopFc();
// Connect the 'runnables' reference of the RunnerMultiple component to the 'Runnable' service of the component D.
Fractal.getBindingController(componentRunnerMultiple).bindFc("runnables-D", runnableD);
// Fractal.getLifeCycleController(componentRunnerMultiple).startFc();
Fractal.getLifeCycleController(componentRunnerMultiple).startFc();
// RunnerMultiple, A, B, C, and D components will be invoked.
runnable.run();
......@@ -91,19 +94,17 @@ public class RunnerTest
hints.put("classloader", this.getClass().getClassLoader());
hints.put("uri", "http://localhost:8765/D");
// TODO: This is strange: bind() could be invoked without calling stopFc() before.
// Fractal.getLifeCycleController(componentRunnerMultiple).stopFc();
Fractal.getLifeCycleController(componentRunnerMultiple).stopFc();
// Bind the runnables reference to a Web Service.
bf.bind(componentRunnerMultiple, "runnables-D-WS-1", hints);
// Fractal.getLifeCycleController(componentRunnerMultiple).startFc();
Fractal.getLifeCycleController(componentRunnerMultiple).startFc();
for(int i=0; i<2; i++) { System.out.println(); }
// TODO: This is strange: bind() could be invoked without calling stopFc() before.
// Fractal.getLifeCycleController(componentRunnerMultiple).stopFc();
Fractal.getLifeCycleController(componentRunnerMultiple).stopFc();
// Bind the runnables reference to a Web Service.
bf.bind(componentRunnerMultiple, "runnables-D-WS-2", hints);
// Fractal.getLifeCycleController(componentRunnerMultiple).startFc();
Fractal.getLifeCycleController(componentRunnerMultiple).startFc();
for(int i=0; i<2; i++) { System.out.println(); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment