Hey Marco,

Now that your reference will be properly dynamic, multiple, I hope that

private B b;

as a non-volatile field is just an over simplification in your example. DS
concurrently calls bind methods on your component so setting of the
non-volatile private field will be dangerous. You'll want to ensure that
you handle that, such as making b volatile and making method local copies
of b before using it. You could also use an AtomicReference<B> instead.

There are also several other non-obvious concerns if you're gonna manage
your own "collection" of services. So take care with that.

Sincerely,
- Ray



On Nov 17, 2017 5:22 AM, "MarcoF90" <marco.fierimo...@gmail.com> wrote:

Hi Neil,

thank you for your answer, this further difference is clear to me.

Kind regards,
Marco



--
Sent from: http://apache-felix.18485.x6.nabble.com/Apache-Felix-Users-
f4833200.html

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

Reply via email to