Transaction tx = new Transaction();
try {
return ResultSetWrapper.toText(col.queryDocument(tx, style, query, new NamespaceMap(nsMap), key));
}
catch ( DBException e ) {
tx.cancel();
throw e;
}
finally {
if ( tx.getStatus() == Transaction.ACTIVE )
tx.commit();