Announcement Announcement Module
No announcement yet.
Refresh method in ConfigurableApplicationContext Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Refresh method in ConfigurableApplicationContext

    Hi all,

    I need to define my bean in such that, in every 24 hours each method call of it will not be a database fetch. Hence, I was thinking of writing a init method in the bean to do all the data population and subclass a quartz scheduler to refresh the application context through ConfigurableApplicationContext every 24 hours.

    My question:
    How do I make it such that if a user logins during this "refreshing" period, he will be visiting the old data (before the 24th hours)? Else he could have either get some system exception or worse, a corrupted data which is undesirable.