Hello, I'm pretty new to spring and it think it's just great! I was wondering if anyone knew how to reload a bean? Or re-initialize a bean from it's definition?
thanks!
rajiv
Hello, I'm pretty new to spring and it think it's just great! I was wondering if anyone knew how to reload a bean? Or re-initialize a bean from it's definition?
thanks!
rajiv
3 ways:
1. Maybe you just need a ptototype?
2. Use AppContext.refreshBeanFactory() (or something like that). That'll reload the whole context.
3. Try looking at "7.11. Using TargetSources" in the ref, if you need something more sophisticated
Use applicationContext.refresh()
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
Please use [ c o d e ] [ / c o d e ] tags