|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
  |
|
Broker 6.1: Load mapping file |
View previous topic :: View next topic |
Author |
Message
|
scravr |
Posted: Fri Sep 12, 2008 5:50 am Post subject: Broker 6.1: Load mapping file |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
HI All,
I have about 30 flows that need to map codes by categories (in both From and To directions):
category1: “N” to “NO”, “Y” to “YES”, “T” to True, “F” to “False”
category2: “JAN” to “January”, “FEB” to “February”, etc.
category3: “D” to “Dollars”, “C” to “Cents”
category4: …..
category5: …..
Both directions means: I can map “N” in category1 to “NO” and also map “NO” to “N”.
I do no like to use database to keep and map the codes.
I wonder if there is a way ( when broker V6.1 starts ? ) to load an XML mapping file, and then write a simple JAVA code to read the file and lookup codes in runtime.
Here is a simple XML mapping file to load:
<MappingTable>
<MappingIn>
<Category1>
<Codes>
< Code value=”N”>NO</Code>
< Code value=”Y”>YES</Code>
</Codes>
</Category1>
<Category2>
<Codes>
< Code value=”JAN”>January</Code>
< Code value=”FEB”>February</Code>
</Codes>
</Category2>
</MappingIn>
<MappingOut>
<Category1>
<Codes>
< Code value=”NN”>N</Code>
< Code value=”YES”>Y</Code>
</Codes>
</Category1>
<Category2>
<Codes>
< Code value=” January”> JAN </Code>
< Code value=” February”> FEB </Code>
</Codes>
</Category2>
</MappingOut>
</MappingTable>
The JAVA function code should:
1. Get the mapping direction (MappingIn or MappingOut), category, and lookup code value.
2. Search the XML file
3. Return found value or error not found.
The XML mapping files will save maintenance since I can add/remove codes very simply and restart broker ( or some other way to refresh? ).
So the question is: Does broker 6.1 have a capability of loading/reading files and keep in memory for use by flows?
Thanks,
MA |
|
Back to top |
|
 |
kimbert |
Posted: Fri Sep 12, 2008 7:57 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
|
|
  |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|