You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by jie yan <ya...@gmail.com> on 2011/07/16 16:02:53 UTC

ipojo @ServiceProperty field cannot be configured by FileInstall?

I configured some ipojo components by FileInstall, as following:

1) install ConfigAdmin, FileInstall;
2) set the managedservice attribute, @Component(managedservice="com-pid");
3) create com-pid.cfg file inside /load directory

In this way, I successfully configured some components except one
javax.servlet.Filter implementation.

The only difference I found out is, the field of Filter component to be
configured is @ServiceProperty, while the fields of other components all is
@Property.

Is it the real reason?

Regards,
drhades

Re: ipojo @ServiceProperty field cannot be configured by FileInstall?

Posted by jie yan <ya...@gmail.com>.
That's it!
Thank Clement.

Regards,
drhades

On Tue, Jul 19, 2011 at 6:40 PM, Clement Escoffier <
clement.escoffier@gmail.com> wrote:

> Hi,
>
>
> Oh I see, I misunderstood your previous mail.
> So, as you're using ManagedService (and not ManagedServiceFactory), use:
>
> @Property
> @ServiceProperty
> private String myProp;
>
> Regards,
>
> Clement
>
> On 19.07.2011, at 11:38, jie yan wrote:
>
> > On Tue, Jul 19, 2011 at 3:40 PM, Clement Escoffier <
> > clement.escoffier@gmail.com> wrote:
> >
> >> Hi,
> >>
> >>
> >>
> >> On 16.07.2011, at 16:02, jie yan wrote:
> >>
> >>> I configured some ipojo components by FileInstall, as following:
> >>>
> >>> 1) install ConfigAdmin, FileInstall;
> >>> 2) set the managedservice attribute,
> >> @Component(managedservice="com-pid");
> >>> 3) create com-pid.cfg file inside /load directory
> >>>
> >>> In this way, I successfully configured some components except one
> >>> javax.servlet.Filter implementation.
> >>>
> >>> The only difference I found out is, the field of Filter component to be
> >>> configured is @ServiceProperty, while the fields of other components
> all
> >> is
> >>> @Property.
> >>>
> >>> Is it the real reason?
> >>
> >> No, that should not matter. Did you try to add 'immediate=true' to your
> >> @Component ?
> >>
> > I tried, but failed again.
> >
> > Now, component defination is by annotation, instance creation is by
> > meta.xml, and component configuration is by FileInstall *.cfg.
> > Maybe it's because of the complex order of instance creation,
> configuration
> > and update? I'll debug into felix more deeply.
> >
> > Regards,
> > drhades
> >
> >>
> >> Regards,
> >>
> >> Clement
> >>
> >>
> >>>
> >>> Regards,
> >>> drhades
> >>
> >>
>
>

Re: ipojo @ServiceProperty field cannot be configured by FileInstall?

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,


Oh I see, I misunderstood your previous mail. 
So, as you're using ManagedService (and not ManagedServiceFactory), use:

@Property
@ServiceProperty
private String myProp;

Regards,

Clement

On 19.07.2011, at 11:38, jie yan wrote:

> On Tue, Jul 19, 2011 at 3:40 PM, Clement Escoffier <
> clement.escoffier@gmail.com> wrote:
> 
>> Hi,
>> 
>> 
>> 
>> On 16.07.2011, at 16:02, jie yan wrote:
>> 
>>> I configured some ipojo components by FileInstall, as following:
>>> 
>>> 1) install ConfigAdmin, FileInstall;
>>> 2) set the managedservice attribute,
>> @Component(managedservice="com-pid");
>>> 3) create com-pid.cfg file inside /load directory
>>> 
>>> In this way, I successfully configured some components except one
>>> javax.servlet.Filter implementation.
>>> 
>>> The only difference I found out is, the field of Filter component to be
>>> configured is @ServiceProperty, while the fields of other components all
>> is
>>> @Property.
>>> 
>>> Is it the real reason?
>> 
>> No, that should not matter. Did you try to add 'immediate=true' to your
>> @Component ?
>> 
> I tried, but failed again.
> 
> Now, component defination is by annotation, instance creation is by
> meta.xml, and component configuration is by FileInstall *.cfg.
> Maybe it's because of the complex order of instance creation, configuration
> and update? I'll debug into felix more deeply.
> 
> Regards,
> drhades
> 
>> 
>> Regards,
>> 
>> Clement
>> 
>> 
>>> 
>>> Regards,
>>> drhades
>> 
>> 


Re: ipojo @ServiceProperty field cannot be configured by FileInstall?

Posted by jie yan <ya...@gmail.com>.
On Tue, Jul 19, 2011 at 3:40 PM, Clement Escoffier <
clement.escoffier@gmail.com> wrote:

> Hi,
>
>
>
> On 16.07.2011, at 16:02, jie yan wrote:
>
> > I configured some ipojo components by FileInstall, as following:
> >
> > 1) install ConfigAdmin, FileInstall;
> > 2) set the managedservice attribute,
> @Component(managedservice="com-pid");
> > 3) create com-pid.cfg file inside /load directory
> >
> > In this way, I successfully configured some components except one
> > javax.servlet.Filter implementation.
> >
> > The only difference I found out is, the field of Filter component to be
> > configured is @ServiceProperty, while the fields of other components all
> is
> > @Property.
> >
> > Is it the real reason?
>
> No, that should not matter. Did you try to add 'immediate=true' to your
> @Component ?
>
I tried, but failed again.

Now, component defination is by annotation, instance creation is by
meta.xml, and component configuration is by FileInstall *.cfg.
Maybe it's because of the complex order of instance creation, configuration
and update? I'll debug into felix more deeply.

Regards,
drhades

>
> Regards,
>
> Clement
>
>
> >
> > Regards,
> > drhades
>
>

Re: ipojo @ServiceProperty field cannot be configured by FileInstall?

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,



On 16.07.2011, at 16:02, jie yan wrote:

> I configured some ipojo components by FileInstall, as following:
> 
> 1) install ConfigAdmin, FileInstall;
> 2) set the managedservice attribute, @Component(managedservice="com-pid");
> 3) create com-pid.cfg file inside /load directory
> 
> In this way, I successfully configured some components except one
> javax.servlet.Filter implementation.
> 
> The only difference I found out is, the field of Filter component to be
> configured is @ServiceProperty, while the fields of other components all is
> @Property.
> 
> Is it the real reason?

No, that should not matter. Did you try to add 'immediate=true' to your @Component ?

Regards,

Clement


> 
> Regards,
> drhades