on 12-14-2006 7:03 PM
I have written a Java Class that implements the StreamTransformation interface for use in an Interface Mapping. I would like to cache information read from a file between message processing calls of this mapping.
It appears that maybe the GlobalContainer object can be used to perform this caching. How do I access the GlobalContainer object from a class that implements StreamTransformation?
The examples all show container.getGlobalContainer() method call to get access to this object. However container is not a variable in this interface. Any ideas on how to do this?
Thanks,
Jay
Jay,
What sergio has told is absoultely correct.
But, FYI, please take a look at Stefan Grube's reply in tis thread,
<i><b>The mapping program is a class derived from the interface GlobalContainer. So you can use the methods of GlobalContainer all the time during the mapping program.</b></i>
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> The mapping program is a class derived from the
> interface GlobalContainer. So you can use the methods
> of GlobalContainer all the time during the mapping
> program.
Hi Bhavesh,
This is only valid for a mapping programm created by the graphical mapping tool.
In a Java mapping this is not the case.
Regards
Stefan
Hi Jay,
if you want to link data from different messages you must use BPM, you cannot do this with GlobalContainer because it is instantiated at the begin of the mapping and is flushed at the end of the mapping (e.g. graphical mapping).
2 files for the same scenario will use 2 different instances of the same message mapping program and they will not share the container.
The container is shared inside the same instance of the mapping program.
So it is shared for example between two UDF in the same mapping
So if you are using Java mapping you do not need to use the global container, you can use an Object to store data, but keep in mind that all this data will be lost at the end of the mapping.
Hope it helps,
Kind Regards,
Sergio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.