[jboss-user] [EJB 3.0] - create MDBean in my code and assign it to a queue

macios do-not-reply at jboss.com
Thu Jul 27 06:02:28 EDT 2006


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
	}
}

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961224#3961224

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961224



More information about the jboss-user mailing list