org.apache.ojb.broker
Class OptimisticLockingTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.ojb.broker.OptimisticLockingTest
All Implemented Interfaces:
junit.framework.Test

public class OptimisticLockingTest
extends junit.framework.TestCase

This TestClass tests OJB facilities for optimistic locking.


Field Summary
(package private)  PersistenceBroker broker
           
 
Constructor Summary
OptimisticLockingTest(java.lang.String name)
          Insert the method's description here.
 
Method Summary
static void main(java.lang.String[] args)
           
 void setUp()
          Insert the method's description here.
 void tearDown()
          Insert the method's description here.
 void testLockHandling()
          demonstrates how OptimisticLockExceptions can be used to handle resynchronization of conflicting instances.
 void testTimestampLock()
          Test optimistic Lock by timestamp.
 void testVersionLock()
          Test optimistic Lock by version.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

broker

PersistenceBroker broker
Constructor Detail

OptimisticLockingTest

public OptimisticLockingTest(java.lang.String name)
Insert the method's description here. Creation date: (24.12.2000 00:33:40)

Method Detail

main

public static void main(java.lang.String[] args)

setUp

public void setUp()
           throws PBFactoryException
Insert the method's description here. Creation date: (06.12.2000 21:58:53)

Throws:
PBFactoryException

tearDown

public void tearDown()
Insert the method's description here. Creation date: (06.12.2000 21:59:14)


testVersionLock

public void testVersionLock()
                     throws java.lang.Exception
Test optimistic Lock by version.

Throws:
java.lang.Exception

testLockHandling

public void testLockHandling()
                      throws java.lang.Exception
demonstrates how OptimisticLockExceptions can be used to handle resynchronization of conflicting instances.

Throws:
java.lang.Exception

testTimestampLock

public void testTimestampLock()
                       throws java.lang.Exception
Test optimistic Lock by timestamp.

Throws:
java.lang.Exception


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14