Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Store XML data in java cache (hashmap as a key value pair)

715138Apr 23 2012 — edited Apr 23 2012
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 21 2012
Added on Apr 23 2012
4 comments
985 views