[rules-users] Multi Access to Stateful Session

Wolfgang Laun wolfgang.laun at gmail.com
Mon Apr 2 13:35:10 EDT 2012


So it looks like a race condition.

There is one chink in the snchronizing armour of class MessageControl.
The Map excludedPositions (although in itself synchronized on its own
lock) is exposed via the getExcludedPositions. Thus, synchronization
between currentPosition and excludedPositions is broken. I can't say
whether this matters, but just try and add delegating methods to
MessageControl and remove getExcludedPositions. (And use a plain
HashSet - synchronization is provided by MessageControl.)

Obviously, rules will have to use something like
   atExcludedPosition == true
when the Map is fully privatized.

-W


On 02/04/2012, gboro54 <gboro54 at gmail.com> wrote:
> A gap would have to occur somewhere but I am not sure how or why.
> Since I am using the same data for each test case, the outcome should
> be the same but 75% of the time to position stops at a random point
> and thus allows messages to backup in memory
>
> On Mon, Apr 2, 2012 at 12:19 PM, laune [via Drools]
> <ml-node+s46999n3878174h55 at n3.nabble.com> wrote:
>> What is the current position value in the controller when it blocks? A
>> regular message rank or one of those not to be processed or both?
>>
>> Are you sure that message ranks are increasing without gaps except
>> those in the excluded position map?
>>
>> -W
>>
>> On 02/04/2012, gboro54 <[hidden email]> wrote:
>>
>>> Forgo to mention each time a position is added to the excluded position
>>> map,
>>> the insertOrUpdate method is called on the session wrapper.
>>>
>>> --
>>> View this message in context:
>>>
>>> http://drools.46999.n3.nabble.com/Multi-Access-to-Stateful-Session-tp3877599p3877622.html
>>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>>> _______________________________________________
>>> rules-users mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>> _______________________________________________
>> rules-users mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://drools.46999.n3.nabble.com/Multi-Access-to-Stateful-Session-tp3877599p3878174.html
>> To unsubscribe from Multi Access to Stateful Session, click here.
>> NAML
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Multi-Access-to-Stateful-Session-tp3877599p3878257.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list