Package com.orientechnologies.orient.core.db.document

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.rollback()


            firstDocs.add(docOne.getIdentity());
            if (docTwo != null)
              secondDocs.add(docTwo.getIdentity());

          } catch (Exception e) {
            db.rollback();
            rollbacksCount++;
          }
        }
      } finally {
        db.close();
View Full Code Here


      db.begin(OTransaction.TXTYPE.NOTX);
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.rollback();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.commit();
View Full Code Here

      db.begin(OTransaction.TXTYPE.NOTX);
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.rollback();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.commit();
View Full Code Here

      db.begin(OTransaction.TXTYPE.NOTX);
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.rollback();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.commit();
View Full Code Here

            database.commit();

            Assert.assertTrue(doc.getIdentity().isPersistent());
          } catch (Exception e) {
            database.rollback();
            throw e;
          }

          Thread.sleep(delayWriter);
View Full Code Here

      db.commit();
      Assert.fail();
    } catch (OResponseProcessingException e) {
      Assert.assertTrue(e.getCause() instanceof ORecordDuplicatedException);
      db.rollback();
    } catch (ORecordDuplicatedException oie) {
      db.rollback();
    }

    final List<ODocument> resultAfterCommit = db.query(new OSQLSynchQuery<ODocument>(
View Full Code Here

      Assert.fail();
    } catch (OResponseProcessingException e) {
      Assert.assertTrue(e.getCause() instanceof ORecordDuplicatedException);
      db.rollback();
    } catch (ORecordDuplicatedException oie) {
      db.rollback();
    }

    final List<ODocument> resultAfterCommit = db.query(new OSQLSynchQuery<ODocument>(
        "select from index:idxTransactionUniqueIndexTest"));
    Assert.assertEquals(resultAfterCommit.size(), 1);
View Full Code Here

      db.commit();
      Assert.fail();
    } catch (OResponseProcessingException e) {
      Assert.assertTrue(e.getCause() instanceof ORecordDuplicatedException);
      db.rollback();
    } catch (ORecordDuplicatedException oie) {
      db.rollback();
    }

    final List<ODocument> resultAfterCommit = db.query(new OSQLSynchQuery<ODocument>(
View Full Code Here

      Assert.fail();
    } catch (OResponseProcessingException e) {
      Assert.assertTrue(e.getCause() instanceof ORecordDuplicatedException);
      db.rollback();
    } catch (ORecordDuplicatedException oie) {
      db.rollback();
    }

    final List<ODocument> resultAfterCommit = db.query(new OSQLSynchQuery<ODocument>(
        "select from  index:TransactionUniqueIndexWithDotTest.label"));
    Assert.assertEquals(resultAfterCommit.size(), 1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.