Discussion:
[castor-dev] Patch for XMLClassDescriptorResolverImpl to fix non-thread-safe issue #CASTOR-2019
Torsten Juergeleit
2009-05-06 21:51:37 UTC
Permalink
Hi,

attached to http://jira.codehaus.org/browse/CASTOR-2019 #CASTOR-2019 you
can find a unit test which shows (on a reasonable sized multi-core system)
that the current implementation of
XMLClassDescriptorResolverImpl$DescriptorCacheImpl isn't thread-safe.

Another patch attached to #CASTOR-2019 introduces thread-safetyness to
XMLClassDescriptorResolverImpl by synchronizing accesses to
XMLClassDescriptorResolverImpl$DescriptorCacheImpl with a
ReentrantReadWriteLock. To workaround the descriptor iterator issue the
iterator is created on a copied list of the cached descriptors.

Cheers,
Torsten
--
View this message in context: http://www.nabble.com/Patch-for-XMLClassDescriptorResolverImpl-to-fix-non-thread-safe-issue--CASTOR-2019-tp23416253p23416253.html
Sent from the Castor - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Werner Guttmann
2009-05-07 08:01:27 UTC
Permalink
Thanks, Torsten. We will give feedback through the Jira issue.

Werner
Post by Torsten Juergeleit
Hi,
attached to http://jira.codehaus.org/browse/CASTOR-2019 #CASTOR-2019 you
can find a unit test which shows (on a reasonable sized multi-core system)
that the current implementation of
XMLClassDescriptorResolverImpl$DescriptorCacheImpl isn't thread-safe.
Another patch attached to #CASTOR-2019 introduces thread-safetyness to
XMLClassDescriptorResolverImpl by synchronizing accesses to
XMLClassDescriptorResolverImpl$DescriptorCacheImpl with a
ReentrantReadWriteLock. To workaround the descriptor iterator issue the
iterator is created on a copied list of the cached descriptors.
Cheers,
Torsten
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...