1 7 package org.jboss.tutorial.consumer.bean; 8 9 import org.jboss.annotation.ejb.Consumer; 10 11 import javax.ejb.ActivationConfigProperty ; 12 import java.util.Map ; 13 14 @Consumer(activateConfig = { 15 @ActivationConfigProperty (propertyName="destinationType", propertyValue="javax.jms.Queue"), 16 @ActivationConfigProperty (propertyName="destination", propertyValue="queue/tutorial/example") 17 }) 18 public class ExampleConsumerBean implements ExampleProducerRemote, ExampleProducerLocal, ExampleProducerXA 19 { 20 public void method1(String msg, int val) 21 { 22 System.out.println("method1(" + msg + ", " + val + ")"); 23 } 24 public void method2(String msg, Map <String , String > map) 25 { 26 System.out.println("method2: " + msg); 27 for (String key : map.keySet()) 28 { 29 System.out.println("method2 key/val: " + key + ":" + map.get(key)); 30 } 31 } 32 33 } 34 | Popular Tags |