Examples of countRows()


Examples of org.apache.aries.transaction.test.TestBean.countRows()

          e.printStackTrace();
      }
     
      tran.commit();
     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 2);
      
      //Test with client transaction and runtime exception - the user transaction is rolled back
      initialRows = bean.countRows();
     
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 2);
      
      //Test with client transaction and runtime exception - the user transaction is rolled back
      initialRows = bean.countRows();
     
      tran.begin();
      bean.insertRow("testWithClientTranAndWithRuntimeException", 1);
     
      try {
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

          fail("RollbackException not thrown");
      } catch (RollbackException e) {
          e.printStackTrace();
      }
     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 0);
     
      //Test without client exception - a container transaction is used to insert the row
      initialRows = bean.countRows();
     
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 0);
     
      //Test without client exception - a container transaction is used to insert the row
      initialRows = bean.countRows();
     
      bean.insertRow("testWithoutClientTran", 1);
     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 1);
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

      //Test without client exception - a container transaction is used to insert the row
      initialRows = bean.countRows();
     
      bean.insertRow("testWithoutClientTran", 1);
     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 1);
     
      //Test without client exception and with application exception - the container transaction is not rolled back
      initialRows = bean.countRows();
     
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 1);
     
      //Test without client exception and with application exception - the container transaction is not rolled back
      initialRows = bean.countRows();
     
      try {
          bean.insertRow("testWithoutClientTranAndWithAppException", 1, new SQLException("Dummy exception"));
      } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

          bean.insertRow("testWithoutClientTranAndWithAppException", 1, new SQLException("Dummy exception"));
      } catch (Exception e) {
          e.printStackTrace();
      }
     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 1);
     
      //Test without client transaction and with runtime exception - the container transaction is rolled back
      initialRows = bean.countRows();
     
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 1);
     
      //Test without client transaction and with runtime exception - the container transaction is rolled back
      initialRows = bean.countRows();
     
      try {
          bean.insertRow("testWithoutClientTranAndWithRuntimeException", 1, new RuntimeException("Dummy exception"));
      } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

          bean.insertRow("testWithoutClientTranAndWithRuntimeException", 1, new RuntimeException("Dummy exception"));
      } catch (Exception e) {
          e.printStackTrace();
      }
     
      finalRows = bean.countRows();
      assertTrue("Initial rows: " + initialRows + ", Final rows: " + finalRows, finalRows - initialRows == 0);
  }
}
View Full Code Here

Examples of org.apache.aries.transaction.test.TestBean.countRows()

  public void testNever() throws Exception {
      TestBean bean = getOsgiService(TestBean.class, "(tranAttribute=Never)", DEFAULT_TIMEOUT);
      UserTransaction tran = getOsgiService(UserTransaction.class);
     
      //Test with client transaction - an exception is thrown because transactions are not allowed
      int initialRows = bean.countRows();
     
      tran.begin();
     
      try {
          bean.insertRow("testWithClientTran", 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.