The problem with this approach, which I also found at
http://marc.theaimsgroup.com/?l=cactus-user&m=100879309609213&w=2 and tried
is, the MDB calls a session ejb and this might again call another MDB
(There is a complex workflow design behind that). So it may be possible to
make a call to the first MDB's onMessage(), but this will return back soon
and the testXXX() methods might fail like the previous scenario.
Is there any solution to this.
Thanks
Jayaraman
"J. B.
Rainsberger" To: Cactus Users List <[EMAIL
PROTECTED]>
<[EMAIL PROTECTED] cc:
om> Subject: Re: Testing MDB
05/24/2004 04:45
PM
Please respond to
"Cactus Users
List"
[EMAIL PROTECTED] wrote:
> 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
the
> tearDown() those records created are deleted, so that the test data in
the
> xml is reusable.
>
> The problem is that when the testXXX() are being executed the MDB's
method
> might not have been done with the creation and so the test fails, while
the
> 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
this
> kind of testing possible or am I way off?
>
> Also, is there any documentation on how to use the JMSRedirector?
I don't recommend this approach.
Instead, create the appropriate Message object yourself, then simply
invoke onMessage(). (If you need to, fake it.) Avoid sending the Message
through the EJB container to eliminate an unnecessary layer of complexity.
Good luck.
--
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]