Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Cache the file stream data in Java using normal POJO.

 
paresh doshi
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a jar file that reads the XSD file and parse the input XML through that every time. Can if be possible to load all the XSD files in Cache at once, and every request to that jar file will pick up the data from Cache, so that the performance is improved to a great extent.

Can anyone provide some idea or sample code.

Regards,
Paras.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I had to do that, I would write an EntityResolver that cached the schemas. Probably as DOM objects so they didn't have to be parsed over and over, but that would be expanding the time versus memory trade-off more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic