Announcement Announcement Module
Collapse
No announcement yet.
Swapping beans without reloading the context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Swapping beans without reloading the context

    Guys,
    Is there a way the swap bean in the Application context without reloading whole context ?
    I have a repository bean injected in to a number of beans. I need to inject a fake repository for testing (only for some tests).I can certainly use different contexts for different tests, but switching and reloading the contexts between tests is costly.
    Any ideas on how this can be done ?

    Thanks ,
    Chintaka

  • #2
    Take a look at HotSwappableTargetSource. There was also a nice blog entry about this (on Alef's blog IIRC) - you can find the article from the main page springframework site.

    Comment


    • #3
      The link is: links:http://blog.arendsen.net/index.php/2...i-hotswapping/
      Btw, also of interest:
      http://blog.arendsen.net/index.php/2...art-i-pooling/

      Comment


      • #4
        Thanks a lot, I will try this

        Chintaka
        Last edited by chintaka; Apr 2nd, 2006, 06:33 PM.

        Comment

        Working...
        X