|
From: Bryant H. <bry...@ho...> - 2008-02-01 00:01:36
|
I had an idea and wanted to see if anyone has persued it.
So you know how the ProperyPlaceholderConfigurer allows you to =
externalize properties using ant style notation ${some.prop} in bean =
definitions?
What if you could change those values at runtime and have the Configurer =
hot update the property on the bean with the latest value?
Obviously the configurer would need to keep track of the beans created =
from the bean definitions it first updates, but I don't think this is =
something that would be too hard to do.
Also, I realize that not all beans are amenable to having their =
properties updated. So although a boolean attribute might be easily =
switched, updating say the URL on a JDBC connection would be more =
complicated since it might imply that all connections should be flushed, =
something the standard datasource might not do (or maybe it throws an =
IllegalStateException).
At anyrate, has anyone tinkered around with an idea like this?
Thanks,
Bryant |