KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > mdb > bean > ExampleMDB


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