[ 
https://issues.apache.org/jira/browse/OPENJPA-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475369
 ] 

Abe White commented on OPENJPA-161:
-----------------------------------

I think the FIXME part of the patch should be removed/simplified.  The patch 
itself contains comments like the following:

// we don't need to synchronize on brokers since one JTA transaction
// can never be active on multiple concurrent threads.

Yet the FIXME part explicitly guards against having the same transaction on 
concurrent threads.  If guards like this are necessary, then they need to be 
consistent throughout the patch.  But if we agree that the comment above is 
correct and the same transaction can't be active on multiple threads, then the 
FIXME part is useless.

> Overuse of synchronization in AbstractBrokerFactory
> ---------------------------------------------------
>
>                 Key: OPENJPA-161
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-161
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: kernel
>            Reporter: Patrick Linskey
>         Attachments: openjpa-161-patch.txt
>
>
> AbstractBrokerFactory maintains a Map<Transaction,List<Broker>> that is 
> guarded by synchronized blocks. These synchronized blocks should be removed 
> if possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to