Hi,
A
B C D
E
I have a sequential step which starts step A and after that is finished it starts B,C,D in parallel. Then a new sequential Step E starts.
B,C,D start on arbitrary nodes and I want to pass this node-address information to step E.
I tried to let B,C,D execute a script which adds the node address to a variable but I need some kind of isolation to avoid race conditions.
can I use a script like the following in B,C,D in parallel?
synchronized(this)
{
vars.get("Remember").setValue(vars.getValue("Remember") + "I am B, ");
}
to get the following (reliable) result in E:
by eexecuting logger.info(vars.getValue("Remember"))
"I am C, I am B, I am D,"
Or is there a better way to do that?
I would be be very happy, if you can help me.
thanx in advance
Henry