Search This Blog

Re: [mobicents-public] Distinguishing events from multiple RA entities in a service

As Edaurdo stated. SLEE does not distinguish RA Entities in such cases. What you can do:
Declare mupltiple RA Types, implement in single RA. Based on some factor, fire different type of event. Its a bit bad, since part of application logic is moved to RA.

Alternative is to use event/activity specific information, ie in SIP RA:
 - contact address in sip message, 
 - via header contents(for instance IP:PORT)
 - TransactionExt interface - local/remote IP:PORT etc, etc.


Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.


2011/3/28 Eduardo Martins <emmartins@gmail.com>
By the way, just to correct some of your reasoning, the ACI Factory is
not bound to a particular RA Entity, it is bound to the RA Type (see
the sbb descriptor). This means the factory will interact with all RA
entities of the RA Type, no matter if you are bound to just a
particular entity link for the SBB Interface. The factory will only
return null if the activity does not belongs to any of the existent RA
entities.

-- Eduardo
..............................................
http://emmartins.blogspot.com
http://redhat.com/solutions/telco

2011/3/28 Vilius Panevėžys <vilius@elitnet.lt>:
> When a service has multiple resource adaptor entity bindings, sometimes
> there's the need to distinguish the particular entity that delivered an
> event.
>
> There are a couple of RA-implementation-specific methods for that in our
> case one of which involves exposing implementation classes to SBB, which is
> not clean and I always prefer doing things the standard and recommended way.
>
> One method that should work according to JSLEE is to get the activity from
> event, then iterate through ACIFs of all bound RA entities invoking
> getActivityContextInterface(activity). The activity belongs to the entity,
> which returned non-null ACI. Is this good performance-wise? Are there any
> superior methods?
>
>
> TIA,
> --
> Vilius Panevėžys
> Elitnet
>