Revision 39276 branches/v2_0_0_prep/libraries/libFMap_dalfile/src/org/gvsig/fmap/dal/resource/file/FileResourceParameters.java

View differences:

FileResourceParameters.java
69 69
		return delegatedDynObject;
70 70
	}
71 71

  
72
    private DynClass registerDynClass() {
72
	/**
73
	 * Added "static synchronized" because sometimes
74
	 * there is a "DuplicateDynClassException" when user
75
	 * selects more than one file (SHP, for example) to be
76
	 * added to the view. "definition" is null but then there is
77
	 * an exception because in the meantime another thread has registered it
78
	 * (I'm not sure this is the cause, but I cannot imagine another
79
	 * reason)
80
	 */
81
    private static synchronized DynClass registerDynClass() {
73 82
    	PersistenceManager manager = ToolsLocator.getPersistenceManager();
74 83
    	DynClass definition = (DynClass) manager.getDefinition(DYNCLASS_NAME);
75 84
    	if( definition == null ) {

Also available in: Unified diff