Hi Huy, So let me verify what you mean. You want to unit test an EJB method and verify that a JMS message has been sent correctly. I see 2 options:
Option 1: You use mock JMS objects using DynaMock or EasyMock. That will allow you to verify that the correct JMS APIs are called. It won't verify that the queues are set up correctly though. You'll still need some functional test to assert this. Option 2: In your Cactus endXXX() method, you listen to the correct queue and assert there is the message you want. You can achieve this easily by using the JMS API or you can use a higher level framework such as commons-messenger for that (http://jakarta.apache.org/commons/sandbox/messenger/index.html). Thanks for this interesting question! -Vincent > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 09 July 2003 23:43 > To: "Cactus Users List" > Subject: How to receive JMS message from cactus unit test > > Hi, > > Is there anyway I can write code to receive jms message from cactus test? > My problem is this: When I create an entity bean successfully from cactus, > I expect to receive a jms message. I want to be able to receive the jms > message to confirm that entity bean has been created successfully. > > Huy > > __________________________________________________________________ > McAfee VirusScan Online from the Netscape Network. > Comprehensive protection for your entire computer. Get your free trial > today! > http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 > > Get AOL Instant Messenger 5.1 free of charge. Download Now! > http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 > > --------------------------------------------------------------------- > 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]
