1 7 package org.jboss.tutorial.mdb.bean; 8 9 import javax.ejb.MessageDriven ; 10 import javax.ejb.ActivationConfigProperty ; 11 import javax.jms.Message ; 12 import javax.jms.MessageListener ; 13 14 @MessageDriven (activateConfig = 15 { 16 @ActivationConfigProperty (propertyName="destinationType", propertyValue="javax.jms.Queue"), 17 @ActivationConfigProperty (propertyName="destination", propertyValue="queue/tutorial/example") 18 }) 19 public class ExampleMDB implements MessageListener 20 { 21 public void onMessage(Message recvMsg) 22 { 23 System.out.println("----------------"); 24 System.out.println("Received message"); 25 System.out.println("----------------"); 26 } 27 28 } 29 | Popular Tags |