Examples of behave()


Examples of com.sun.jini.test.share.TestParticipant.behave()

        part.setBehavior(OP_JOIN);
        part.setBehavior(OP_TIMEOUT_PREPARE);
        part.setBehavior(OP_TIMEOUT_PREPARECOMMIT);
        part.setBehavior(OP_TIMEOUT_VERYLONG);
        part.setBehavior(OP_VOTE_PREPARED);
        part.behave(cr.transaction);
        Thread committer = new CommitThread(cr.transaction);
        committer.start();
        /*
         * Wait for the transaction to switch
         * from ACTIVE to VOTING, then proceed to
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

        cr = TransactionFactory.create(mgr, Lease.FOREVER);
        str = (ServerTransaction) cr.transaction;
        state = str.mgr.getState(str.id);
        part.setBehavior(OP_JOIN);
        part.setBehavior(OP_VOTE_PREPARED);
        part.behave(cr.transaction);

        if (state != ACTIVE) {
            cr.transaction.commit();
            throw new TestException( "couldn't read ACTIVE state");
        }
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

            str = (ServerTransaction) cr.transaction;
            state = str.mgr.getState(str.id);
            part.setBehavior(OP_JOIN);
            part.setBehavior(OP_VOTE_PREPARED);
            part.setBehavior(OP_TIMEOUT_PREPARE);
            part.behave(cr.transaction);
            Thread commiter = new CommitThread(cr.transaction);
            commiter.start();

            /*
             * By looping on the first ocurrance of
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

            str = (ServerTransaction) cr.transaction;
            part.clearBehavior(OP_TIMEOUT_PREPARE);
            part.setBehavior(OP_JOIN);
            part.setBehavior(OP_VOTE_PREPARED);
            part.setBehavior(OP_TIMEOUT_ABORT);
            part.behave(cr.transaction);
            Thread aborter = new AbortThread(cr.transaction);
            aborter.start();

            /*
             * By looping on the first ocurrance of
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

            /*
             * Now instruct the odd-ball participant to join
             * the non ACTIVE transaction
             */
            try {
                part.behave(str);
    throw new TestException( "CannotJoinException is not raised");
            } catch (CannotJoinException cje) {
                if (DEBUG) {
                    cje.printStackTrace();
                    logger.log(Level.INFO, cje.getMessage());
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

            }
            cr = TransactionFactory.create(mgr, Lease.FOREVER);
            part.setBehavior(OP_JOIN);
            part.setBehavior(OP_INCR_CRASHCOUNT);
            part.setBehavior(OP_JOIN_IDEMPOTENT);
            part.behave(cr.transaction);
        } catch (CrashCountException cce) {
            if (DEBUG) {
                cce.printStackTrace();
                logger.log(Level.INFO, cce.getMessage());
            }
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

            System.out.println("JoinIdempotentTest: run: mgr = " + mgr);
        }
        cr = TransactionFactory.create(mgr, Lease.FOREVER);
        part.setBehavior(OP_JOIN);
        part.setBehavior(OP_VOTE_NOTCHANGED);
        part.behave(cr.transaction);
        cr.transaction.commit();

        return;
    }
}
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

            }
            cr = TransactionFactory.create(mgr, FORTY_SECONDS);
            str = (ServerTransaction) cr.transaction;
            part.setBehavior(OP_JOIN);
            part.setBehavior(OP_VOTE_PREPARED);
            part.behave(cr.transaction);

            try {
                Thread.sleep(FORTY_SECONDS + SLOP);
            } catch (InterruptedException ie) {}
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

        }
        cr = TransactionFactory.create(mgr, Lease.FOREVER);
        part.setBehavior(OP_JOIN);
        part.setBehavior(OP_TIMEOUT_PREPARE);
        part.setBehavior(OP_VOTE_NOTCHANGED);
        part.behave(cr.transaction);
        cr.transaction.commit();
        part.clearBehavior(OP_VOTE_NOTCHANGED);

        mgr = manager();
View Full Code Here

Examples of com.sun.jini.test.share.TestParticipant.behave()

        }
        cr = TransactionFactory.create(mgr, Lease.FOREVER);
        part.setBehavior(OP_JOIN);
        part.setBehavior(OP_TIMEOUT_PREPARE);
        part.setBehavior(OP_VOTE_PREPARED);
        part.behave(cr.transaction);
        cr.transaction.commit();
        part.clearBehavior(OP_VOTE_PREPARED);

        try {
            mgr = manager();
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.