This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes How to Cache the file stream data in Java using normal POJO. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to Cache the file stream data in Java using normal POJO." Watch "How to Cache the file stream data in Java using normal POJO." New topic
Author

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

paresh doshi
Ranch Hand

Joined: Nov 20, 2006
Posts: 81
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.


Thanks.<br />Paresh Doshi<br />SCJP 1.4
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Cache the file stream data in Java using normal POJO.
 
Similar Threads
disk cache for JAR files when running plugin
Improving performance in Pagination
XMLBeans
XML Schema in a jar file?
Applet getResource() from Server or Client?