You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ra...@apache.org on 2016/06/10 12:08:56 UTC
olingo-odata4 git commit: OLINGO-967: refining the batch rollback
behavior
Repository: olingo-odata4
Updated Branches:
refs/heads/master 2675f8fa0 -> b32a2ce2e
OLINGO-967: refining the batch rollback behavior
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/b32a2ce2
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/b32a2ce2
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/b32a2ce2
Branch: refs/heads/master
Commit: b32a2ce2e2bf8128675c8d71c6675c401151cc4e
Parents: 2675f8f
Author: Ramesh Reddy <ra...@jboss.org>
Authored: Fri Jun 10 06:58:57 2016 -0500
Committer: Ramesh Reddy <ra...@jboss.org>
Committed: Fri Jun 10 06:58:57 2016 -0500
----------------------------------------------------------------------
.../java/org/apache/olingo/server/core/requests/BatchRequest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b32a2ce2/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/BatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/BatchRequest.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/BatchRequest.java
index 8394a54..5f39f9b 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/BatchRequest.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/requests/BatchRequest.java
@@ -82,8 +82,9 @@ public class BatchRequest extends ServiceRequest {
partResponse = processChangeSet(part, handler);
if (partResponse.getResponses().get(0).getStatusCode() > 400) {
handler.rollback(txnId);
+ } else {
+ handler.commit(txnId);
}
- handler.commit(txnId);
} catch(ODataLibraryException e) {
if (txnId != null) {
handler.rollback(txnId);