wyona / yanel

http://www.yanel.org
Apache License 2.0
10 stars 5 forks source link

Implememt target-environment also for realm configuration #19

Closed michaelwechner closed 12 years ago

michaelwechner commented 12 years ago

In the case of a resource configuration one can use the "target-environment" attribute, which is configured inside yanel.xml.

It would be very nice to have this also available inside realm.xml

We have started an implementation inside

src/core/java/org/wyona/yanel/core/map/RealmDefaultImpl.java

(grep for "target-environment")

but it is considered to be finished

csstaub commented 12 years ago

Finished an implementation of this - please check out branch target-env in the Yanel repository.

michaelwechner commented 12 years ago

Thanks very much for this improvement. Unfortunately it doesn't work for me. For example if no target environment is set inside yanel.xml, then one will receive a null pointer exception.

Nevertheless the realm configuration can have the same elements without and with different target-environment attributes, hence I would assume that each realm config needs to be filtered, but the NullPointer needs to be caught inside

src/core/java/org/wyona/yanel/core/util/ConfigurationUtil

csstaub commented 12 years ago

If the target environment passed to the filter function was null, it lead to a null pointer exception. That should be fixed now (see update in branch).

michaelwechner commented 12 years ago

thanks very much. It looks good now. I have merged "target-env" into master, pushed master and deleted the branch "target-env"