jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mahfouz, Ayman" <ayman.mahf...@citigroup.com>
Subject RE: Testing MDB
Date Mon, 24 May 2004 21:12:42 GMT
Since the threading and execution of EJBs are totally under the control
of the container there is no simple way to get around this.

I can not think of anything other than introducing a Thread.sleep() with
an arbitrary delay before asserting that the record has been inserted.

-----Original Message-----
From: Jayaraman.Dorai@transplace.com
Sent: Monday, May 24, 2004 12:37 PM
To: cactus-user@jakarta.apache.org
Subject: Testing MDB

I have a message bean which creates a set of data in the database after
parsing the xml . In the setUp() the message is sent to this MDB. And in
the testXXX() I test to see if the records are properly created and in
tearDown() those records created are deleted, so that the test data  in
xml is reusable.

The problem is that when the testXXX() are being executed the MDB's
might not have been done with the creation and so the test fails, while
MDB did not fail at all.

Is there any suggested approach to test this MDB? Reading the archive/
documentation also did not help on how to code the above scenario. Is
kind of testing possible or am I way off?

Also, is there any documentation on how to use the JMSRedirector?


To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org

View raw message