From: Wolfgang M. M. <wol...@us...> - 2004-08-04 14:48:16
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2454/src/org/exist/xmldb Modified Files: LocalCollection.java LocalCollectionManagementService.java Log Message: Fixed some deadlocks introduced by yesterday's changes. Moved the global CollectionCache object in DBBroker to BrokerPool (it should not be declared static or it will not be re-initialized upon database restart). Index: LocalCollectionManagementService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalCollectionManagementService.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** LocalCollectionManagementService.java 3 Aug 2004 15:25:58 -0000 1.14 --- LocalCollectionManagementService.java 4 Aug 2004 14:48:05 -0000 1.15 *************** *** 58,72 **** collName = parent.getPath() + '/' + collName; DBBroker broker = null; - org.exist.collections.Collection parentColl = null; try { broker = brokerPool.get(user); - parentColl = broker.openCollection(parent.getPath(), Lock.WRITE_LOCK); - if(parentColl == null) - throw new XMLDBException(ErrorCodes.INVALID_COLLECTION, - "Collection " + parent.getPath() + " not found"); org.exist.collections.Collection coll = broker.getOrCreateCollection( collName ); broker.saveCollection( coll ); - broker.flush(); } catch ( EXistException e ) { throw new XMLDBException( ErrorCodes.VENDOR_ERROR, --- 58,66 ---- *************** *** 76,81 **** "not allowed to create collection", e ); } finally { - if(parentColl != null) - parentColl.release(); brokerPool.release( broker ); } --- 70,73 ---- Index: LocalCollection.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalCollection.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** LocalCollection.java 3 Aug 2004 16:45:45 -0000 1.38 --- LocalCollection.java 4 Aug 2004 14:48:05 -0000 1.39 *************** *** 263,267 **** childName = getPath() + '/' + name; } finally { ! collection.getLock().release(Lock.READ_LOCK); } if(childName != null) --- 263,267 ---- childName = getPath() + '/' + name; } finally { ! collection.release(); } if(childName != null) *************** *** 288,292 **** return collection.getName(); } finally { ! collection.getLock().release(Lock.READ_LOCK); } } --- 288,292 ---- return collection.getName(); } finally { ! collection.release(); } } |