Package net.jini.core.transaction.server

Examples of net.jini.core.transaction.server.TransactionManager


    }

    public void run() throws Exception {
  logger.log(Level.INFO, "run()");

        TransactionManager txn_mgr_proxy = null;
  final String serviceName =
      "net.jini.core.transaction.server.TransactionManager";
  try {
      txn_mgr_proxy =
    (TransactionManager)manager.startService(serviceName);
      if (!manager.killVM(txn_mgr_proxy)) {
    logger.log(Level.INFO, "Could not kill " + serviceName);
      }

      // get delay in seconds
      int killDelay = getConfig().getIntConfigVal(
        "com.sun.jini.qa.harness.killvm.delay", 15);

      if (killDelay < 0) {
          killDelay = 15;
      }
     
      // Allow service time to auto-restart, which should fail
      try {
    Thread.sleep(killDelay * 1000);
      } catch (InterruptedException ie) {
    logger.log(Level.INFO, "Sleep was interrupted");
    //ignore
            }
  } catch (Exception e) {
      e.printStackTrace();
      throw new TestException("Caught unexpected exception: " + e);
  }
  try {
      /*
       * Should recover locators upon startup and try to
       * use null recovered locator preparer.
     */
      txn_mgr_proxy.create(1000);
      throw new TestException("Restarted service with "
          + "invalid configuration");
  } catch (Throwable e) {
      e.printStackTrace();
      if (!verifyConfigurationException(e)) {
View Full Code Here


    private final int NUM_REGS = 5;

    public void run() throws Exception {
        int i;

        TransactionManager mb = getTransactionManager();
  logger.log(Level.INFO, "Got TransactionManager reference: " + mb);

  logger.log(Level.INFO, "Generating " + NUM_REGS + " created objects");
        long[] durations = new long[NUM_REGS];
  for (i=0; i < NUM_REGS; i++) {
View Full Code Here

  @SuppressWarnings("unchecked")
  public void testKeyEquals() throws Exception {
   
    TxnTable mockTxnTable = mock(TxnTable.class);
   
    TransactionManager mockTransactionManager = mock(TransactionManager.class);
   
    final long id = 1000L;
    final boolean isPrepared = true;
   
    Object key = createKeyInstance(mockTxnTable,
View Full Code Here

    public void run() throws Exception {
  logger.log(Level.INFO, "Starting up " + this.getClass().toString());

        // Get transaction manager references
  TransactionManager[] mbs = getTransactionManagers(2);
  TransactionManager txnmgr1 = mbs[0];
  TransactionManager txnmgr2 = mbs[1];
  NestableTransactionManager ntxnmgr =
      new NoOpNestableTransactionManager();

        ServerTransaction st1_1 = new ServerTransaction(txnmgr1, 1L);
        ServerTransaction st1_2 = new ServerTransaction(txnmgr1, 2L);
View Full Code Here

public class AdminIFShutdownTest extends AdminIFBase {

    public void run() throws Exception {

  TransactionManager mb = getTransactionManager();

  /////////////////////////
  // Administrable Methods
  /////////////////////////
  Object admin = getTransactionManagerAdmin(mb);
View Full Code Here

    public void run() throws Exception {
  logger.log(Level.INFO, "Starting up " + this.getClass().toString());

        // Get Mailbox references
  TransactionManager[] mbs = getTransactionManagers(2);
  TransactionManager txnmgr1 = mbs[0];
  TransactionManager txnmgr2 = mbs[1];
  TransactionManager txnmgr1_dup =  null;

        // Get Mailbox admin references
  Object admin1 = getTransactionManagerAdmin(txnmgr1);
  Object admin2 = getTransactionManagerAdmin(txnmgr2);
  Object admin1_dup = null;
View Full Code Here

    }

    public void run() throws Exception {
  logger.log(Level.INFO, "" + ":run()");

        TransactionManager txn_mgr_proxy = null;
  final String serviceName =
      "net.jini.core.transaction.server.TransactionManager";
  final int instances =
      getConfig().getIntConfigVal(serviceName + ".instances", -1);
  if (instances <= 0) {
View Full Code Here

public class AdminIFTest extends AdminIFBase {

    public void run() throws Exception {
  logger.log(Level.INFO, "Starting up " + this.getClass().toString());

  TransactionManager mb = getTransactionManager();

  /////////////////////////
  // Administrable Methods
  /////////////////////////
  Object admin = getTransactionManagerAdmin(mb);
View Full Code Here

    // inherit doc comment
    public ServerTransaction getTransaction(ProxyPreparer preparer)
  throws IOException, ClassNotFoundException
    {
  if (tr == null) {
      final TransactionManager mgr =
    (TransactionManager)trm.get(preparer);
      tr = new ServerTransaction(mgr, trId);
  }
  return tr;
    }
View Full Code Here

           5);
    }

    public void run() throws Exception {

  TransactionManager mb = getTransactionManager();

  long[] durations = new long[numRegs];
  int i = 0;
  for (i = 0; i < numRegs; i++) {
      durations[i] = DURATION;
View Full Code Here

TOP

Related Classes of net.jini.core.transaction.server.TransactionManager

Copyright © 2018 www.massapicom. 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.