java - How to reload classes storing database information at frequent intervals? -
we have webapplication @ start-up fetches required information database , stores in java maps.
these maps later used throughout in application fetch information required.
but in approach whatever updates done in database not reflected till restart application.
so how can automatically reload such classes / repositories in java?
thanks in advance.
what understood that need reload classes because need refresh data, loaded db during start-up. isn't true? if yes, if other mechanism can data refreshed, don't think still need reload classes.
try using caching mechanism. take @ ehcache.
you can go quartz scheduler, others pointed out. wait... that's library.
well, can go using timer , timertask, otherwise. schedule task repeated execution, pointed out somewhere in comments need load every hour.
Comments
Post a Comment