You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by fabiolf <fa...@gmail.com> on 2013/01/19 19:04:11 UTC

[iPOJO] Question about bind changes in runtime

Good afternoon everybody!

I have a question about how iPOJO works on the Dynamic Reconfiguration
field. I've been working with iPOJO mainly in the scenario of changing a
bind in a component instance dependency when the provider is not available
anymore. So, when it is not available we can be sure it is not servicing any
requests.

However, there is another scenario with iPOJO that the bind can be changed
when a provider can be possible servicing requests; if I provide a
comparator that ranks the providers, if a new higher in the rank provider is
available, iPOJO changes the bind automatically, right? In that case, what
is the behavior? iPOJO waits for the request to be processed? If yes, how
does it do it? Or it just changes the bind without worrying much about
possible servicing requests?

Thanks,
Fabio



--
View this message in context: http://apache-felix.18485.n6.nabble.com/iPOJO-Question-about-bind-changes-in-runtime-tp5001457.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: [iPOJO] Question about bind changes in runtime

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/20/13 07:26 , fabiolf wrote:
> Hi Richard!
>
> Thank you for the explanation. Do you know if such technique is described in
> more details in any conference/journal paper? I would like to cite it in my
> work.

We mention this in the iPOJO section of the OSGi in Action book.

-> richard

>
> Thanks and Regards,
> Fabio
>
>
>
> --
> View this message in context: http://apache-felix.18485.n6.nabble.com/iPOJO-Question-about-bind-changes-in-runtime-tp5001457p5001462.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
>


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


Re: [iPOJO] Question about bind changes in runtime

Posted by fabiolf <fa...@gmail.com>.
Hi Richard!

Thank you for the explanation. Do you know if such technique is described in
more details in any conference/journal paper? I would like to cite it in my
work.

Thanks and Regards,
Fabio



--
View this message in context: http://apache-felix.18485.n6.nabble.com/iPOJO-Question-about-bind-changes-in-runtime-tp5001457p5001462.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: [iPOJO] Question about bind changes in runtime

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/19/13 13:04 , fabiolf wrote:
> Good afternoon everybody!
>
> I have a question about how iPOJO works on the Dynamic Reconfiguration
> field. I've been working with iPOJO mainly in the scenario of changing a
> bind in a component instance dependency when the provider is not available
> anymore. So, when it is not available we can be sure it is not servicing any
> requests.
>
> However, there is another scenario with iPOJO that the bind can be changed
> when a provider can be possible servicing requests; if I provide a
> comparator that ranks the providers, if a new higher in the rank provider is
> available, iPOJO changes the bind automatically, right?

If you've set the binding policy for that dependency to be 
"dynamic-priority", then yes. Otherwise, no.

> In that case, what
> is the behavior? iPOJO waits for the request to be processed? If yes, how
> does it do it? Or it just changes the bind without worrying much about
> possible servicing requests?

I don't know for sure if there is some specific mechanism in iPOJO to 
detect this case and do something special, but ordinarily iPOJO uses a 
service caching mechanism for threads that enter an iPOJO managed 
instance. This ensures that once a thread enters a component instance 
method, it will see the same service instances it uses until the thread 
ultimately exits the instance method.

So, in short, I don't think there would ever be a case where iPOJO would 
switch services in mid-stream on a thread, since it was explicitly 
designed to avoid doing so and thus relieve the component developer from 
worrying about that concurrency issues.

-> richard

>
> Thanks,
> Fabio
>
>
>
> --
> View this message in context: http://apache-felix.18485.n6.nabble.com/iPOJO-Question-about-bind-changes-in-runtime-tp5001457.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
>


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