if (batchImpl.isEmpty()) {
batchImpl.dispose();
return;
}
DavMethod method = null;
try {
HttpClient client = batchImpl.start();
boolean success = false;
try {
Iterator it = batchImpl.methods();
while (it.hasNext()) {
method = (DavMethod) it.next();
initMethod(method, batchImpl, true);
client.executeMethod(method);
method.checkSuccess();
method.releaseConnection();
}
success = true;
} finally {
// make sure the lock is removed. if any of the methods
// failed the unlock is used to abort any pending changes