KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > consumer > bean > ExampleConsumerBean


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

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