Hi,
I am new to Spring and here is what I want to do.
I want to create a daemon
thread on application startup which periodically pings the database and gets the data into the memory(collections) to be used up by the web application.
This thread must have access to the other beans (to update the DB for instance).
Here is my problem:
I am planning to use Spring for the dependency injection including for my "daemon bean". However, i can do it easily through a servletcontextlistener to start up my thread. If i do that then I will not be able to leverage the dependency injection if I start my thread this way.
My question is therefore the following:
How to start a daemon thread at application startup time in a Spring application?
Your help would be greatly appreciated.