[
https://issues.apache.org/jira/browse/OLINGO-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14175941#comment-14175941
]
Chandan V.A commented on OLINGO-458:
------------------------------------
Hello Bjorn,
The issue is fixed with commit -
http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/28e28212
Please check and reopen if the fix does not work.
Thanks
Kind Regards
Chandan
> JPA Batch requests are not executed in a single database transaction
> --------------------------------------------------------------------
>
> Key: OLINGO-458
> URL: https://issues.apache.org/jira/browse/OLINGO-458
> Project: Olingo
> Issue Type: Bug
> Components: odata2-jpa
> Affects Versions: V2 2.0.0
> Reporter: Björn Wagner
> Assignee: Chandan V.A
>
> Each single request contained in a change set of a batch is executed in its
> own database transaction. Wouldn't it make more sense to run all requests of
> a batch in a single transaction? Thereby, in case one write operation fails
> all the others are rolled back as well. Otherwise, the data might end up in
> an inconsistent state.
> I had a look at the code of the
> org.apache.olingo.odata2.jpa.processor.core.access.data.JPAProcessorImpl and
> found that the following methods just start database transactions on its own
> not matter if executed in batch or not:
> private Object processCreate(final PostUriInfo createView, final InputStream
> content, final Map<String, Object> properties, final String
> requestedContentType)
> public <T> Object processUpdate(PutMergePatchUriInfo updateView, final
> InputStream content, final Map<String, Object> properties, final String
> requestContentType)
> public Object process(DeleteUriInfo uriParserResultView, final String
> contentType)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)