I have some common data that all of my EJBs will need, so I decided to write 1 EJB to go and get the data, while the other EJBs will call the first EJB to get the data. Now I want to cache the data in the EJB so that it does not have to go back to the database each time it is asked for the data.
So, how do I cache the data in the EJB and maybe pull a fresh copy every 1 hour or so. Can I do this with Ehcache? Or am I thinking about this all wrong, and there is a better way to do it.
Thanks