3 Replies Latest reply on Jul 29, 2009 11:30 AM by Peter Johnson

    MessageDriven Bean annotation problem

    James Hartell Newbie

      Hi, I am reading JBoss in Action to try to learn how to use JBoss Messaging and I am going through the examples in the book but I have come stuck on one example and have scoured the web for documentation but couldn't find any so I am writing in my first ever forum for help.

      Here is the code:

      package org.jbia.jms.sofaspuds;

      import javax.jms.*;
      import javax.ejb.*;

      (propertyName="destinationType", propertyValue="javax.jms.Topic"),
      (propertyName="destination", propertyValue="topic/VideoSubscribeTopic"),
      (propertyName="subscriptionDurability", propertyValue="Durable"),
      (propertyName="messageSelector", propertyValue="SpudsCustomer = 'James'")

      public class WireTap implements MessageListener {

      public void onMessage(Message msg){
      ObjectMessage objmsg = (ObjectMessage)msg;
      Video video = (Video)objmsg.getObject();
      System.out.println("Serveillance: perp=" +
      msg.getStringProperty("SpudsCustomer" +
      ",video = " + video));
      }catch (Exception e){

      I have jboss-ejb3x.jar, jboss-j2ee.jar and jboss-messaging-client.jar on the build path as the book said I need but I get the error:
      The attribute activationConfig is undefined for the annotation type MessageDriven

      I am using JBoss 5.1.0.GA, I have tried using so many jar files to see if it was that but I cannot get this working, any suggestions would be much appreciated. - Thanks, James.