Announcement Announcement Module
Collapse
No announcement yet.
How to relaod a bean i ApplicationContext Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to relaod a bean i ApplicationContext

    Hi,
    I am trying to see if i can update one bean from the ApplicationContext by avoiding the ApplicationContext.refersh() method.

    Any help on this greatly appreciated.

    Thank you.
    Vj

  • #2
    if i can update one bean from the ApplicationContext
    What do you mean by update the the bean? You mean its properties?

    Comment


    • #3
      My situation is like
      I have a bean definition in the xml which i loaded as part of my application during the startup.
      But after some time some one updated the one of the property of the bean.
      I want reload the updated properties of the bean during the runtime.

      Comment


      • #4
        You can give prototype scope to your bean and ask the context to create a new one each time you need to "reload" it. Of course, any other bean that is a property of your refreshable bean and that you want to update must be in prototype scope as well.

        Comment


        • #5
          Hi,

          You can even use the following way using prototype scope

          http://stackoverflow.com/questions/3...pe-not-working

          Comment

          Working...
          X