1 22 package org.jboss.ejb3.test.mdb; 23 24 import javax.ejb.ActivationConfigProperty ; 25 import javax.ejb.MessageDriven ; 26 import javax.ejb.MessageDrivenContext ; 27 import javax.jms.Message ; 28 import javax.jms.MessageListener ; 29 import javax.annotation.Resource; 30 31 import org.jboss.logging.Logger; 32 33 37 @MessageDriven (activationConfig = 38 { 39 @ActivationConfigProperty (propertyName="destinationType", propertyValue="javax.jms.Bogus"), 40 @ActivationConfigProperty (propertyName="destination", propertyValue="queue/bogus") 41 }) 42 public class OverrideTestMDB implements MessageListener 43 { 44 private static final Logger log = Logger.getLogger(OverrideTestMDB.class); 45 @Resource MessageDrivenContext ctx; 46 47 public void onMessage(Message recvMsg) 48 { 49 if (ctx == null) throw new RuntimeException ("FAILED ON CTX LOOKUP"); 50 TestStatusBean.overrideQueueRan++; 51 52 System.out.println("*** OverrideTestMDB onMessage " + TestStatusBean.overrideQueueRan); 53 } 54 } 55 | Popular Tags |