Hi,
We use Spring MVC annotations.
I have a StartUpServlet as well. My requirement is to load this
servlet after the FilterDispatcher servlet is initialized.
Basically, we would like to initialize the Google Guava cache and load the cache with the data from the table.
I can have a static block and load the data. But the problem is the class where we do the cache initialization and cache loading might be garbage collected if we never access it for long time.
So, though of having the cache loading class instance refernece inside a servlet so that it will never be garbage collected. But the servlet gets loaded before the FrameworkServlet dispatcher initialized and Dependency injections are working.
Looking for help on this ......
Thanks in Advance,
Baskar.S