Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-28 Thread Cristiano Gavião
Thanks again David, your (and Neil's) explanation help me to understand this concept much better now. Interesting, I always thought that when declaring a component as Singleton we would have only one component and one instance of its service. but with the CM combination it can be very

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread David Jencks
I’m not sure I’m receiving all your replies…. Most of the things you can specify for a DS component are completely independent, which makes it very powerful, but there are a couple that aren’t and that can be confusing. It’s unusual to need to specify enabled=false. I don’t think I ever have.

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread Cristiano Gavião
Sorry, my mistake... only now I understood what you have said about enable=true be the default value... :-[ On 27/06/2016 19:16, Cristiano Gavião wrote: On 27/06/2016 18:48, David Jencks wrote: You’ve specified prototype scope, so there is never going to be “ONE” canonical instance. You

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread Cristiano Gavião
hummm... think I got the idea now... I will create another component to consume the registered service and see if the activate method is being called... thanks again, Cristiano On 27/06/2016 19:08, Neil Bartlett wrote: On 27 Jun 2016, at 23:05, Cristiano Gavião wrote:

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread Cristiano Gavião
On 27/06/2016 18:48, David Jencks wrote: You’ve specified prototype scope, so there is never going to be “ONE” canonical instance. You need something to request the service from the service reference or from the ServiceObjects interface from the service reference. With the default scope,

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread Neil Bartlett
> On 27 Jun 2016, at 23:05, Cristiano Gavião wrote: > > Thanks David and Neil, > > Humm, I don't think I understood yet. > > Ok, I don't have any other bundle/component consuming this service, yet. > > but in this case why I have an instance of the service that received

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread Cristiano Gavião
Thanks David and Neil, Humm, I don't think I understood yet. Ok, I don't have any other bundle/component consuming this service, yet. but in this case why I have an instance of the service that received the configuration from CM registered ? Look at the log below: 18:54:13.557 INFO :

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread David Jencks
You’ve specified prototype scope, so there is never going to be “ONE” canonical instance. You need something to request the service from the service reference or from the ServiceObjects interface from the service reference. With the default scope, you aren’t going to get an instance created

Re: doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread Neil Bartlett
Probably lazy activation. Your component is a service, of type FixedControllerService. No instances will be created until a consumer binds to it. Neil > On 27 Jun 2016, at 22:42, Cristiano Gavião wrote: > > Hello, > > I'm facing a situation that I'm not understanding.

doubt about component DS 1.3 with scope Prototype and ConfigurationPolicy.REQUIRE

2016-06-27 Thread Cristiano Gavião
Hello, I'm facing a situation that I'm not understanding. I'm using org.apache.felix.scr 2.0.2. I've set a component with this annotation: @Component(enabled = true, configurationPolicy = ConfigurationPolicy.REQUIRE, scope = ServiceScope.PROTOTYPE, service =