On Mar 8, 2009, at 7:28 AM, Karan Malhi wrote:

Thats cool. Why would we need a parent Options instance?

Not critical, but we have a few chunks of code that look like:

String strategyClassName = SystemInstance.get().getProperty(JNDINAME_STRATEGY_CLASS, TemplatedStrategy.class.getName()); strategyClassName = ejbJar.properties.getProperty(JNDINAME_STRATEGY_CLASS, strategyClassName);

Basically, if the property is defined in the openejb-jar.xml we use that, else if it is defined in the system instance we use that, else we use the default.

We don't control properties, but we do control the Options object, so thought it would be cool to have the ability to throw one Options into another and have this sort of "wide-scope to narrow-scope" searching built in.

Technically speaking the java.util.Properties class will do this already (which I only discovered a few months ago), but you have to pass the parent Properties instance in the constructor of the child properties object which we aren't doing just yet. We could definitely do this for the properties in the system instance that default to the system properties. There's an even older thread on that which I should resurrect actually.

-David



Reply via email to