You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Olivier Bigard <ob...@axway.com> on 2011/05/09 10:35:35 UTC

ConfigAdmin and iPojo

Hi all,

I've got a question regarding the OSGi ConfigAdmin service used in
association with iPojo.

Here is what I want to do:
I've got 2 Felix instances in my architecture.
One of these instances is currently running, the other one is stopped.
If I change some configurations in the running instance of Felix using the
ConfigAdmin service in association with iPojo, all my iPojo instances are
correctly created/updated in this Felix instance.

What I want when starting the second Felix instance is all the existing
iPojo instances to be updated with the same configuration (the one modified
in the first Felix instance) before starting.

Of course, to do that our application is responsible to store the
configuration of instances in a central repository to be accessible by all
my felix instances.

My question is: what is the best technical solution to update an iPojo
instance configuration before starting it?
Do I have to manually modify the configuration files in the "cache" folder
of the second Felix instance before starting it?

Thank you for your advices

Olivier
-- 
View this message in context: http://old.nabble.com/ConfigAdmin-and-iPojo-tp31574943p31574943.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: RE: ConfigAdmin and iPojo

Posted by Tribon Cheng <tr...@gmail.com>.
I am using SpingDM,
在 2011-5-9 下午8:45,"Bigard Olivier" <ob...@axway.com>写道:
> Hi,
>
> What do you mean by "while the ipojo instance is being registered"?
> How to be triggered when it is happening?
> Is there a callback method that is always called when it is happening?
>
> Thanks
> Olivier
>
> -----Message d'origine-----
> De : Tribon Cheng [mailto:tribon1980@gmail.com]
> Envoyé : lundi 9 mai 2011 14:41
> À : users@felix.apache.org
> Objet : Re: ConfigAdmin and iPojo
>
> I mean while the ipojo instance is being registered, you can update it by
> configAdmin service according to the stored data from the central
> repository.
> 在 2011-5-9 下午8:36,"Tribon Cheng" <tr...@gmail.com>写道:
>> I think you can use the configAdmin service to update the ipojo instances
> of
>> the second felix instance while the bundle is initiating, or the ipojo
>> service is been registered.
>> 在 2011-5-9 下午4:36,"Olivier Bigard" <ob...@axway.com>写道:
>>>
>>> Hi all,
>>>
>>> I've got a question regarding the OSGi ConfigAdmin service used in
>>> association with iPojo.
>>>
>>> Here is what I want to do:
>>> I've got 2 Felix instances in my architecture.
>>> One of these instances is currently running, the other one is stopped.
>>> If I change some configurations in the running instance of Felix using
> the
>>> ConfigAdmin service in association with iPojo, all my iPojo instances
are
>>> correctly created/updated in this Felix instance.
>>>
>>> What I want when starting the second Felix instance is all the existing
>>> iPojo instances to be updated with the same configuration (the one
>> modified
>>> in the first Felix instance) before starting.
>>>
>>> Of course, to do that our application is responsible to store the
>>> configuration of instances in a central repository to be accessible by
> all
>>> my felix instances.
>>>
>>> My question is: what is the best technical solution to update an iPojo
>>> instance configuration before starting it?
>>> Do I have to manually modify the configuration files in the "cache"
> folder
>>> of the second Felix instance before starting it?
>>>
>>> Thank you for your advices
>>>
>>> Olivier
>>> --
>>> View this message in context:
>> http://old.nabble.com/ConfigAdmin-and-iPojo-tp31574943p31574943.html
>>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>

Re: ConfigAdmin and iPojo

Posted by Tribon Cheng <tr...@gmail.com>.
I am using SpringDM, but declarative service is just the same.

 Using services with method injection
*XML*

<component classname="my.consumer.Implementation">
    <requires>
	<callback type="bind" method="bind" />
	<callback type="unbind" method="unbind" />
        <callback type="modified" method="modified" /> <!-- for
filtered service dependencies, to be notified when a service is
modified but still match -->
    </requires>	</component>



On Mon, May 9, 2011 at 8:44 PM, Bigard Olivier <ob...@axway.com> wrote:

> Hi,
>
> What do you mean by "while the ipojo instance is being registered"?
> How to be triggered when it is happening?
> Is there a callback method that is always called when it is happening?
>
> Thanks
> Olivier
>
> -----Message d'origine-----
> De : Tribon Cheng [mailto:tribon1980@gmail.com]
> Envoyé : lundi 9 mai 2011 14:41
> À : users@felix.apache.org
> Objet : Re: ConfigAdmin and iPojo
>
> I mean while the ipojo instance is being registered, you can update it by
> configAdmin service according to the stored data from the central
> repository.
> 在 2011-5-9 下午8:36,"Tribon Cheng" <tr...@gmail.com>写道:
> > I think you can use the configAdmin service to update the ipojo instances
> of
> > the second felix instance while the bundle is initiating, or the ipojo
> > service is been registered.
> > 在 2011-5-9 下午4:36,"Olivier Bigard" <ob...@axway.com>写道:
> >>
> >> Hi all,
> >>
> >> I've got a question regarding the OSGi ConfigAdmin service used in
> >> association with iPojo.
> >>
> >> Here is what I want to do:
> >> I've got 2 Felix instances in my architecture.
> >> One of these instances is currently running, the other one is stopped.
> >> If I change some configurations in the running instance of Felix using
> the
> >> ConfigAdmin service in association with iPojo, all my iPojo instances
> are
> >> correctly created/updated in this Felix instance.
> >>
> >> What I want when starting the second Felix instance is all the existing
> >> iPojo instances to be updated with the same configuration (the one
> > modified
> >> in the first Felix instance) before starting.
> >>
> >> Of course, to do that our application is responsible to store the
> >> configuration of instances in a central repository to be accessible by
> all
> >> my felix instances.
> >>
> >> My question is: what is the best technical solution to update an iPojo
> >> instance configuration before starting it?
> >> Do I have to manually modify the configuration files in the "cache"
> folder
> >> of the second Felix instance before starting it?
> >>
> >> Thank you for your advices
> >>
> >> Olivier
> >> --
> >> View this message in context:
> > http://old.nabble.com/ConfigAdmin-and-iPojo-tp31574943p31574943.html
> >> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
>



-- 
Contribute to Enterprise Integration

RE: ConfigAdmin and iPojo

Posted by Bigard Olivier <ob...@axway.com>.
Hi,

What do you mean by "while the ipojo instance is being registered"?
How to be triggered when it is happening?
Is there a callback method that is always called when it is happening?

Thanks
Olivier

-----Message d'origine-----
De : Tribon Cheng [mailto:tribon1980@gmail.com] 
Envoyé : lundi 9 mai 2011 14:41
À : users@felix.apache.org
Objet : Re: ConfigAdmin and iPojo

I mean while the ipojo instance is being registered, you can update it by
configAdmin service according to the stored data from the central
repository.
在 2011-5-9 下午8:36,"Tribon Cheng" <tr...@gmail.com>写道:
> I think you can use the configAdmin service to update the ipojo instances
of
> the second felix instance while the bundle is initiating, or the ipojo
> service is been registered.
> 在 2011-5-9 下午4:36,"Olivier Bigard" <ob...@axway.com>写道:
>>
>> Hi all,
>>
>> I've got a question regarding the OSGi ConfigAdmin service used in
>> association with iPojo.
>>
>> Here is what I want to do:
>> I've got 2 Felix instances in my architecture.
>> One of these instances is currently running, the other one is stopped.
>> If I change some configurations in the running instance of Felix using
the
>> ConfigAdmin service in association with iPojo, all my iPojo instances are
>> correctly created/updated in this Felix instance.
>>
>> What I want when starting the second Felix instance is all the existing
>> iPojo instances to be updated with the same configuration (the one
> modified
>> in the first Felix instance) before starting.
>>
>> Of course, to do that our application is responsible to store the
>> configuration of instances in a central repository to be accessible by
all
>> my felix instances.
>>
>> My question is: what is the best technical solution to update an iPojo
>> instance configuration before starting it?
>> Do I have to manually modify the configuration files in the "cache"
folder
>> of the second Felix instance before starting it?
>>
>> Thank you for your advices
>>
>> Olivier
>> --
>> View this message in context:
> http://old.nabble.com/ConfigAdmin-and-iPojo-tp31574943p31574943.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>

Re: ConfigAdmin and iPojo

Posted by Tribon Cheng <tr...@gmail.com>.
I mean while the ipojo instance is being registered, you can update it by
configAdmin service according to the stored data from the central
repository.
在 2011-5-9 下午8:36,"Tribon Cheng" <tr...@gmail.com>写道:
> I think you can use the configAdmin service to update the ipojo instances
of
> the second felix instance while the bundle is initiating, or the ipojo
> service is been registered.
> 在 2011-5-9 下午4:36,"Olivier Bigard" <ob...@axway.com>写道:
>>
>> Hi all,
>>
>> I've got a question regarding the OSGi ConfigAdmin service used in
>> association with iPojo.
>>
>> Here is what I want to do:
>> I've got 2 Felix instances in my architecture.
>> One of these instances is currently running, the other one is stopped.
>> If I change some configurations in the running instance of Felix using
the
>> ConfigAdmin service in association with iPojo, all my iPojo instances are
>> correctly created/updated in this Felix instance.
>>
>> What I want when starting the second Felix instance is all the existing
>> iPojo instances to be updated with the same configuration (the one
> modified
>> in the first Felix instance) before starting.
>>
>> Of course, to do that our application is responsible to store the
>> configuration of instances in a central repository to be accessible by
all
>> my felix instances.
>>
>> My question is: what is the best technical solution to update an iPojo
>> instance configuration before starting it?
>> Do I have to manually modify the configuration files in the "cache"
folder
>> of the second Felix instance before starting it?
>>
>> Thank you for your advices
>>
>> Olivier
>> --
>> View this message in context:
> http://old.nabble.com/ConfigAdmin-and-iPojo-tp31574943p31574943.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>

Re: ConfigAdmin and iPojo

Posted by Tribon Cheng <tr...@gmail.com>.
I think you can use the configAdmin service to update the ipojo instances of
the second felix instance while the bundle is initiating, or the ipojo
service is been registered.
在 2011-5-9 下午4:36,"Olivier Bigard" <ob...@axway.com>写道:
>
> Hi all,
>
> I've got a question regarding the OSGi ConfigAdmin service used in
> association with iPojo.
>
> Here is what I want to do:
> I've got 2 Felix instances in my architecture.
> One of these instances is currently running, the other one is stopped.
> If I change some configurations in the running instance of Felix using the
> ConfigAdmin service in association with iPojo, all my iPojo instances are
> correctly created/updated in this Felix instance.
>
> What I want when starting the second Felix instance is all the existing
> iPojo instances to be updated with the same configuration (the one
modified
> in the first Felix instance) before starting.
>
> Of course, to do that our application is responsible to store the
> configuration of instances in a central repository to be accessible by all
> my felix instances.
>
> My question is: what is the best technical solution to update an iPojo
> instance configuration before starting it?
> Do I have to manually modify the configuration files in the "cache" folder
> of the second Felix instance before starting it?
>
> Thank you for your advices
>
> Olivier
> --
> View this message in context:
http://old.nabble.com/ConfigAdmin-and-iPojo-tp31574943p31574943.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

Re: ConfigAdmin and iPojo

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 5/9/11 10:39, Bigard Olivier wrote:
> If I understand correctly, we have to implement our own ConfigAdmin PersistenceManager implementation to not store/load configs from file system, but directly from our DB. Am I right?

That is my understanding.

> And we just have to expose our implementation of this PersistenceManager OSGi service and Felix will use our own, not the default one.

Well, not Felix the framework, but the Felix Config Admin 
implementation...I guess that's how it should work...

-> richard

> Thanks
> Olivier
>
>
> -----Message d'origine-----
> De : Richard S. Hall [mailto:heavy@ungoverned.org]
> Envoyé : lundi 9 mai 2011 16:08
> À : users@felix.apache.org
> Objet : Re: ConfigAdmin and iPojo
>
> Perhaps I'm missing something, but if your instances are configured with
> Config Admin, then you just need to make sure it has the updated values,
> no? If you are using a shared configuration database for Config Admin,
> then when iPOJO starts in the second framework, it will use the updated
> config data, won't it? iPOJO doesn't save this configuration or the
> instances some place, it is recreated each execution.
>
> ->  richard
>
> On 5/9/11 4:35, Olivier Bigard wrote:
>> Hi all,
>>
>> I've got a question regarding the OSGi ConfigAdmin service used in
>> association with iPojo.
>>
>> Here is what I want to do:
>> I've got 2 Felix instances in my architecture.
>> One of these instances is currently running, the other one is stopped.
>> If I change some configurations in the running instance of Felix using the
>> ConfigAdmin service in association with iPojo, all my iPojo instances are
>> correctly created/updated in this Felix instance.
>>
>> What I want when starting the second Felix instance is all the existing
>> iPojo instances to be updated with the same configuration (the one modified
>> in the first Felix instance) before starting.
>>
>> Of course, to do that our application is responsible to store the
>> configuration of instances in a central repository to be accessible by all
>> my felix instances.
>>
>> My question is: what is the best technical solution to update an iPojo
>> instance configuration before starting it?
>> Do I have to manually modify the configuration files in the "cache" folder
>> of the second Felix instance before starting it?
>>
>> Thank you for your advices
>>
>> Olivier
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: ConfigAdmin and iPojo

Posted by Bigard Olivier <ob...@axway.com>.
If I understand correctly, we have to implement our own ConfigAdmin PersistenceManager implementation to not store/load configs from file system, but directly from our DB. Am I right?
And we just have to expose our implementation of this PersistenceManager OSGi service and Felix will use our own, not the default one.

Thanks
Olivier


-----Message d'origine-----
De : Richard S. Hall [mailto:heavy@ungoverned.org] 
Envoyé : lundi 9 mai 2011 16:08
À : users@felix.apache.org
Objet : Re: ConfigAdmin and iPojo

Perhaps I'm missing something, but if your instances are configured with 
Config Admin, then you just need to make sure it has the updated values, 
no? If you are using a shared configuration database for Config Admin, 
then when iPOJO starts in the second framework, it will use the updated 
config data, won't it? iPOJO doesn't save this configuration or the 
instances some place, it is recreated each execution.

-> richard

On 5/9/11 4:35, Olivier Bigard wrote:
> Hi all,
>
> I've got a question regarding the OSGi ConfigAdmin service used in
> association with iPojo.
>
> Here is what I want to do:
> I've got 2 Felix instances in my architecture.
> One of these instances is currently running, the other one is stopped.
> If I change some configurations in the running instance of Felix using the
> ConfigAdmin service in association with iPojo, all my iPojo instances are
> correctly created/updated in this Felix instance.
>
> What I want when starting the second Felix instance is all the existing
> iPojo instances to be updated with the same configuration (the one modified
> in the first Felix instance) before starting.
>
> Of course, to do that our application is responsible to store the
> configuration of instances in a central repository to be accessible by all
> my felix instances.
>
> My question is: what is the best technical solution to update an iPojo
> instance configuration before starting it?
> Do I have to manually modify the configuration files in the "cache" folder
> of the second Felix instance before starting it?
>
> Thank you for your advices
>
> Olivier

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ConfigAdmin and iPojo

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Perhaps I'm missing something, but if your instances are configured with 
Config Admin, then you just need to make sure it has the updated values, 
no? If you are using a shared configuration database for Config Admin, 
then when iPOJO starts in the second framework, it will use the updated 
config data, won't it? iPOJO doesn't save this configuration or the 
instances some place, it is recreated each execution.

-> richard

On 5/9/11 4:35, Olivier Bigard wrote:
> Hi all,
>
> I've got a question regarding the OSGi ConfigAdmin service used in
> association with iPojo.
>
> Here is what I want to do:
> I've got 2 Felix instances in my architecture.
> One of these instances is currently running, the other one is stopped.
> If I change some configurations in the running instance of Felix using the
> ConfigAdmin service in association with iPojo, all my iPojo instances are
> correctly created/updated in this Felix instance.
>
> What I want when starting the second Felix instance is all the existing
> iPojo instances to be updated with the same configuration (the one modified
> in the first Felix instance) before starting.
>
> Of course, to do that our application is responsible to store the
> configuration of instances in a central repository to be accessible by all
> my felix instances.
>
> My question is: what is the best technical solution to update an iPojo
> instance configuration before starting it?
> Do I have to manually modify the configuration files in the "cache" folder
> of the second Felix instance before starting it?
>
> Thank you for your advices
>
> Olivier

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org