On Talend software, on a job, it's possible to assign the value of a context variable, via a tJava, by writing for example:
There is no error and most of the time it goes very well.
Except when using the job in a multi-threaded context of TAC (Talend Administration Center) type: it may indeed happen that the variable is assigned to another Thread. Thus, the context variables are not thread-safe (even if in a classic multi-threaded use, on Open Talend Studio, this goes very well).
This problem was not observed when using the globalMap. It is therefore recommended to use this variable.
In general, it is therefore absolutely necessary to avoid reassigning the context variables in a job, and to consider them as constants.
RSS | Informations |