Hi, are you using persistent or non-persistent delivery for your messages? Any non-persistent message will be discarded on broker restart (however, I don't know why it would go to the storage in the first place, though).
And are you using a time-to-live on your messages, which might have expired the time your broker restarts? Best regards, Martin On Tue, May 3, 2011 at 8:28 AM, anilkapoor <er.anil.kap...@gmail.com> wrote: > I am using camel for routing & test Activemq i am testing by sending jms > message - > this is my junit test > > public class JmsTest extends CamelSpringTestSupport{ > private static Logger logger = LoggerFactory.getLogger(JmsTest.class); > > @Test > public void testJMS() { > > ArrayList<String> listObj = new ArrayList<String>(); > listObj.add("---- TEST VALUE 1 -----"); > listObj.add("---- TEST VALUE 2 -----"); > listObj.add("---- TEST VALUE 3 -----"); > > logger.info("!!!!!!!!!!!!!!!!!! Request before going on Queue > !!!!!!!!!!!!!!!!!!!!!!\n" + listObj.size()); > template.sendBody("activemq:queue:testJmsQueue", > ExchangePattern.OutOnly, listObj); > assertEquals(true, true); > } > > /* (non-Javadoc) > * @see > org.apache.camel.test.junit4.CamelSpringTestSupport#createApplicationContext() > */ > @Override > protected AbstractXmlApplicationContext createApplicationContext() { > // TODO Auto-generated method stub > return new ClassPathXmlApplicationContext("META-INF/spring/*.xml"); > } > } > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/message-clears-from-db-if-application-or-activemq-restarts-tp3491807p3491828.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >