
SBB
This example shows fragments of the JAIN SLEE 1.0 specification defined SBB deployment descriptor, and a corresponding
extension DD that informs Rhino that the SBB should use optimistic concurrency control.
SBB deployment descriptor fragment:
<sbb-jar>
<sbb id="TestSBB">
<description>Test SBB to show use of extension DD mechanism</description>
...
</sbb>
</sbb-jar>
SBB Extension deployment descriptor fragment:
<oc-sbb-jar>
<sbb id="TestSBB">
<lock-strategy>optimistic</lock-strategy>
...
</sbb>
</oc-sbb-jar>
18.6 Application Fail-Over
The JAIN SLEE programming model and the Rhino implementation of JAIN SLEE include some important robustness features
that should be considered by a developer when writing applications that will be in deployment for a long period of time.
One of the most important resources to manage when programming long running applications is memory. The JAIN SLEE
programming model alleviates a lot of the burden of memory management from the application developer by requiring the
SLEE implementation to manage the lifecycles of SBB entities and their state.
18.6.1 Programming Model
The JAIN SLEE programming model understands the relationship between an event producer and an event consumer. For
example consider that an SBB entity is an event consumer and an Activity is the event producer. If the SBB entity is not
attached to any ActivityContext then it will be deleted. Likewise if the ActivityContext ends then the SBB entities that are
attached to it are detached, in which case some SBB entities will not attached to any ActivityContext.
This model causes the following types of questions to be asked: What happens if the system is overloaded and cannot process
the activity as being ended? What happens if a Rhino node fails and the state of the SBB entity is replicated – will this leak
MemDB state?
The reason why Rhino SLEE will not run out of memory resource in either of these cases is that each Activity Rhino knows
of is periodically queried after it has been idle for a period of time. The RA is asked if the Activity has finished. The RA
understands the meaning of an activity and can end the activity if it has finished. This will cause the above deletion process to
occur thereby ensuring that resource is not leaked.
This process is explained using the following example for the SIP protocol.
Example
A developer writes an SBB that is interested in certain events (e.g. SIP events such as an INVITE and a BYE message). Assume
that the call progresses and a BYE is not received (either it was not sent by the SIP client, or the network between the SIP client
and Rhino was cut, or there could have been a 4xx message or a CANCEL message). If the SBB entity was not deleted by the
SLEE, then there would be a resource leak.
In the case of SIP all SIP messages are delivered on a SIP transaction activity. The SIP RA understands the SIP protocol and
Open Cloud Rhino 1.4.3 Administration Manual v1.1 111
Kommentare zu diesen Handbüchern