How to pump messages to ActiveMQ?
puttime Apr 11, 2013 11:46 PMI have followed the instructions to include ActiveMQ in jBoss AS.
https://community.jboss.org/wiki/IntegrationOfJBossAS7WithActiveMQ
I'm using it as an internal messaging broker.
I've created a new SwitchYard project, which uses JMS binding.
Now I need to test it with a client app.
For HornetQ, it was straight forward.
HornetQMixIn hqMixIn = new HornetQMixIn(false)
                                    .setUser(USER)
                                    .setPassword(PASSWD);
        if (args.length == 0) {
            return;
        }
        
        hqMixIn.initialize();
        try {
            final Session session = hqMixIn.createJMSSession();
            final MessageProducer producer = session.createProducer(HornetQMixIn.getJMSQueue(QUEUE));
         }
 
 blah blah
What should I do to do the same using ActiveMQ?
I tried the sample provided in the above URL, but it didn't work (compiler errors):
[Error = The annotation @MessageDriven is disallowed for this location]
 @MessageDriven(activationConfig = {
           @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
           @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
           @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue.queue_in") }) // Note the physical name of the queue
     @ResourceAdapter("activemq-ra.rar")
 
 
   [Error = The annotation @Resource is disallowed for this location]
      @Resource(mappedName = "java:/activemq/ConnectionFactory")
        ConnectionFactory connectionFactory;
        @Resource(mappedName = "java:/activemq/queue_out") // Note the mapped name of the queue
        Destination queue;
        Connection connection;
Also, if I use ActiveMQ, do I still need to prepare and copy the "project_name-jms.xml" file to standalone/deployments folder?
With ActiveMQ, the queue names seem to be defined in the config XML file, like for example queue.queue_in and queue.queue_out. Is that right?
So for the JMS queue name, I provide queue.queue_in as the name right?