root = broker.getOrCreateCollection(txn, col1uri);
assertNotNull(root);
broker.saveCollection(txn, root);
CollectionConfigurationManager mgr = pool.getConfigurationManager();
mgr.addConfiguration(txn, broker, root, COLLECTION_CONFIG);
System.out.println("store "+doc1uri);
IndexInfo info = root.validateXMLResource(txn, broker, doc1uri.lastSegment(), XML1);
assertNotNull(info);
root.store(txn, broker, info, XML1, false);
txnManager.commit(txn);
} catch (Exception e) {
e.printStackTrace();
txnManager.abort(txn);
fail(e.getMessage());
}
Metas docMD = md.getMetas(doc1uri);
assertNotNull(docMD);
String uuid = docMD.getUUID();
try {
txn = txnManager.beginTransaction();
assertNotNull(txn);
System.out.println("Transaction started ...");
root = broker.getOrCreateCollection(txn, col1uri);
assertNotNull(root);
broker.saveCollection(txn, root);
CollectionConfigurationManager mgr = pool.getConfigurationManager();
mgr.addConfiguration(txn, broker, root, COLLECTION_CONFIG);
System.out.println("store "+doc1uri);
IndexInfo info = root.validateXMLResource(txn, broker, doc1uri.lastSegment(), wrongXML);
assertNotNull(info);
root.store(txn, broker, info, wrongXML, false);