net.sourceforge.jtds.jdbc
Class XaTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bynet.sourceforge.jtds.jdbc.TestBase
              extended bynet.sourceforge.jtds.jdbc.DatabaseTestCase
                  extended bynet.sourceforge.jtds.jdbc.XaTest
All Implemented Interfaces:
junit.framework.Test

public class XaTest
extends DatabaseTestCase

Test suite for XA Distributed Transactions. These tests are derived from examples found in the following article at DevX.

Version:
$Id: XaTest.java,v 1.5 2004-12-03 16:52:09 alin_sinpalean Exp $

Field Summary
 
Fields inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase
 
Fields inherited from class net.sourceforge.jtds.jdbc.TestBase
con, props
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
XaTest(java.lang.String name)
           
 
Method Summary
 javax.sql.XADataSource getDataSource()
          Obtain an XADataSource.
static void main(java.lang.String[] args)
           
 void testLocalTran()
          Demonstrate interleaving local transactions and distributed transactions.
 void testXaCommit()
          Test to demonstrate the XA_COMMIT function.
 void testXAJoinTran()
          Test to demonstrate the use of the XA_JOIN command.
 void testXaOnePhaseCommit()
          Test to demonstrate the single phase XA_COMMIT function.
 void testXARecover()
          Test to demonstrate the use of the XA_RECOVER command.
 void testXaRollback()
          Test to demonstrate the use of the XA_ROLLBACK command.
 
Methods inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase
compareBytes, getLongString, getLongString, getType, getTypemap
 
Methods inherited from class net.sourceforge.jtds.jdbc.TestBase
compareInputStreams, compareReaders, connect, dropDatabase, dropFunction, dropProcedure, dropTable, dropTrigger, dropType, dropView, dump, dump, dumpAll, dumpKeys, dumpRow, dumpRow, getConnection, getConnection, makeObjects, makeTestTables, setUp, tearDown
 
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
 

Constructor Detail

XaTest

public XaTest(java.lang.String name)
Method Detail

getDataSource

public javax.sql.XADataSource getDataSource()
                                     throws java.sql.SQLException
Obtain an XADataSource.

Returns:
the XADataSource.
Throws:
java.sql.SQLException - if an error condition occurs

testXaCommit

public void testXaCommit()
                  throws java.lang.Exception
Test to demonstrate the XA_COMMIT function.

Throws:
java.lang.Exception - if an error condition occurs

testXaOnePhaseCommit

public void testXaOnePhaseCommit()
                          throws java.lang.Exception
Test to demonstrate the single phase XA_COMMIT function.

Throws:
java.lang.Exception - if an error condition occurs

testXaRollback

public void testXaRollback()
                    throws java.lang.Exception
Test to demonstrate the use of the XA_ROLLBACK command.

Throws:
java.lang.Exception - if an error condition occurs

testLocalTran

public void testLocalTran()
                   throws java.lang.Exception
Demonstrate interleaving local transactions and distributed transactions.

Throws:
java.lang.Exception - if an error condition occurs

testXAJoinTran

public void testXAJoinTran()
                    throws java.lang.Exception
Test to demonstrate the use of the XA_JOIN command.

Throws:
java.lang.Exception - if an error condition occurs

testXARecover

public void testXARecover()
                   throws java.lang.Exception
Test to demonstrate the use of the XA_RECOVER command.

Throws:
java.lang.Exception - if an error condition occurs

main

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


Generated on October 27 2012