Author |
Message
|
lewisleung |
Posted: Fri May 24, 2002 7:41 pm Post subject: Modifying Environment tree inside plugin node |
|
|
Novice
Joined: 05 Mar 2002 Posts: 14 Location: Hong Kong
|
Hi,
I am going to add some variables into Environment tree inside a Java plug-in node. However, I wonder whether I should create a copy of Environment tree first or just modifying the incoming environment tree.
Documentation said that if we are modifying the input message, we have to first create a copy of this message and modify the copy image. But it doesn't mention the case for Environment.
The testing told me that it is possible to modify the Environment tree before making a copy. Is that really true ?
thanks
Lewis |
|
Back to top |
|
 |
suneelsh |
Posted: Sat May 25, 2002 8:48 am Post subject: |
|
|
 Acolyte
Joined: 13 Apr 2002 Posts: 69 Location: Pune,India
|
lewis what do you mean by the environment tree? can you please explain. |
|
Back to top |
|
 |
lewisleung |
Posted: Sun May 26, 2002 4:35 pm Post subject: |
|
|
Novice
Joined: 05 Mar 2002 Posts: 14 Location: Hong Kong
|
The Environment tree is the tree created when message is received by MQInput node and parsed (e.g. Environment.Variables.Field1 = Data1), I want to update the Environment tree inside the plugin node to add additional variables based on an external file.
However, I am not sure whether I should create a copy of Environment tree before modification as documentation only said that we have to create a copy of output message first before modification.
Any idea on this ?
Lewis |
|
Back to top |
|
 |
suneelsh |
Posted: Sun May 26, 2002 8:33 pm Post subject: |
|
|
 Acolyte
Joined: 13 Apr 2002 Posts: 69 Location: Pune,India
|
dear lewis in the documentation it has been told to create a new message from the incoming message assembly and use this message to create a new message assembly to work on. In case if you have tried to maniupulate the original assembly , you would recive an MbException. So i guess it is beter to work on a copy than to work with the original. But i have not yet worked on env trees...so i have no idea. |
|
Back to top |
|
 |
dnaren |
Posted: Fri Jun 14, 2002 1:17 pm Post subject: |
|
|
 Apprentice
Joined: 10 Aug 2001 Posts: 45 Location: Charlotte, NC
|
Lewis,
Did you have any luck in dealing with Environment Trees inside your custom plug-in node? The Java API doesn't seem to support the concept of Environment trees.
How can you access the environment tree associted with a message if your message domain is BLOB? _________________ "Where is Bart, anyway. His dinner's getting all cold and eaten." |
|
Back to top |
|
 |
kirani |
Posted: Fri Jun 14, 2002 5:01 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Have you tried using MbMessageAssembly.getGlobalEnvironment() method to retrieve Environment Tree?
Regardless of your input Message domain you should be able to access all trees in plug-in nodes by calling appropriate method. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|