org.mule.tck
Class AbstractTxThreadAssociationTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.mule.tck.AbstractMuleTestCase
              extended by org.mule.tck.AbstractTxThreadAssociationTestCase
All Implemented Interfaces:
Test, TestCaseWatchdogTimeoutHandler

public abstract class AbstractTxThreadAssociationTestCase
extends AbstractMuleTestCase

Validate certain expectations when working with JTA API. It is called to catch discrepancies in TM implementations and alert early. Subclasses are supposed to plug in specific transaction managers for tests.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.tck.AbstractMuleTestCase
AbstractMuleTestCase.TestInfo
 
Field Summary
protected static int TRANSACTION_TIMEOUT_SECONDS
           
 
Fields inherited from class org.mule.tck.AbstractMuleTestCase
callbackCalled, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, logger, muleContext, TEST_MESSAGE
 
Constructor Summary
AbstractTxThreadAssociationTestCase()
           
 
Method Summary
protected  void doSetUp()
           
protected  TransactionManager getTransactionManager()
           
protected abstract  TransactionManagerFactory getTransactionManagerFactory()
           
 void testAlwaysBeginXaTransactionSuspendResume()
          AlwaysBegin action suspends current transaction and begins a new one.
 void testNoNestedTxStarted()
          This is a former TransactionTemplateTestCase.
 void testTxHandleCommitKeepsThreadAssociation()
           
 void testTxManagerCommitDissassociatesThread()
           
 void testTxManagerRollbackDissassociatesThread()
           
 void testXaTransactionTermination()
          This is a former XaTransactionTestCase.
 
Methods inherited from class org.mule.tck.AbstractMuleTestCase
createMuleContext, createTestInfo, createWatchdog, disposeManager, doTearDown, getBuilder, getConfigurationResources, getName, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestInboundEndpoint, getTestInfo, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransformer, handleTimeout, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isDisposeManagerPerSuite, isExcluded, isOffline, isStartContext, registerTestMethod, run, runBare, setDisposeManagerPerSuite, setName, setStartContext, setUp, suitePostTearDown, suitePreSetUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, run, runTest, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRANSACTION_TIMEOUT_SECONDS

protected static final int TRANSACTION_TIMEOUT_SECONDS
See Also:
Constant Field Values
Constructor Detail

AbstractTxThreadAssociationTestCase

public AbstractTxThreadAssociationTestCase()
Method Detail

doSetUp

protected void doSetUp()
                throws Exception
Overrides:
doSetUp in class AbstractMuleTestCase
Throws:
Exception

testTxHandleCommitKeepsThreadAssociation

public void testTxHandleCommitKeepsThreadAssociation()
                                              throws Exception
Throws:
Exception

testTxManagerCommitDissassociatesThread

public void testTxManagerCommitDissassociatesThread()
                                             throws Exception
Throws:
Exception

testTxManagerRollbackDissassociatesThread

public void testTxManagerRollbackDissassociatesThread()
                                               throws Exception
Throws:
Exception

testAlwaysBeginXaTransactionSuspendResume

public void testAlwaysBeginXaTransactionSuspendResume()
                                               throws Exception
AlwaysBegin action suspends current transaction and begins a new one.

Throws:
Exception - if any error

testXaTransactionTermination

public void testXaTransactionTermination()
                                  throws Exception
This is a former XaTransactionTestCase.

Throws:
Exception - in case of any error

testNoNestedTxStarted

public void testNoNestedTxStarted()
                           throws Exception
This is a former TransactionTemplateTestCase. http://mule.mulesource.org/jira/browse/MULE-1494

Throws:
Exception - in case of any error

getTransactionManager

protected TransactionManager getTransactionManager()

getTransactionManagerFactory

protected abstract TransactionManagerFactory getTransactionManagerFactory()


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.