I'm using PropertyPlaceholderConfigurer to pass DB properties to my DAO layer, and it works fine. The problem is that in production environment I'm required to access all properties through a special proprietary API, which basically has methods like these:
So for my code it would be:Code:String getPropertyAsString(String namespace,String name); ...
How can I plug this configuration framework into Spring? Note that I cannot use it during development, since it's too tied to EJBsCode:user = cfg.getPropertyAsString("dao","dao.username");so I'll have to continue to get data for tests from a plain old property files.
I wrote a gate to that system that implements BeanFactoryPostProcessor. Basically, I traverse all property values, and if it has format "GDP:ns:name", than I cut off GDP, and use ns and name to get values from config framework. But I really don't like this solution, as it requires me to handle all possible types of properties: I have to process string properties, properties, lists and may be I have even missed something. The code is not really simple.
Is there any more simple interceptor interface, smth that accepts only one object (a property value that is going to be set to property or list or whatever) and where I can alter that value, smth like:
Code:public class GDPConfigurationManagerGateway implements ??? { public Object preSetProperty(Object prop) { ... } }


so I'll have to continue to get data for tests from a plain old property files.
Reply With Quote