lookup « Cache « JPA Q&A





1. Caching lookup values on application startup    forum.hibernate.org

Our application uses lots of fine grained "lookup" type classes (i.e., BenefitStatus, Region, Frequency, ContractType). The only way I can see of getting these into ehcache at application startup is to run queries for each ("from ContractType".list() ... etc). Is there a better way? Perhaps there should be a property in the mapping file?