title: neo4j-rest-graphdb not able to handle transactions with Neo4J 2.0.x
body: <p>I'm using neo4j-rest-graphdb 2.0.1 (2.0.3 is not available as of today) to access a standalone Neo4j Community 2.0.3 REST Server.
  In particular, I want to be able to use neo4j-rest-graphdb to group queries into transactions.
  The <a href="https://github.com/neo4j-contrib/java-rest-binding" rel="nofollow">README</a> says:</p>
  
  <blockquote>
    <p>In 1.8 it tries to collect all operations within a tx as a
    batch-operation which will then be executed on the server.</p>
    
    <p>This has the implication that the results retrieved within that "tx"
    are not immediately available but only after you called tx.success and
    tx.finish</p>
  </blockquote>
  
  <p>However, the following (simplest possible) code that uses a transaction</p>
  
  <pre><code>db = new RestGraphDatabase(&lt;SOMEURL&gt;, &lt;SOMEUSER&gt;, &lt;SOMEPASSWORD&gt;);
  System.setProperty(Config.CONFIG_BATCH_TRANSACTION,"true");
  
  Transaction tx = db.beginTx();
  
  // line where exception is thrown    
  ResourceIterable&lt;Node&gt; it = db.findNodesByLabelAndProperty(DynamicLabel.label(type), "@id", id);
  
  Node result = Iterables.getOnlyElement(it);
  
  tx.success();
  tx.finish();
  tx.close();
  </code></pre>
  
  <p>throws a </p>
  
  <pre><code>java.lang.IllegalStateException: received org.neo4j.rest.graphdb.RequestResult@5acc5fb1
      at org.neo4j.rest.graphdb.ExecutingRestAPI.toNodeIterableResult(ExecutingRestAPI.java:284)
      at org.neo4j.rest.graphdb.ExecutingRestAPI.getNodesByLabelAndProperty(ExecutingRestAPI.java:273)
      at org.neo4j.rest.graphdb.RestAPIFacade.getNodesByLabelAndProperty(RestAPIFacade.java:344)
      at org.neo4j.rest.graphdb.RestGraphDatabase.findNodesByLabelAndProperty(RestGraphDatabase.java:147)   
      at {the marked line in the above code}
  </code></pre>
  
  <p>debugging yields that the fields of the RequestResult that is returned by the Neo4j DB have the following values:</p>
  
  <ul>
  <li>status: 0</li>
  <li>batchId: 1</li>
  <li>batchResult: true</li>
  <li>string: ""</li>
  <li>all other fields: null</li>
  </ul>
  
  <p>When I set <code>System.setProperty(Config.CONFIG_BATCH_TRANSACTION,"false");</code> instead of "true", no exception is thrown and the request is returned correctly with correct contents, however not in a transactional context.
  Why is that the case? 
  How can I get (batch-based) transactions with neo4j-rest-graphdb to work properly?</p>