You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2014/11/06 17:26:34 UTC

[jira] [Closed] (OLINGO-458) JPA Batch requests are not executed in a single database transaction

     [ https://issues.apache.org/jira/browse/OLINGO-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Amend closed OLINGO-458.
----------------------------------

Release Build

> 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
>             Fix For: V2 2.0.1
>
>
> 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)