Ravi Sharma wrote: > Hi All, > I need to run some threads at particular time during the day, does Tomcat > provide any such facility? If not then whats the other best way to go for > it. > Well for scheduled jobs "Quartz" is a common tool, if java.util.Timer is not sufficient. Certainly not Tomcat-related however as only "full" JEE containers have "buildt-in timer support". > Basically i recalculate my site's visitor data every 30 minute and keep in > cahce and then display to users, 30 minute delay for my data is fine but > atleast i dont need to run queries to find those data for each request. Now > every 30 minute i want to run those query and update the cache. How can i > achive it.? > Trying to use java.util.Timer or Quartz for this particular problem appears architecturally questionable however. Preferably you would have an O/R mapper like Hibernate an rely on some second level cache like EHCache to do thus common DB query caching stuff via configuration instead of implementing such common tasks on your own. Maybe you want to rethink that from an architectural point of view to get things right for all DB queries, unless the problem described is very focused on that particular caching problem. Sometimes OSCache's JSP-based caching can also be a valid solution, if all you want to do is to cache some view results: http://www.opensymphony.com/oscache/wiki/JSP%20Tags.html > Thanks, > Ravi. > Cheers, Michael
-- TNG Technology Consulting GmbH, Betastr. 13a, D-85774 Unterföhring Geschäftsführer: Henrik Klagges, Eike Reinel, Christoph Stock Amtsgericht München, HRB 135082 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org