Questions about concurrency control
I have a doubt about concurrency control in the SLEE I hope someone can clarify them for me.
First of all, from the JAIN SLEE specification, we can read:
8.6.6 Concurrency control
The SLEE event router provides the following concurrency control semantics:
- The SLEE event router guarantees that there will be no concurrent execution within a single SBB
object. The SLEE will invoke all the methods of an SBB object serially. These methods include
the event handler methods, the local interface methods, and the life cycle callback methods
- The SLEE event router guarantees that two or more SBB entities will not concurrently receive
events on any single Activity Context. This allows the SBB Developer to develop event handler
methods without having to consider the implications of multiple execution threads that may interact
with the same Activity Context and the same underlying Activity object.
- Since an event is always fired on an Activity Context, the SLEE event router will always deliver
the event serially to SBB entities that may receive the event. The order in which these SBB entities
receive the event depends on their event delivery priorities (see Section 8.6.7).
With previous specification paragraph, I understand that with an unique Activity Context, there will be no problems with concurrency of events amongs SSB entities/objects, BUT...
...what happens if I have an SBB attached to two diffent activities?
...is the possible concurrency of events in these two activities controlled by SLEE?
...how can I manage this concurrence from my SBB?
According to the specification synchronized methods or synchronized statements are not allowed, so... ?