Hi Tom,

[email protected] schrieb:
> I'm trying to run an integration test for our application using
> spring-osgi testing framework. What i'm trying to do is:
> 
> 1. Extend AbstractConfigurableBundleCreatorTests and have it startup the
> felix container and deploy the test class as a bundle
> 2. Use the RepositoryAdmin to download and install our application bundles.
> 3. Get a hold of SCR managed services and invoke methods to run the test.
> 
> I have it downloading and installing the bundles, but i can't find a way
> of finding and invoking component services from the bundle context. Is
> there a way of finding the services declared using the scr.service tag
> via the bundleContext? Are there any alternate paths to integration
> testing inside an OSGI container?

I do not exactly understand what you are up to with respect to
"scr.service tag": Are you referring to the Maven SCR Plugin
@scr.service tag used in conjunction with @scr.component ? Are you thus
trying to automagically find out about components ?

If this is the case, there are two options here: The first option is
very portable but requires much hand-work: extract the SCR declaration
files from the bundles and parse them for the information you need.

The second option depends on using the Apache Felix Declarative Services
implementation: This registers a helper service
org.apache.felix.scr.ScrService, which can be queried for components.

Hope this helps.

Regards
Felix


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

Reply via email to