Re: Bundles needed to use DS/SCR

2016-08-11 Thread Benson Margulies
Yup, I have it all working. I have to have a family of an abstract class and subclasses of tests if each test needs different CM properties, but that's better than the bigger mess I was making before. On Thu, Aug 11, 2016 at 2:59 AM, Christian Schneider wrote: >

Re: Bundles needed to use DS/SCR

2016-08-11 Thread Christian Schneider
pax-exam-cm just sets up the config. As far as I know it does not install config admin so you will still need the bundle. Christian 2016-08-11 1:42 GMT+02:00 Benson Margulies : > For one of my tests, pax-exam-cm looks great. Do I include felix > config admin with it or

Re: Bundles needed to use DS/SCR

2016-08-11 Thread Oliver Lietz
On Wednesday 10 August 2016 19:42:52 Benson Margulies wrote: > For one of my tests, pax-exam-cm looks great. Do I include felix > config admin with it or not? Not sure if I understand your question, but you have to provide Metatype Service and Configuration Admin Service when using Felix DS/SCR.

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
For one of my tests, pax-exam-cm looks great. Do I include felix config admin with it or not? For another, I need each test method to have different configuration, so I'd have to make multiple test classes, no? - To unsubscribe,

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Oliver Lietz
On Wednesday 10 August 2016 11:29:00 Benson Margulies wrote: > Configuration-wise, I have the following code. Logging-wise, I have > pax-exam installing logging, but I will recheck that. > > > org.osgi.service.cm.Configuration workerConf = >

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
On Wed, Aug 10, 2016 at 11:35 AM, David Jencks wrote: > As discussed on another thread today, this one-arg getConfiguration call > nails the configuration to the bundle doing the calling, which usually isn’t > what you want since it usually isn’t the bundle with

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
I see a much dumber mistake here. Sorry for the noise. The test is not pushing the config to the right PID at all. On Wed, Aug 10, 2016 at 11:43 AM, Benson Margulies wrote: > On Wed, Aug 10, 2016 at 11:35 AM, David Jencks > wrote: >> As

Re: Bundles needed to use DS/SCR

2016-08-10 Thread David Jencks
As discussed on another thread today, this one-arg getConfiguration call nails the configuration to the bundle doing the calling, which usually isn’t what you want since it usually isn’t the bundle with the component you’re trying to configure. Use the 2-arg getConfiguration method passing

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
Configuration-wise, I have the following code. Logging-wise, I have pax-exam installing logging, but I will recheck that. org.osgi.service.cm.Configuration workerConf = configurationAdmin.getConfiguration("com.basistech.ws.worker"); Dictionary props = new Hashtable<>(); Path

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
I have some more information. While I still don't know where my log message are going, I turned on the gogo remote shell. According to scr:info, my component is alive. However, I can't obtain a service reference to the service it exports with a plain old ServiceTracker or call to my bundle

Re: Bundles needed to use DS/SCR

2016-08-10 Thread Carsten Ziegeler
Just guessing but you have: > Configuration Policy: require Do you have a configuration for this component in config admin? Carsten -- Carsten Ziegeler Adobe Research Switzerland cziege...@apache.org - To unsubscribe,

Re: Bundles needed to use DS/SCR

2016-08-10 Thread David Jencks
> Configuration Policy: require > (No Component Configurations) You need a configuration or change the configuration policy. Is your minimal container so minimal that it doesn’t include a log service or something to collect messages from it? david jencks > On Aug 10, 2016, at 8:14 AM, Benson

Bundles needed to use DS/SCR

2016-08-10 Thread Benson Margulies
For unit testing purposes, I'm setting up a minimal container that has DS/SCR . I included: org.apache.felix org.apache.felix.scr 2.0.6 I set the framework ds.loglevel property to debug, and I see no sign of life. I'm using standard OSGi DS annotations. Can anyone tell me what I'm missing?