On 3/1/07, Tom Chiverton <[EMAIL PROTECTED]> wrote:
The use case that brought this up was we had a new version of an app to
deploy, and the only change was that some of the constants in a bean had
changed. These are stored as static bean properties to keep performance up.

Write a script that gets hold of the bean from ColdSpring and updates
it, for example:

oldBean = csFactory.getBean("constantsBean");
newBean = createObject("component","constantsBean");
for (x in oldBean) oldBean[x] = newBean[x];

That would replace all of the public data and methods in the
ColdSpring-managed bean with the matching public data and methods from
the newly updated bean.

If stuff's in variables scope inside the bean, just inject a method to
let you rewrite the data (and remove the method afterward).

(And I didn't even bring up the wisdom of updating a running system by
applying partial code changes!)
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

Reply via email to