Hello,
I wonder if anyone can help me in my attempt to write a filter that
resolves against a complex property. I am using
org.apache.felix.bundlerepository-1.4.1.jar. I have constructed a
repository including a resource with,

<capability name='service'>
<p n='service' v='service'/>
<p n='osgi.service.blueprint.compname' v='server'/>
<p n='objectClass' t='set' v='my.componenttest.Server'/>
<p n='service.ranking' v='0'/>
<p n='service.intents' t='set' v='propagatesTransaction,confidentiality'/>
<p n='mandatory' v=''/></capability>

I am attempting to resolve a set of requirements including a service reference,

<require extend='false' multiple='false' optional='false'
name='service' 
filter='(&amp;(service.intents=confidentiality)(service=service)(objectClass=my.componenttest.Server)(mandatory:&lt;*service))'>

This test worked until I added the service.intents property into the
resource and filter. Resolver.resolve() now fails. The first value
returned by getUnsatisfiedRequirements() is,

(&(service.intents=confidentiality)(service=service)(objectClass=my.componenttest.Server)(mandatory:<*service))

 When I use a debugger to inspect ResolverImpl I am surprised to see
that m_admin.m_repoMap[0].value.m_resources[2].m_capList[1].m_map[4]
has a key of 'service.intents' and a char[37] value of
'propagatesTransaction,confidentiality' - i.e. it's just a simple
String or char array with a comma in: there's bo indication that the
value was of t='set'.

So far I have been able to take my OSGi blueprint reference's runtime
filter syntax and use that directly when constructing my OBR filters.
Am I doing something obviously wrong? I am worried that OBR might be
expecting some sort of set-specific filter syntax instead of
(service.intents=confidentiality) - that would be a problem since at
the point of parsing the blueprint xml I can not know whether the
service property service.intents is multiple or not.

I'd be very grateful for some assistance! Thank you!

Regards,
Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to