jimjxr
09-20-2005, 05:12 PM
Hi,
I have written an class implementing IFactoryObject and IInitializingObject, and put it together with a PropertyPlaceholderConfigurer in the same configruation xml. The factory object's properties have placeholders which I'd like to config via sections in app.config.
However, this doesn't seem to work, the placeholder is not replaced by their values. Debugging the code shows the IInitializingObject.AfterPropertiesSet and IFactoryObject.GetObject runs before PropertyPlaceholderConfigurer.ProcessProperties, so the configurer never had a chance to replace the placeholders in the properties before they're used. I wonder if I did something wrong to cause this behavior?
Thanks
Jim
I have written an class implementing IFactoryObject and IInitializingObject, and put it together with a PropertyPlaceholderConfigurer in the same configruation xml. The factory object's properties have placeholders which I'd like to config via sections in app.config.
However, this doesn't seem to work, the placeholder is not replaced by their values. Debugging the code shows the IInitializingObject.AfterPropertiesSet and IFactoryObject.GetObject runs before PropertyPlaceholderConfigurer.ProcessProperties, so the configurer never had a chance to replace the placeholders in the properties before they're used. I wonder if I did something wrong to cause this behavior?
Thanks
Jim