marc fleury wrote:
>>Maybe we should be a little more restrictive than JTA here, 
>>and only allow reentrant calls to the transaction service 
>>during the callouts when done on the same thread.
>>
>>I think that would allow us to simply synchronize on the 
>>methods of the TransactionImpl frontend.
>>
>>The downside of that would be that we could not change the 
>>transaction service to callout to Synchronizations and XA 
>>resources in parallel, because that would mean that a thread 
>>from one of these callouts might not be the same as the 
>>thread that originally locked the frontend.
>>
>>What do you think?
> 
> 
> 
> The transaction concept in the web is one of synchronization of
> different workers.  The best example is JCA.  If you limit the number of
> threads that can be working in a TM at the same time you go back to the
> "one thread of control" view of the world... Back to the middle ages.
> The many threads per Tx is the way, even in parallel.  I have had many
> battles with the "kid" in our days on the multi thread stuff (in fact it
> was the first battle with Rickard :). 
> 
> Don't do it.

It totally, agree.  I was not aware that this code had an open out call 
(I think that is what Lea calls them) and we definitely don't want to 
synchronize on one.

I don't think my suggestion requires that you synchronize the entire 
method.  You should be able to synchronize to resolve the reference, 
exit the synchronization, and use the reference.  This is similar to the 
final trick/hack that Kevin suggested, but is more standard code, which 
means it is less likely to touch a vm bug.

-dain



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to