org.jboss.test.messagedriven.support
Class BasicMessageDrivenUnitTest

java.lang.Object
  extended byTestCase
      extended byorg.jboss.test.JBossTestCase (src) 
          extended byorg.jboss.test.messagedriven.support.BasicMessageDrivenUnitTest
Direct Known Subclasses:
SimpleMessageDrivenUnitTest (src)

public abstract class BasicMessageDrivenUnitTest
extends JBossTestCase (src)

Basic tests of message driven beans

See Also:
Serialized Form

Nested Class Summary
 class BasicMessageDrivenUnitTest.ReceiverRunnable (src)
           
 
Field Summary
protected  Connection (src) connection
           
protected  java.lang.String connectionFactoryJNDI
           
protected  java.util.Properties defaultProps
           
protected  Destination (src) destination
           
protected  Destination (src) dlqDestination
           
protected  ObjectName (src) dlqJMXDestination
           
protected  ObjectName (src) jmxDestination
           
protected  java.lang.String mbeansar
           
protected  java.lang.String mdbjar
           
protected  java.util.ArrayList messages
           
protected  java.util.HashMap producers
           
protected  java.util.Properties props
           
protected static long REPEATED_WAIT
           
protected  boolean running
           
protected  Session (src) session
           
protected static ObjectName (src) testQueue
           
protected static java.util.Properties testQueueProps
           
protected static ObjectName (src) testTopic
           
protected static java.util.Properties testTopicProps
           
protected  java.lang.Thread thread
           
protected static long WAIT_TIME
           
 
Fields inherited from class org.jboss.test.JBossTestCase (src)
delegate, deploymentException, log
 
Constructor Summary
BasicMessageDrivenUnitTest(java.lang.String name, ObjectName (src)  jmxDestination, java.util.Properties defaultProps)
           
 
Method Summary
protected  void clearMessages(ObjectName (src)  name)
           
protected  java.lang.Object getAttribute(ObjectName (src)  name, java.lang.String attribute)
           
 Connection (src) getConnection()
           
 Destination (src) getDestination()
           
 Destination (src) getDLQDestination()
           
 ObjectName (src) getDLQJMXDestination()
           
 ObjectName (src) getJMXDestination()
           
 java.lang.String getMDBDeployment()
           
 MessageProducer (src) getMessageProducer()
           
 MessageProducer (src) getMessageProducer(Destination (src)  destination)
           
protected  java.util.ArrayList getMessages()
           
 Session (src) getSession()
           
 Message (src) getTestMessage()
           
protected  void initProperties(java.util.Properties props)
           
protected  java.lang.Object lookup(java.lang.String jndiName, java.lang.Class clazz)
           
 void runTest(Operation (src) [] ops, java.util.Properties props)
           
protected  void setUp()
           
protected  void startReceiverThread()
           
protected  void startTest(java.util.Properties props)
           
protected  void stopReceiverThread()
           
protected  void stopTest()
           
protected  void tearDown()
           
protected  void waitMessages(int expected)
           
 
Methods inherited from class org.jboss.test.JBossTestCase (src)
deploy, flushAuthCache, flushAuthCache, getBeanCount, getDeployerName, getDeploySetup, getDeployURL, getInitialContext, getIterationCount, getJndiInitFactory, getJndiURL, getLog, getResourceURL, getServer, getServerHost, getThreadCount, initDelegate, invoke, restartDBPool, sleep, testServerFound, undeploy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAIT_TIME

protected static final long WAIT_TIME
See Also:
Constant Field Values (src)

REPEATED_WAIT

protected static final long REPEATED_WAIT
See Also:
Constant Field Values (src)

testQueue

protected static final ObjectName (src)  testQueue

testQueueProps

protected static final java.util.Properties testQueueProps

testTopic

protected static final ObjectName (src)  testTopic

testTopicProps

protected static final java.util.Properties testTopicProps

thread

protected java.lang.Thread thread

running

protected boolean running

mdbjar

protected java.lang.String mdbjar

mbeansar

protected java.lang.String mbeansar

jmxDestination

protected ObjectName (src)  jmxDestination

dlqJMXDestination

protected ObjectName (src)  dlqJMXDestination

connectionFactoryJNDI

protected java.lang.String connectionFactoryJNDI

destination

protected Destination (src)  destination

dlqDestination

protected Destination (src)  dlqDestination

defaultProps

protected java.util.Properties defaultProps

props

protected java.util.Properties props

connection

protected Connection (src)  connection

session

protected Session (src)  session

producers

protected java.util.HashMap producers

messages

protected java.util.ArrayList messages
Constructor Detail

BasicMessageDrivenUnitTest

public BasicMessageDrivenUnitTest(java.lang.String name,
                                  ObjectName (src)  jmxDestination,
                                  java.util.Properties defaultProps)
Method Detail

runTest

public void runTest(Operation (src) [] ops,
                    java.util.Properties props)
             throws java.lang.Exception
Throws:
java.lang.Exception

getMDBDeployment

public java.lang.String getMDBDeployment()

getJMXDestination

public ObjectName (src)  getJMXDestination()

getDLQJMXDestination

public ObjectName (src)  getDLQJMXDestination()

getDestination

public Destination (src)  getDestination()
                           throws java.lang.Exception
Throws:
java.lang.Exception

getDLQDestination

public Destination (src)  getDLQDestination()
                              throws java.lang.Exception
Throws:
java.lang.Exception

getMessageProducer

public MessageProducer (src)  getMessageProducer()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getMessageProducer

public MessageProducer (src)  getMessageProducer(Destination (src)  destination)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getSession

public Session (src)  getSession()
                   throws java.lang.Exception
Throws:
java.lang.Exception

getConnection

public Connection (src)  getConnection()
                         throws java.lang.Exception
Throws:
java.lang.Exception

getTestMessage

public Message (src)  getTestMessage()
                       throws java.lang.Exception
Throws:
java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception

startTest

protected void startTest(java.util.Properties props)
                  throws java.lang.Exception
Throws:
java.lang.Exception

stopTest

protected void stopTest()

clearMessages

protected void clearMessages(ObjectName (src)  name)
                      throws java.lang.Exception
Throws:
java.lang.Exception

initProperties

protected void initProperties(java.util.Properties props)
                       throws java.lang.Exception
Throws:
java.lang.Exception

waitMessages

protected void waitMessages(int expected)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getMessages

protected java.util.ArrayList getMessages()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

startReceiverThread

protected void startReceiverThread()

stopReceiverThread

protected void stopReceiverThread()

getAttribute

protected java.lang.Object getAttribute(ObjectName (src)  name,
                                        java.lang.String attribute)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

lookup

protected java.lang.Object lookup(java.lang.String jndiName,
                                  java.lang.Class clazz)
                           throws java.lang.Exception
Throws:
java.lang.Exception