RE: Using Property Placeholders in

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: Using Property Placeholders in

Tashani Kathriarachchi
I have a transformer with a @Lookup annotation.
When I declare a property in a property file loaded via context:property-placeholder it isn't set in the registry (and my Lookup will throw an exception)


Expression Evaluator "registry" with expression "cendris_username" returned null but a value was require
d. (org.mule.api.expression.ExpressionRuntimeException)


This works well when setting the property via
Maybe this is a bug in mule, but this happens, even in mule-3.3 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

RE: Using Property Placeholders in

Tashani Kathriarachchi
It's not a bug. If you use the Spring property placeholder resolver you have to look *it* up in the registry then ask it for the value of "cendris_username". Global properties are different, they are directly bound in the registry. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

RE: Using Property Placeholders in

Tashani Kathriarachchi
In reply to this post by Tashani Kathriarachchi
If this is true, then, is it possible to add the properties from the resolver to the registry?
Like said before, it isn't possible to define a global-property with a value containing a property from a resolver.
I think my transformer shouldn't care if a property is set by a global property or by the property resolver. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

RE: Using Property Placeholders in

Tashani Kathriarachchi
In reply to this post by Tashani Kathriarachchi
You can write some custom code to do that, I would advise against it though, resolved properties should be injected not looked-up. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email