Spring 3.1 + Tomcat
I have some design questions here:
There is a group of categories specified in the database. These categories can be considered global in the sense that they can be used throughout the webapp. What I would like to do is read these categories at server startup and populate some type of collection in Java. The only thing you need to read from the database once at startup is to consider this type of initialization.
Two options that I can think of:
1) Should I use a NAN-lazily initialized bean?
or
2) Change web.xml?
I'm not quite sure which method is preferred, and any instructions on how to implement your recommendations would be much appreciated. Thanks!
Praveen R.
source share