Rob Davies wrote: > for unit tests - we often set the deleteAllMessagesOnStartup flag on the > broker > > For your case where you are using the vm://transport, create the broker > separetly in your setUp() - and set the deleteAllMessageOnStartup > property on the broker before calling start() or setting a transport > connector (for vm:// you won't need to explicitly do this). > > cheers, > > > Rob Davies > http://rajdavies.blogspot.com/ > > > > On 1 Mar 2007, at 22:13, Kelly Campbell wrote: > >> I'm trying to figure out how to do this same thing in the current >> codebase (4.1/4.2). Basically I just want to purge all queues at the >> beginning of a unit test to ensure a clean start. I have a local vm:// >> broker and would prefer not to go through JMX to do this. >> >> Thanks, >> Kelly
If you're not using disk persistence with a VM broker, all of the messages disappear when it shuts down. Once all of the connection to the VM broker are gone, it shuts down (although I wish I could override that behavior :)), so you may not need to go through that much trouble. -- Christopher G. Stach II