|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Accessing XML based repository in Java Compute Node |
« View previous topic :: View next topic » |
Author |
Message
|
kshah |
Posted: Mon Aug 07, 2006 3:25 am Post subject: Accessing XML based repository in Java Compute Node |
|
|
Novice
Joined: 13 Jun 2005 Posts: 23
|
Hi Guys.
I have a problem where are scenario is such that we have some rules which needs to be followed in a message flow.
We will get a XML file of the type
Code: |
<a>
<a1>1</a1>
<a2>2</a2>
<a3>3</a3>
<a4>4</a4>
<a5>5</a5>
</a> |
Now we will have a rule which will say that if a1,a2,a3,a4,a5 are 1,2,3,4,5 repectively then invoke abc interface
we have such 41 combinations.
Are strong requirement is thht somehow we shud not hardcode this rules in code.
We need to externalize this rules so that it can be changed any time and flows need not be restarted.
We have following two thoughts...on this
1.Having some Kind of XML based repositary of the type
Code: |
<a>
<a1>1</a1>
<a2>2</a2>
<a3>3</a3>
<a4>4</a4>
<a5>5</a5>
<a6>abc</a6>
</a>
<b>
<a1>11</a1>
<a2>12</a2>
<a3>13</a3>
<a4>14</a4>
<a5>15</a5>
<a6>xyz</a6>
</b>
<c>
<a1>21</a1>
<a2>22</a2>
<a3>23</a3>
<a4>24</a4>
<a5>25</a5>
<a6>pqr</a6>
</c> |
such 41 items..
then we match the incoming xml data using Java and get the required a6 field value from that item.
Can anyone tell some way of parsing and matching incoming XML to this repository file.
2.In this approoach we decided to have db and query the db to get the required value.
but this approach wont help us much as we need to extend this approach on number of systems and the above example is an example of 1 such system.Hence across many systems field names like a1,.a2,a3,,,n so on...will b different n thus we need to have table for each system hence in r case 8 systems so 8 tables n we need to maintain 8 tables then.
I would require ur help to evaluate whether my understanding for both of this approach is true or not...n if some1 can suggest a solution i will be really grateful..
If someone has ever implemented XML based repository please share ur experience.
Thanks in advance...
Regards
Kshah |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 07, 2006 6:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's not an "XML Repository". It's an "XML Document".
You parse it and work with it just like any other XML document. To do this in a Java Compute Node in WMB, you write java code to read and parse an XML document.
Regardless of what mechanism you use for storing this set of "rules", then you will always have to maintain the rules for every system. Putting them into a database or an XML file or an XML document in a database, or etc. - you still have to build the rules in the first place and update them when things change! It's a constant piece of work.
Maybe you want to look at the Cache node support pack. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|