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

Punith DG updated OLINGO-999:
-----------------------------
    Description: 
I am not able to add more than one request to a batch ChangeSet as the 
BatchManager has PipedOutputStream Writer which is causing infinite loop the 
thread.

When I try to add a second request the thread enters to into infinite waiting 
loop.

ODataChangeset changeset = payloadManager.addChangeset()
ODataEntityCreateRequest<ClientEntity> createRequest = 
client.getCUDRequestFactory().getEntityCreateRequest(new URI(serviceRoot), 
entity);
createRequest.setFormat(ContentType.JSON);
changeset.addRequest(createRequest); // here the thread waits in infinite loop 
due to piped streams sync issue.

It seems a known issue in Java - 
http://stackoverflow.com/questions/9171632/piped-input-stream-is-getting-locked


  was:
I am not able to add more than one request to a batch ChangeSet as the 
BatchManager has PipedOutputStream Writer which is blocking the thread.

When I try to add a second request the thread enters to into infinite waiting 
loop.

It seems a known issue in Java - 
http://stackoverflow.com/questions/9171632/piped-input-stream-is-getting-locked



> Cannot add more than one request into ChangSet - thread halts in infinite loop
> ------------------------------------------------------------------------------
>
>                 Key: OLINGO-999
>                 URL: https://issues.apache.org/jira/browse/OLINGO-999
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata4-client, odata4-commons
>    Affects Versions: (Java) V4 4.2.0
>            Reporter: Punith DG
>            Priority: Blocker
>              Labels: batch, changeset, thread-safety
>
> I am not able to add more than one request to a batch ChangeSet as the 
> BatchManager has PipedOutputStream Writer which is causing infinite loop the 
> thread.
> When I try to add a second request the thread enters to into infinite waiting 
> loop.
> ODataChangeset changeset = payloadManager.addChangeset()
> ODataEntityCreateRequest<ClientEntity> createRequest = 
> client.getCUDRequestFactory().getEntityCreateRequest(new URI(serviceRoot), 
> entity);
> createRequest.setFormat(ContentType.JSON);
> changeset.addRequest(createRequest); // here the thread waits in infinite 
> loop due to piped streams sync issue.
> It seems a known issue in Java - 
> http://stackoverflow.com/questions/9171632/piped-input-stream-is-getting-locked



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to