java - How can I load file into web app through certain periods? -


I have the next job: I have to load the same file many times in my web app, for example - in the daytime Twice! Suppose that I have information in that file, that is change, and for example to change the statistics I need to load this information in my app.

How many times can I load a file (one hour or twice or twice a day)? What should I use? Is there any algorithm to do this?

I do not have permission to use external libraries like quartz scheduler so I need to do it with threads and / or timers. Does anyone give me some examples or algorithms how to do this. Where can I create the entry point in my thread, can I do it in the managed bean or I need some type of filter / listener / servlet I work with jsf and richfaces probably solve my problem in this technique There are some algorithms to do.

Any thoughts?

Thank you very much for the help!

If you can not use the scheduler, use the servlet and the timer.

It's described how to do this. This is exactly what you want.


Comments