[jboss-user] [JBoss Messaging] - defining/creating messaging Queue through @ActivationConfigP

yashendrac do-not-reply at jboss.com
Fri Jul 17 09:17:35 EDT 2009


I wonder if it is mandatory to define Queues and Topics in xml in JBoss Messaging. Is there any way to make it work the way it used to in Jboss MQ, i.e.  just use the @ActivationConfigProperty annotation in message consumer/MDB without defining in any xml?

In jboss MQ I don't have to define Queues and Topics in any configuration xml if I have @ActivationConfigProperty annotation in my MDB like this:

@MessageDriven(activationConfig = {
  |         @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
  |         @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
  |         @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),
  |         @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/event"),
  |         @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "Alarm = FALSE")})
  | 

But after moving same code to Jboss Messaging my MDB is not able to find the specified Queue in that MDB 
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/event")

I am able to resolve this problem by defining all my Queues and Topics in destination-service.xml located under deploy/messaging/destination-service.xml.

But I don't want to configure these in any xml outside of my application and would prefer using annotation in class itself.

Any suggestion would be highly appreciated.



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

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



More information about the jboss-user mailing list