Announcement Announcement Module
No announcement yet.
reload bean from spring context Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • reload bean from spring context

    I have a spring 2.5 mvc application. i have init property set on my class A so that when application loads up it calls the init method in class A to initialize a list with values from the database.

    when the application starts up this list is available to all the spring beans.

    Question if user adds a new item to database, how do i refresh this list to show the new item? Bear in mind the list is only intialized at application start up.

  • #2
    If you need to reload the list when a user enters a new item, then a design where you load the list on bean initialization probably isn't a good pattern for you.