Hi Niclas,

Thank you for your detailed answers! It really helps me to understand the concept of Qi4j.

One question which I would like to clarify relates to item 5, please see inline.



5. A reference injected into a @This annotated member may vary from call to
call.

No for Mixins, and Yes for Concerns, SideEffects and Constraints.

Mixins can be considered injected at 'creation time' and they won't
change. But for the other fragments, they can be re-used between
method calls (still of the same Composite Type) into different
instances, so for instance @This would potentially change. This drives
the "you can't keep inter-method state in Concerns" requirement, since
there are no guarantees that the same Concern will be used next time,
or that the next call is in the same composite.

Is it thread-safe by design or, instead, a concern developer should take some actions to ensure the thread-safity?

Regards,

Eugene


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to