title: Struts2 static data storage / access
body: <p>I am trying to find what is the usual design/approach for "static/global"! data access/storage in a web app, I'm using struts 2. Background, I have a number of tables I want to display in my web app.</p>
  
  <p>Problem 1.
  The tables will only change and be updated once a day on the server, I don't want to access a database/or loading a file for every request to view a table.
  I would prefer to load the tables to some global memory/cache once (a day), and each request get the table from there, rather than access a database.
  I imagine this is a common scenario and there is an established approach? But I cant find it at the moment.
  For struts 2, Is the ActionContext the right place for this data.
  If so, any link to a tutorial would be really appreciated.</p>
  
  <p>Problem 2.
  The tables were stored in a XML file I unmarshalled with JAXB to get the table objects, and so the lists for the tables.
  For a small application this was OK, but I think for the web app, its hacky to store the xml as resources and read in the file as servlet context and parse, or is it?
  I realise I may be told to store the tables to a database accessing with a dao, and use hibernate to get the objects.
  I am just curious as to what is the usual approach with data already stored in XML file? Given I will have new XML files daily.</p>
  
  <p>Apologies if the questions are basic, I have a large amount of books/reference material, but its just taking me time to get the higher level design answers. </p>