This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes JMS Stub Code for Testing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS Stub Code for Testing?" Watch "JMS Stub Code for Testing?" New topic

JMS Stub Code for Testing?

Jimmy Ho
Ranch Hand

Joined: Jul 31, 2007
Posts: 56
Does anyone know where I can find some JMS stub code? That is, I want to instantiate JMS objects, and send/receive messages, but not actually have a transport mechanism underneath the covers supporting it. I just want some Java classes (possibly running in another thread) to just 'fake it' by acknowledging receipt of the messages or sending messages for my 'real' code to process.

Sometimes I like to just test some interfaces without having to go through and set up all the 'stuff' required to do real JMS/systems integration testing.
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
Hi Jimmy,

I feel Mock objects are appropriate for the situation you are describing here. You could either look at frameworks like Mockmaker, easymock, ejb3unit etc.. or write your own jms mock implementation.

Shailesh Kini.
I agree. Here's the link:
subject: JMS Stub Code for Testing?
Similar Threads
JMS puzzle
Performance measurement when using JMS
web service and basic authentication.
ActiveMQ 5.2.0 + REST + HTTP POST = java.lang.OutOfMemoryError
Remove JMS message from Queue programatically