PDA

View Full Version : Can an individual bean be reloaded during runtime?



cptechno
Oct 27th, 2004, 04:51 AM
Hi,

As part of the requirements of the project I'm working on they want services hooked up to Spring's BeanFactory be changed during runtime. In other words, they want to change the settings of an individual bean, and restart it.

I know ConfigurableApplicationContext has a refresh() method. However, I would like to make only the individual changed bean to restart itself without affecting others.

Is that possible? If so, how, if JMX support is not yet available until 1.2?

TIA,
Raymond

Andreas Senft
Oct 27th, 2004, 06:57 AM
Have a look at org.springframework.aop.target.HotSwappableTargetS ource. Maybe it could be useful for your purpose.

Regards,
Andreas