My requirement: I have a variable that'll be read from message header with DynamicConfiguration and will be used in several UDFs in a message mapping.
Are there any problems in using either GlobalContainer object or Global Variable in Message Mapping Java Section for storing/recovering this variable?
And in the case I use Java Sections, suppose I have the following:
String param = null;
param = "value";
Then, what do I need to use in Clean-up Section? Should I give it a null value or an empty string value? I mean, I can't understand the necessity of this section, since garbage collector would handle that variable (and supposing it will be valid only during this message mapping thread).
Thanks in advance,
I think you are doing exactly right, using the Global Variables section. It is much easier than using the GlobalContainer class.
In most situations, there is really no need to code anything in the Clean-Up Section. It can be useful if you need to close db connections, files or some other persistent storage.