Package com.sun.sgs.test.util

Examples of com.sun.sgs.test.util.DummyTransaction.abort()


        System.err.println("txn2: " + e);
        exception2 = e;
    } catch (Exception e) {
        System.err.println("txn2: " + e);
        if (txn2 != null) {
      txn2.abort(new RuntimeException("abort txn2"));
        }
    }
      }
  }
  MyRunnable runnable = new MyRunnable();
View Full Code Here


      exception2 = e;
        } catch (Exception e) {
      System.err.println(finalI + " txn2: " + e);
      exception2 = e;
      if (txn2 != null) {
          txn2.abort(new RuntimeException("abort"));
      }
        }
    }
      }
      MyRunnable myRunnable = new MyRunnable();
View Full Code Here

      action.run();
      fail("Expected IllegalStateException");
  } catch (IllegalStateException e) {
      System.err.println(e);
  } finally {
      originalTxn.abort(new RuntimeException("abort"));
  }
    }

    /**
     * Tests running the action in an existing transaction while shutting down.
View Full Code Here

  t.start();
  t.join(1000);
  Throwable exception = exceptionHolder.get();
  assertTrue("Expected IllegalStateException: " + exception,
       exception instanceof IllegalStateException);
  originalTxn.abort(new RuntimeException("abort"));
  assertTrue(shutdownAction.waitForDone());
  store = null;
    }

    /** Tests running the action after shutdown. */
 
View Full Code Here

        System.err.println("txn2: " + e);
        exception2 = e;
    } catch (Exception e) {
        System.err.println("txn2: " + e);
        if (txn2 != null) {
      txn2.abort(new RuntimeException("abort txn2"));
        }
    }
      }
  }
  MyRunnable runnable = new MyRunnable();
View Full Code Here

      exception2 = e;
        } catch (Exception e) {
      System.err.println(finalI + " txn2: " + e);
      exception2 = e;
      if (txn2 != null) {
          txn2.abort(new RuntimeException("abort"));
      }
        }
    }
      }
      MyRunnable myRunnable = new MyRunnable();
View Full Code Here

      reporter.reportObjectAccess(txn2, "o1", AccessType.READ, null);
      fail("Expected IllegalArgumentException");
  } catch (IllegalArgumentException e) {
      System.err.println(e);
  }
  txn2.abort(ABORT_EXCEPTION);
    }

    @Test
    public void testReportObjectAccessWithTxnAndNonNullDesc()
  throws Exception
View Full Code Here

      reporter.setObjectDescription(txn2, "o1", "description");
      fail("Expected IllegalArgumentException");
  } catch (IllegalArgumentException e) {
      System.err.println(e);
  }
  txn2.abort(ABORT_EXCEPTION);
    }

    @Test
    public void testSetObjectDescriptionNullAfterReport() throws Exception {
  reporter.reportObjectAccess("o1", AccessType.READ);
View Full Code Here

          coordinator.notifyNewTransaction(txn, 0, 1);
          for (int i = 0; i < locks; i++) {
        reporter.reportObjectAccess(
            txn, "o" + i, AccessType.READ);
          }
          txn.abort(ABORT_EXCEPTION);
      }
      counter.countDown();
        }
    }.start();
      }
View Full Code Here

        System.err.println("txn2: " + e);
        exception2 = e;
    } catch (Exception e) {
        System.err.println("txn2: " + e);
        if (txn2 != null) {
      txn2.abort(new RuntimeException("abort txn2"));
        }
    }
      }
  }
  MyRunnable runnable = new MyRunnable();
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.