temp.addDocument(transaction, this, targetDoc); //NULL transaction, so temporary fragment is not journalled - AR
// unlock the temp collection
if(transaction == null) {
temp.getLock().release(Lock.WRITE_LOCK);
} else if(!created) {
transaction.registerLock(temp.getLock(), Lock.WRITE_LOCK);
}
//NULL transaction, so temporary fragment is not journalled - AR
storeXMLResource(transaction, targetDoc);
flush();
closeDocument();