Finally understand how tjavaflex in Talend works. On the code generation, Start and End code will go at the beginning and end of each loop. It is kinda looks like babushka doll. If you have, say, tinformixinput --> tjavaflex, you will get tjavaflex:start, tinformixinput stuff, tjavaflex:main and tjavaflex:end.
Things, however, will become more complicated, if couple tjavaflex will follow each other. Each one of them will encapsulate previous. Sometimes it can be bad, specially if stuff you are referring in begin and end parts does not exist at that point.
The solution in that case is to use tflowtoiterate. This component will break the flow, pushing flow variables into global map. This is kinda sux, yes, but at least one tjavaflex will not encapsulate another.
This solution works, for example, then one need to introduce transactions in the middle of the flow.