org.mule.test.integration.providers.jms
Class AbstractJmsTransactionFunctionalTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.mule.tck.AbstractMuleTestCase
              extended byorg.mule.test.integration.providers.jms.AbstractJmsFunctionalTestCase
                  extended byorg.mule.test.integration.providers.jms.AbstractJmsTransactionFunctionalTest
All Implemented Interfaces:
Test
Direct Known Subclasses:
ActiveMQJmsTransactionFunctionalTestCase, ActiveMQJmsTransactionMule2071TestCase

public abstract class AbstractJmsTransactionFunctionalTest
extends AbstractJmsFunctionalTestCase

AbstractJmsTransactionFunctionalTest is a base class for all JMS based functional tests with or without transactions.


Nested Class Summary
 class AbstractJmsTransactionFunctionalTest.RollbackExceptionListener
           
 
Nested classes inherited from class org.mule.tck.AbstractMuleTestCase
org.mule.tck.AbstractMuleTestCase.TestInfo
 
Field Summary
static int ALL
           
static int CLEANUP
           
protected  org.mule.umo.UMOTransaction currentTx
           
protected  int exclusionFlag
           
static int SEND_NOT_TRANSACTED
           
static int SEND_TRANSACTED_ALWAYS
           
static int SEND_TRANSACTED_IF_POSSIBLE_WITH_TRANSACTION
           
static int SEND_TRANSACTED_IF_POSSIBLE_WITHOUT_TRANSACTION
           
static int SEND_TRANSACTED_ROLLBACK
           
static int TRANSACTED_REDELIVERY_TO_DL_DESTINATION
           
 
Fields inherited from class org.mule.test.integration.providers.jms.AbstractJmsFunctionalTestCase
callbackCalled, cnn, connector, CONNECTOR_NAME, currentMsg, DEFAULT_DL_QUEUE, DEFAULT_DL_TOPIC, DEFAULT_IN_QUEUE, DEFAULT_IN_TOPIC, DEFAULT_MESSAGE, DEFAULT_OUT_QUEUE, DEFAULT_OUT_TOPIC, eventCount, LOCK_WAIT, logger, model
 
Constructor Summary
AbstractJmsTransactionFunctionalTest()
           
 
Method Summary
protected  void addResultListener(String dest, CountDownLatch countDown)
           
 void afterInitialise()
           
protected  void doSetUp()
           
protected  void doTearDown()
           
protected  void exclude(int flag)
           
protected  int getAcknowledgementMode()
           
static org.mule.umo.UMODescriptor getDescriptor(String name, String implementation)
           
protected  org.mule.umo.endpoint.UMOEndpointURI getDLDest()
           
protected  org.mule.umo.endpoint.UMOEndpointURI getInDest()
           
protected  org.mule.umo.endpoint.UMOEndpointURI getOutDest()
           
abstract  org.mule.umo.UMOTransactionFactory getTransactionFactory()
           
 org.mule.umo.UMOComponent initialiseComponent(org.mule.umo.UMODescriptor descriptor, byte txBeginAction, org.mule.tck.functional.EventCallback callback)
           
protected  boolean notExcluded(int flag)
           
protected  void send(String payload, boolean transacted, int ack)
           
 void testCleanup()
           
 void testSendNotTransacted()
           
 void testSendTransactedAlways()
           
 void testSendTransactedIfPossibleWithoutTransaction()
           
 void testSendTransactedIfPossibleWithTransaction()
           
 void testSendTransactedRollback()
           
 void testTransactedRedeliveryToDLDestination()
           
 
Methods inherited from class org.mule.test.integration.providers.jms.AbstractJmsFunctionalTestCase
createConnector, drainDestinations, getConnectionFactory, getSenderConnection, initialiseComponent, receive, send, useTopics
 
Methods inherited from class org.mule.tck.AbstractMuleTestCase
addTest, disposeManager, finalize, getDefaultModel, getManager, getName, getTestComponent, getTestConnector, getTestDescriptor, getTestEndpoint, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestInfo, getTestManager, getTestSession, getTestTransformer, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isOffline, run, runBare, setDisposeManagerPerSuite, setUp, suitePostSetUp, suitePostTearDown, suitePreSetUp, suitePreTearDown, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, run, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEND_NOT_TRANSACTED

public static final int SEND_NOT_TRANSACTED
See Also:
Constant Field Values

SEND_TRANSACTED_ALWAYS

public static final int SEND_TRANSACTED_ALWAYS
See Also:
Constant Field Values

SEND_TRANSACTED_IF_POSSIBLE_WITH_TRANSACTION

public static final int SEND_TRANSACTED_IF_POSSIBLE_WITH_TRANSACTION
See Also:
Constant Field Values

SEND_TRANSACTED_IF_POSSIBLE_WITHOUT_TRANSACTION

public static final int SEND_TRANSACTED_IF_POSSIBLE_WITHOUT_TRANSACTION
See Also:
Constant Field Values

SEND_TRANSACTED_ROLLBACK

public static final int SEND_TRANSACTED_ROLLBACK
See Also:
Constant Field Values

CLEANUP

public static final int CLEANUP
See Also:
Constant Field Values

TRANSACTED_REDELIVERY_TO_DL_DESTINATION

public static final int TRANSACTED_REDELIVERY_TO_DL_DESTINATION
See Also:
Constant Field Values

ALL

public static final int ALL
See Also:
Constant Field Values

currentTx

protected volatile org.mule.umo.UMOTransaction currentTx

exclusionFlag

protected int exclusionFlag
Constructor Detail

AbstractJmsTransactionFunctionalTest

public AbstractJmsTransactionFunctionalTest()
Method Detail

exclude

protected void exclude(int flag)

notExcluded

protected boolean notExcluded(int flag)

doSetUp

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

doTearDown

protected void doTearDown()
                   throws Exception
Overrides:
doTearDown in class AbstractJmsFunctionalTestCase
Throws:
Exception

testSendNotTransacted

public void testSendNotTransacted()
                           throws Exception
Throws:
Exception

testSendTransactedAlways

public void testSendTransactedAlways()
                              throws Exception
Throws:
Exception

testSendTransactedIfPossibleWithTransaction

public void testSendTransactedIfPossibleWithTransaction()
                                                 throws Exception
Throws:
Exception

testSendTransactedIfPossibleWithoutTransaction

public void testSendTransactedIfPossibleWithoutTransaction()
                                                    throws Exception
Throws:
Exception

testSendTransactedRollback

public void testSendTransactedRollback()
                                throws Exception
Throws:
Exception

testCleanup

public void testCleanup()
                 throws Exception
Throws:
Exception

initialiseComponent

public org.mule.umo.UMOComponent initialiseComponent(org.mule.umo.UMODescriptor descriptor,
                                                     byte txBeginAction,
                                                     org.mule.tck.functional.EventCallback callback)
                                              throws Exception
Throws:
Exception

getDescriptor

public static org.mule.umo.UMODescriptor getDescriptor(String name,
                                                       String implementation)

afterInitialise

public void afterInitialise()
                     throws Exception
Overrides:
afterInitialise in class AbstractJmsFunctionalTestCase
Throws:
Exception

getInDest

protected org.mule.umo.endpoint.UMOEndpointURI getInDest()
Overrides:
getInDest in class AbstractJmsFunctionalTestCase

getOutDest

protected org.mule.umo.endpoint.UMOEndpointURI getOutDest()
Overrides:
getOutDest in class AbstractJmsFunctionalTestCase

getDLDest

protected org.mule.umo.endpoint.UMOEndpointURI getDLDest()

send

protected void send(String payload,
                    boolean transacted,
                    int ack)
             throws JMSException
Throws:
JMSException

getAcknowledgementMode

protected int getAcknowledgementMode()

addResultListener

protected void addResultListener(String dest,
                                 CountDownLatch countDown)
                          throws JMSException
Throws:
JMSException

getTransactionFactory

public abstract org.mule.umo.UMOTransactionFactory getTransactionFactory()

testTransactedRedeliveryToDLDestination

public void testTransactedRedeliveryToDLDestination()
                                             throws Exception
Throws:
Exception


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