0 Replies Latest reply on Jul 27, 2006 6:02 AM by Maciek

    create MDBean in my code and assign it to a queue

    Maciek Newbie

      Hi
      I wold like to create MDBean programatically and assign it to a queue,

      I attached my testBean. It works with one queue.
      But I want make some tests:
      create many queues and assign MDBean to them.

      I've created many queues, but don't know how to create such a Bean in code,
      and than assign it to a queue.

      Can anybody help ?




      package mdbean;
      import javax.ejb.ActivationConfigProperty;
      import javax.ejb.MessageDriven;
      import javax.jms.Message;
      import javax.jms.MessageListener;

      @MessageDriven(activationConfig={
      @ActivationConfigProperty (propertyName="destinationType",
      propertyValue="javax.jms.Queue"),
      @ActivationConfigProperty(propertyName="destination",
      propertyValue="queue/A")
      }
      )
      public class TestMDBean implements MessageListener {
      public void onMessage(Message arg0) {
      // TODO Auto-generated method stub
      }
      }