title: Transaction Management in Orient DB
body: <p>I am using using below logic to start the transaction in Orient DB.
      <code><code>graphFactory.getDatabase().begin(type);</code></code>
  What I am observing is if the transaction is not closed inside the method, It is auto available to other method, Which seems like leak to me. I will try to explain the scenario below: </p>
  
  <pre><code> public &lt;T&gt; void addVertexToDB(T data){
      graphFactory.getDatabase().begin(OTransaction.TXTYPE.OPTIMISTIC);
      //logic for fetching data and adding vertex
      //I am neither calling rollback nor commit here
      }
  </code></pre>
  
  <p>I have another method like update</p>
  
  <pre><code>public &lt;T&gt; void updateVertexToDB(T data){
      //not starting the transaction explicitly and doing some write operation
      //logic for fetching data and adding vertex
      //I am neither calling rollback nor commit here
      }
  </code></pre>
  
  <p>The graph factory has below property set</p>
  
  <pre><code>graphFactory.setAutoStartTx(false);
  graphFactory.setRequireTransaction(true);
  </code></pre>
  
  <p>Expectation: updateVertexToDB should throw <code>OTransactionException e</code> 
  current Behavior: it gets the transcation started by save and working fine.</p>
  
  <p>So just wanted to know How I can achieve the behavior that if a method is not starting transcation and trying to write to DB, It must throw <code>OTransactionException e</code> until it is not nested inside a method already running transaction. </p>