Thanks for the explanation. This makes things clearer and explain why it was
designed like this.


2010/4/4 Ayende Rahien <[email protected]>

> Huh? I am not sure that I understand what you mean.
> Wait!
> Oh, okay, now I see it.
> The entire process is assuming that transaction commit is what rules the
> roost. This work with NH because a DTC commit will trigger a flush, L2S
> seems to have skipped that are requires an explicit submit changes even when
> using DTC.
> I've added an event BeforeMessageTransactionComplete that should handle
> your scenario
>
>   On Sun, Apr 4, 2010 at 2:27 AM, Sebastien Crocquesel <[email protected]
> > wrote:
>
>>   That's true but the the linq datacontext is involved in the transaction
>> when submitchanges is called, that is, at best as an IMessageModule can do
>> it, after the transaction is commited. So, with the current api, we lose the
>> whole transaction purpose when implementing a unit of work throug an
>> IMessageModule.
>>
>>
>>
>>
>> 2010/4/3 Ayende Rahien <[email protected]>
>>
>>>   Sebastian,
>>> The whole point is that the System.Transactions.Transaction commits for
>>> everything or roll back for everything.
>>> There is no inconsistency.
>>>
>>>   On Sat, Apr 3, 2010 at 1:01 PM, Sebastien Crocquesel <
>>> [email protected]> wrote:
>>>
>>>>   It won't change anything. Say that processing your message involve a
>>>> database with linq or nhibernate + other transactional things. Maybe it 
>>>> sent
>>>> another message or the transactionscope is filled with other things.
>>>> Message is completed the transaction scope is commited and dispose
>>>> making the new message to be sent in the queue and the others 
>>>> transactionals
>>>> things to be commited, but my nhibernate session or linq datacontext 
>>>> failed.
>>>> That state is inconsistent and the message must not be retried or you'll
>>>> end up with having things twice but nothing in the database either.
>>>>
>>>> We cannot create a transactionscope that will encapsulate the one which
>>>> is created in the ReceiveMessageInTransaction because MessageArrived
>>>> event is raised after.
>>>>
>>>> Maybe we're missing an event like MessageCompleting that would be raised
>>>> before tx.Complete(); Or make the messageCompleted be raised before.
>>>> As far as I understand, call order are like this :
>>>>
>>>> 1/ Begin tran
>>>> 2/ raise MessageArrived
>>>> 3/ call Consumer
>>>> 4/ Commit tran
>>>> 5/ raise MessageCompleted
>>>>
>>>> There is not way to be both before begin tran and after commit tran or
>>>> to be both after begin tran and before commit tran.
>>>>
>>>> sébastien
>>>>
>>>>
>>>> 2010/4/1 Jason Meckley <[email protected]>
>>>>
>>>> set the numberOfRetries attribute on the bus configuration node.
>>>>>
>>>>> On Apr 1, 11:46 am, Sebastien Crocquesel <[email protected]> wrote:
>>>>> > With a linq datacontext, my unit of work message module is submitting
>>>>> > changes in response to the ITransport.MessageProcessingCompleted
>>>>> event.
>>>>> > I though it was a good way to do so but an exception occured during
>>>>> > processing the event and my data were not affected but the message is
>>>>> > discarded and exception silently catch with an error log message :
>>>>> "An error
>>>>> > occured when raising the MessageCompleted event, the error will NOT
>>>>> affect
>>>>> > the message processing".
>>>>> >
>>>>> > Where do you end your session or submitchanges so that if an error
>>>>> occured
>>>>> > due to a database failure, message will be replayed latter. Am i
>>>>> missing
>>>>> > something ?
>>>>> >
>>>>> > sébastien
>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Rhino Tools Dev" group.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]<rhino-tools-dev%[email protected]>
>>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/rhino-tools-dev?hl=en.
>>>>>
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Rhino Tools Dev" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<rhino-tools-dev%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/rhino-tools-dev?hl=en.
>>>>
>>>
>>> --
>>>   You received this message because you are subscribed to the Google
>>> Groups "Rhino Tools Dev" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<rhino-tools-dev%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/rhino-tools-dev?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Rhino Tools Dev" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<rhino-tools-dev%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rhino-tools-dev?hl=en.
>>
>
>   --
> You received this message because you are subscribed to the Google Groups
> "Rhino Tools Dev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rhino-tools-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rhino-tools-dev?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to