1 7 package org.jboss.tutorial.jca.inflow.swiftmq.bean; 8 9 import org.jboss.annotation.ejb.ResourceAdapter; 10 11 import javax.ejb.*; 12 import javax.jms.Message ; 13 import javax.jms.MessageListener ; 14 15 16 @MessageDriven(name="testmdb", activationConfig = 17 { 18 @ActivationConfigProperty(propertyName="messagingType", propertyValue="javax.jms.MessageListener"), 19 @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), 20 @ActivationConfigProperty(propertyName="Destination", propertyValue="testqueue"), 21 @ActivationConfigProperty(propertyName="ConnectionFactoryName", propertyValue="ConnectionFactory"), 22 @ActivationConfigProperty(propertyName="Transacted", propertyValue="true"), 23 @ActivationConfigProperty(propertyName="Xa", propertyValue="true"), 24 @ActivationConfigProperty(propertyName="DeliveryOption", propertyValue="B"), 25 @ActivationConfigProperty(propertyName="SubscriptionDurability", propertyValue="Durable"), 26 @ActivationConfigProperty(propertyName="MaxPoolSize", propertyValue="20"), 27 @ActivationConfigProperty(propertyName="MaxMessages", propertyValue="1"), 28 }) 29 @ResourceAdapter("swiftmq.rar") 30 public class AnnotatedTestMDBBean 31 implements MessageListener 32 { 33 public void onMessage(Message message) 34 { 35 System.out.println(message); 36 } 37 } 38 | Popular Tags |