Concurrent calls to Schemas.parse/Schemas.dispose easily result in concurrency 
exceptions
-----------------------------------------------------------------------------------------

                 Key: GEOT-3762
                 URL: https://jira.codehaus.org/browse/GEOT-3762
             Project: GeoTools
          Issue Type: Bug
            Reporter: Andrea Aime
            Assignee: Justin Deoliveira


They may be null pointer exceptions, concurrent modification exeptions, array 
index out of bounds exceptions.
The issue is that loading schemas alters the substitution groups of the long 
lived schemas, such as the GML one, and so does dispose.

Dispose already has a synchronization, which is schema specific, but it's not 
enough since the parsing method cannot predict in advance which global schemas 
are going to be modified, so it will modify some that dispose is working on.
As a result both have to be synchronized against the same lock, which for the 
occasion is the class itself (there are other bits modifying the global schemas 
in GeoServer that need to synch against the same lock, so we either use the 
class object or we'll need to expose a custom lock object)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to