Hi, I'm running on : JBoss AS 4.2.0 ActiveMQ 4.1.1 I wonder why my MDB only process the message when it was first time deployed.
The scenario : 1. Run Jboss server 2. Deploy my MDB 3. run client (send message to MDB's monitoring queue) 4. Nothing happen... 5. Delete my MDB 6. Redeploy my MDB 7. It works... my MDB process the message 8. run client (same as point3) 9. nothing happen... Why ? Any help will be highly appreciated. Thanks. Client snippet: InitialContext ic = new InitialContext(System.getProperties()); //connect using active mq ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(); //---- Queue queue = (Queue)ic.lookup("activemq/queue/outbound"); ic.close(); System.out.println("Queue testQueue exists"); Connection connection = cf.createConnection(); Session sess = connection.createSession(false,Session.AUTO_ACKNOWLEDGE); MessageProducer sender = sess.createProducer(queue); TextMessage msg = sess.createTextMessage("test activemq3"); /* consume message asynchronously MessageConsumer consumer = sess.createConsumer(queue); consumer.setMessageListener(myListener); */ sender.send(msg); connection.close(); My MDB : @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue.outbound") }) public class HelloMDB implements MessageListener { public void onMessage(Message arg0) { try { TextMessage tm = (TextMessage)arg0; System.out.println("Hello I'm Message Bean, receive msg: "+tm.getText()); } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } Regards, Ferry -- View this message in context: http://www.nabble.com/Running-MDB-%28EJB3%29-in-JBoss-tf4258981s2354.html#a12120362 Sent from the ActiveMQ - User mailing list archive at Nabble.com.