Package org.apache.ojb.otm.lock.wait

Examples of org.apache.ojb.otm.lock.wait.NoWaitStrategy


    protected abstract TransactionIsolation newIsolation();

    public void setUp()
    {
        _kit = TestKit.getTestInstance();
        _kit.setLockWaitStrategy(new NoWaitStrategy());
        _isolation = newIsolation();
        try
        {
            _conn1 = _kit.acquireConnection(PersistenceBrokerFactory.getDefaultKey());
            _tx1 = _kit.getTransaction(_conn1);
View Full Code Here


            _conn.getObjectByIdentity(pgOid, LockType.WRITE_LOCK);
            // we can write lock twice from the same tx
            _conn.getObjectByIdentity(pgOid, LockType.WRITE_LOCK);

            // test different LockWaitStrategies
            _kit.setLockWaitStrategy(new NoWaitStrategy());
            failIfLockForWrite(conn2, pgOid);
            _kit.setLockWaitStrategy(new TimeoutStrategy(1));
            failIfLockForWrite(conn2, pgOid);

            // Second test for the TimeoutStrategy:
View Full Code Here

    protected abstract TransactionIsolation newIsolation();

    public void setUp()
    {
        _kit = TestKit.getTestInstance();
        _kit.setLockWaitStrategy(new NoWaitStrategy());
        _isolation = newIsolation();
        try
        {
            _conn1 = _kit.acquireConnection(PersistenceBrokerFactory.getDefaultKey());
            _tx1 = _kit.getTransaction(_conn1);
View Full Code Here

            _conn.getObjectByIdentity(pgOid, LockType.WRITE_LOCK);
            // we can write lock twice from the same tx
            _conn.getObjectByIdentity(pgOid, LockType.WRITE_LOCK);

            // test different LockWaitStrategies
            _kit.setLockWaitStrategy(new NoWaitStrategy());
            failIfLockForWrite(conn2, pgOid);
            _kit.setLockWaitStrategy(new TimeoutStrategy(1));
            failIfLockForWrite(conn2, pgOid);

            // Second test for the TimeoutStrategy:
View Full Code Here

TOP

Related Classes of org.apache.ojb.otm.lock.wait.NoWaitStrategy

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.