Store XML data in java cache (hashmap as a key value pair)
715138Apr 23 2012 — edited Apr 23 2012Hi,
I have to store a xml file in java cache so that I can resue it .The flow is like this :
DAO layer reads database ,create an xml and sends to --> IBM MQ-->our java code should read this xml file over MQ and store it in a cache (preferably hashmap).The file contain unique id for every customer.
How can we achieve this.One way is to store the xml as an string as key is "id" and value is whole xml.Is this a good way or any other way is available.Please suggest.
Sample xml:
<Client>
<ClientId>1234</ClientId>
<ClientName>STechnology</ClientName>
<ID>10</ID>
<ClientStatus>ACTIVE</ClientStatus>
- <LEAccount>
<ClientLE>678989</ClientLE>
<LEId>56743</LEId>
- <Account>
<AccountNumber>9876543678</AccountNumber>
</Account>
</LEAccount>
- <Service>
<Cindicator>Y2Y</Cindicator>
<PrefCode>980</PrefCode>
<BSCode>876</BSCode>
<MandatoryContent>MSP</MandatoryContent>
</Service>
</Client>
Thanks
Sumit