Skip to main content

concurrent event processing by the same sbb entity

4 replies [Last post]
scottjg
Offline
Joined: 2008-08-21

Hi,

I have problem with processing two events of diffrent types by the same sbb entity. I'm using initial event selector method, where I'm using common identifier for both events. Both of them are processing by the same sbb entity. I have a situation where one event handler method have not finished processing (and CMP's value is not visible until commit transaction) and the second event comes, and it is processed concurrently by the same sbb entity, using same CMP field, but its value is not visible to it yet (until first method finished).
I don't remeber but I thought that if one sbb entity process multiple events, it do it one by one ?

Thanks,
scottjg

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eduardomartins
Offline
Joined: 2005-10-10

when routing event sthe only serialization is per activity

scottjg
Offline
Joined: 2008-08-21

I understand.
I noticed antoher problem. As I write before I'm using initial event selector method. When I receive event type X I set custome name to specific identifier which I get from event X.
For the first time everything is ok. For the second event of type X but with different identifier initial event selector method is called once but method handler is called twice. For the third event of type X again selector method is called once but method handler of event X is called three times and so on.
I thought that it will be one sbb entity tree per activity (activity which is corelated with event X identifier. tree because I create child sbb).

The structure of my solution looks like:

Activity X | Event type X (id1) ----> RootSbb (entity1) ---- (id1 to ext app)----> ExtApp
ExtApp NullActivity|Event type Y(id1) ---> RootSbb(entity1) --->create childSbb

At the beginning I had hope to avoid external resources to store state data and using only JSLEE features, but I see it's hard to desaing such solution.

Thanks again,
scottjg

eduardomartins
Offline
Joined: 2005-10-10

That happens because in each time an event comes, the initial event selector method is generating a new custom name, thus another sbb entity is created and is attached to the same activity.

scottjg
Offline
Joined: 2008-08-21

exactly :)

I detach when I get event type X from activity and everything is ok. Besides I notice in management console where is activity list that I must detach from Null activity too. It's time to read about activity something more:)

Thanks once again for help,
scottjg