Hi all,
Ephemeris Lappis originally asked about this issue :
I've tried to define in a blueprint a reference to an OSGi service using a
filter which value should be a property configured in an external
configuration file (etc/*.cfg).
It works as expected and the service is actually found when the filter value
is just given as a simple string.
<reference
id="my.db"
interface="javax.sql.DataSource"
filter="(osgi.jndi.service.name=jdbc/derby)" />
When I change the filter value using "${my.ds}", it fails, with this logged
error :
org.osgi.service.blueprint.container.ComponentDefinitionException:
org.osgi.framework.InvalidSyntaxException: Invalid operator:
)(objectClass=javax.sql.DataSource))
......
I'm also in need of this functionality.
e.g. we have lots of references like this which we expect to work :
<reference id="ldapPool" interface="org.apache.commons.pool.ObjectPool"
filter="(&(tenantId=${tenantId})(tenantEnv=${tenantEnv})(namespace=ldap))"/>
which actually doesn't work. :-(
So we need to duplicate a lot of Blueprint XML files and replace the values
using other means.
Is this feature planned? This would be very useful. I'm also glad we're not
the only one needing this feature.
Should we post a JIRA? (to Aries Blueprint project?)
Original thread:
http://servicemix.396122.n5.nabble.com/Property-in-OSGi-service-reference-filter-attribute-td5713964.html
This feature will also come in handy:
https://issues.apache.org/jira/browse/ARIES-727
Hendy
--
View this message in context:
http://aries.15396.n3.nabble.com/Property-in-OSGi-service-reference-filter-attribute-tp4025643.html
Sent from the Aries - User mailing list archive at Nabble.com.