You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Patrick Linskey (JIRA)" <ji...@apache.org> on 2007/02/22 23:09:05 UTC
[jira] Updated: (OPENJPA-161) Overuse of synchronization in
AbstractBrokerFactory
[ https://issues.apache.org/jira/browse/OPENJPA-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Linskey updated OPENJPA-161:
------------------------------------
Attachment: openjpa-161-patch.txt
This patch removes the synchronization on _transactional, replacing it with a ConcurrentHashMap and using the ConcurrentHashMap.putIfAbsent() call to safely handle concurrent access. My analysis is that we do not need to synchronize on the lists inside _transactional, since the key that we look up the collection with is a JTA transaction, and JTA does not allow a transaction to be used concurrently in multiple threads.
Barring any objections, I plan to commit this change in the next day or so.
> 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.